TFT_COLOR_UI async DMA SPI (#24980)

This commit is contained in:
Alexander Gavrilenko
2022-12-13 00:13:31 +03:00
committed by Scott Lahteine
parent d082223fee
commit ec6349f2ac
31 changed files with 500 additions and 227 deletions

View File

@ -57,7 +57,8 @@ void MarlinUI::tft_idle() {
#endif
tft.queue.async();
TERN_(TOUCH_SCREEN, touch.idle());
TERN_(TOUCH_SCREEN, if (tft.queue.is_empty()) touch.idle()); // Touch driver is not DMA-aware, so only check for touch controls after screen drawing is completed
}
#if ENABLED(SHOW_BOOTSCREEN)
@ -342,7 +343,10 @@ void MarlinUI::draw_status_screen() {
#if ENABLED(TOUCH_SCREEN)
add_control(256, 130, menu_main, imgSettings);
TERN_(SDSUPPORT, add_control(0, 130, menu_media, imgSD, !printingIsActive(), COLOR_CONTROL_ENABLED, card.isMounted() && printingIsActive() ? COLOR_BUSY : COLOR_CONTROL_DISABLED));
#if ENABLED(SDSUPPORT)
const bool cm = card.isMounted(), pa = printingIsActive();
add_control(0, 130, menu_media, imgSD, cm && !pa, COLOR_CONTROL_ENABLED, cm && pa ? COLOR_BUSY : COLOR_CONTROL_DISABLED);
#endif
#endif
}