mirror of https://github.com/arendst/Tasmota.git
parent
b427267e2b
commit
2f7eefa8f4
|
@ -410,11 +410,13 @@ const uint16_t kGpioNiceList[] PROGMEM = {
|
|||
AGPIO(GPIO_SDCARD_CS),
|
||||
#endif // USE_SDCARD
|
||||
#endif // USE_SPI
|
||||
|
||||
AGPIO(GPIO_SSPI_MISO), // Software SPI Master Input Client Output
|
||||
AGPIO(GPIO_SSPI_MOSI), // Software SPI Master Output Client Input
|
||||
AGPIO(GPIO_SSPI_SCLK), // Software SPI Serial Clock
|
||||
AGPIO(GPIO_SSPI_CS), // Software SPI Chip Select
|
||||
AGPIO(GPIO_SSPI_DC), // Software SPI Data or Command
|
||||
|
||||
#ifdef USE_DISPLAY
|
||||
#ifdef USE_DISPLAY_ILI9341
|
||||
AGPIO(GPIO_ILI9341_CS),
|
||||
|
@ -422,7 +424,6 @@ const uint16_t kGpioNiceList[] PROGMEM = {
|
|||
#ifdef USE_XPT2046
|
||||
AGPIO(GPIO_XPT2046_CS), // XPT2046 SPI Chip Select
|
||||
#endif
|
||||
|
||||
#endif // USE_DISPLAY_ILI9341
|
||||
#ifdef USE_DISPLAY_ILI9488
|
||||
AGPIO(GPIO_ILI9488_CS),
|
||||
|
|
|
@ -1932,7 +1932,7 @@ void CmndDisplayFont(void)
|
|||
|
||||
void CmndDisplayILIMOde(void)
|
||||
{
|
||||
if ((XdrvMailbox.payload >= 1) && (XdrvMailbox.payload < 16)) {
|
||||
if ((XdrvMailbox.payload >= 1) && (XdrvMailbox.payload <= 7)) {
|
||||
Settings.display_options.ilimode = XdrvMailbox.payload;
|
||||
TasmotaGlobal.restart_flag = 2;
|
||||
}
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
#define XDSP_04 4
|
||||
|
||||
enum IliModes { ILIMODE_9341 = 1, ILIMODE_9342, ILIMODE_MAX };
|
||||
|
||||
#include <ILI9341_2.h>
|
||||
|
||||
extern uint8_t *buffer;
|
||||
|
@ -37,13 +39,10 @@ uint8_t ili9342_ctouch_counter = 0;
|
|||
uint8_t ili9342_ctouch_counter = 0;
|
||||
#endif // USE_FT5206
|
||||
|
||||
|
||||
bool tft_init_done = false;
|
||||
|
||||
#define ILI9341_ID 1
|
||||
#define ILI9342_ID 2
|
||||
|
||||
//Settings.display_options.ilimode = ILI9341_ID;
|
||||
//Settings.display_options.ilimode = ILIMODE_9341;
|
||||
|
||||
/*********************************************************************************************/
|
||||
|
||||
|
@ -66,8 +65,8 @@ void ILI9341_InitDriver()
|
|||
// disable screen buffer
|
||||
buffer = NULL;
|
||||
|
||||
if (!Settings.display_options.ilimode) {
|
||||
Settings.display_options.ilimode = ILI9341_ID;
|
||||
if (!Settings.display_options.ilimode || (Settings.display_options.ilimode >= ILIMODE_MAX)) {
|
||||
Settings.display_options.ilimode = ILIMODE_9341;
|
||||
}
|
||||
|
||||
// default colors
|
||||
|
@ -102,7 +101,7 @@ void ILI9341_InitDriver()
|
|||
renderer->setTextFont(2);
|
||||
renderer->setTextSize(1);
|
||||
renderer->setTextColor(ILI9341_WHITE, ILI9341_BLACK);
|
||||
renderer->DrawStringAt(50, (Settings.display_height/2)-12, (Settings.display_options.ilimode & 3)==ILI9341_ID?"ILI9341 TFT!":"ILI9342 TFT!", ILI9341_WHITE, 0);
|
||||
renderer->DrawStringAt(50, (Settings.display_height/2)-12, (Settings.display_options.ilimode & 3)==ILIMODE_9341?"ILI9341 TFT!":"ILI9342 TFT!", ILI9341_WHITE, 0);
|
||||
delay(1000);
|
||||
#endif // SHOW_SPLASH
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if defined(USE_I2C) || defined(USE_SPI)
|
||||
#ifdef USE_DISPLAY
|
||||
|
||||
#ifdef XFUNC_PTR_IN_ROM
|
||||
|
@ -201,4 +200,3 @@ bool XdspCall(uint8_t Function)
|
|||
}
|
||||
|
||||
#endif // USE_DISPLAY
|
||||
#endif // USE_I2C or USE_SPI
|
||||
|
|
Loading…
Reference in New Issue