mirror of
https://github.com/HASwitchPlate/openHASP.git
synced 2025-07-25 20:26:41 +00:00
Add DMA define
This commit is contained in:
parent
20dff0541e
commit
7e82697982
@ -628,6 +628,13 @@ void guiSetup()
|
|||||||
{
|
{
|
||||||
/* TFT init */
|
/* TFT init */
|
||||||
tft.begin();
|
tft.begin();
|
||||||
|
|
||||||
|
#ifdef USE_DMA_TO_TFT
|
||||||
|
// DMA - should work with STM32F2xx/F4xx/F7xx processors
|
||||||
|
// NOTE: >>>>>> DMA IS FOR SPI DISPLAYS ONLY <<<<<<
|
||||||
|
tft.initDMA(); // Initialise the DMA engine (tested with STM32F446 and STM32F767)
|
||||||
|
#endif
|
||||||
|
|
||||||
tft.setRotation(guiRotation); /* 1/3=Landscape or 0/2=Portrait orientation */
|
tft.setRotation(guiRotation); /* 1/3=Landscape or 0/2=Portrait orientation */
|
||||||
#if TOUCH_DRIVER == 0
|
#if TOUCH_DRIVER == 0
|
||||||
tft.setTouch(calData);
|
tft.setTouch(calData);
|
||||||
@ -673,8 +680,13 @@ void guiSetup()
|
|||||||
lv_fs_if_init(); // auxilary file system drivers
|
lv_fs_if_init(); // auxilary file system drivers
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Dump TFT Cofiguration */
|
/* Dump TFT Configuration */
|
||||||
tftSetup(tft);
|
tftSetup(tft);
|
||||||
|
#ifdef USE_DMA_TO_TFT
|
||||||
|
Log.verbose(F("TFT: DMA : ENABELD"));
|
||||||
|
#else
|
||||||
|
Log.verbose(F("TFT: DMA : DISABELD"));
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Load User Settings */
|
/* Load User Settings */
|
||||||
// guiSetConfig(settings);
|
// guiSetConfig(settings);
|
||||||
@ -814,7 +826,7 @@ void IRAM_ATTR guiLoop()
|
|||||||
#ifdef STM32_CORE_VERSION_MAJOR
|
#ifdef STM32_CORE_VERSION_MAJOR
|
||||||
tick.update();
|
tick.update();
|
||||||
|
|
||||||
while(Serial.available()) {
|
while(Serial.available()) {
|
||||||
char ch = Serial.read();
|
char ch = Serial.read();
|
||||||
Serial.print(ch);
|
Serial.print(ch);
|
||||||
if (ch == 13 ||ch == 10) {
|
if (ch == 13 ||ch == 10) {
|
||||||
@ -991,6 +1003,7 @@ bool guiSetConfig(const JsonObject & settings)
|
|||||||
oobeSetAutoCalibrate(true);
|
oobeSetAutoCalibrate(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (status) tft.setTouch(calData);
|
||||||
changed |= status;
|
changed |= status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user