From 928f6f94477dab4777f236e189641ed48482f010 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Mon, 4 Jan 2021 15:03:56 +0100 Subject: [PATCH] Prep SPI SDCard support --- tasmota/language/af_AF.h | 1 + tasmota/language/bg_BG.h | 1 + tasmota/language/cs_CZ.h | 1 + tasmota/language/de_DE.h | 1 + tasmota/language/el_GR.h | 1 + tasmota/language/en_GB.h | 1 + tasmota/language/es_ES.h | 1 + tasmota/language/fr_FR.h | 1 + tasmota/language/he_HE.h | 1 + tasmota/language/hu_HU.h | 1 + tasmota/language/it_IT.h | 1 + tasmota/language/ko_KO.h | 1 + tasmota/language/nl_NL.h | 1 + tasmota/language/pl_PL.h | 1 + tasmota/language/pt_BR.h | 1 + tasmota/language/pt_PT.h | 1 + tasmota/language/ro_RO.h | 1 + tasmota/language/ru_RU.h | 1 + tasmota/language/sk_SK.h | 1 + tasmota/language/sv_SE.h | 1 + tasmota/language/tr_TR.h | 1 + tasmota/language/uk_UA.h | 1 + tasmota/language/vi_VN.h | 1 + tasmota/language/zh_CN.h | 1 + tasmota/language/zh_TW.h | 1 + tasmota/tasmota_template.h | 15 +++++++++------ 26 files changed, 34 insertions(+), 6 deletions(-) diff --git a/tasmota/language/af_AF.h b/tasmota/language/af_AF.h index 4eab30241..476726bfb 100644 --- a/tasmota/language/af_AF.h +++ b/tasmota/language/af_AF.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/bg_BG.h b/tasmota/language/bg_BG.h index e9003a386..51a355887 100644 --- a/tasmota/language/bg_BG.h +++ b/tasmota/language/bg_BG.h @@ -777,6 +777,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/cs_CZ.h b/tasmota/language/cs_CZ.h index 159d00878..571cdc769 100644 --- a/tasmota/language/cs_CZ.h +++ b/tasmota/language/cs_CZ.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/de_DE.h b/tasmota/language/de_DE.h index cdbc1f994..e05128033 100644 --- a/tasmota/language/de_DE.h +++ b/tasmota/language/de_DE.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/el_GR.h b/tasmota/language/el_GR.h index 8e2e3f093..cfe86a0bb 100644 --- a/tasmota/language/el_GR.h +++ b/tasmota/language/el_GR.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/en_GB.h b/tasmota/language/en_GB.h index 2d6a47f43..fa8ab091d 100644 --- a/tasmota/language/en_GB.h +++ b/tasmota/language/en_GB.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/es_ES.h b/tasmota/language/es_ES.h index 31640385e..716048851 100644 --- a/tasmota/language/es_ES.h +++ b/tasmota/language/es_ES.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/fr_FR.h b/tasmota/language/fr_FR.h index 7bb645751..61e494c29 100644 --- a/tasmota/language/fr_FR.h +++ b/tasmota/language/fr_FR.h @@ -774,6 +774,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/he_HE.h b/tasmota/language/he_HE.h index ab7ff6d77..c69b67765 100644 --- a/tasmota/language/he_HE.h +++ b/tasmota/language/he_HE.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/hu_HU.h b/tasmota/language/hu_HU.h index e2d335ce6..71271e34e 100644 --- a/tasmota/language/hu_HU.h +++ b/tasmota/language/hu_HU.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/it_IT.h b/tasmota/language/it_IT.h index 9aa08db46..04e295d97 100644 --- a/tasmota/language/it_IT.h +++ b/tasmota/language/it_IT.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 - DC" #define D_SENSOR_SSD1331_CS "SSD1331 - CS" #define D_SENSOR_SSD1331_DC "SSD1331 - DC" +#define D_SENSOR_SDCARD_CS "SDCard - CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/ko_KO.h b/tasmota/language/ko_KO.h index 0d9f91af4..d535c6f38 100644 --- a/tasmota/language/ko_KO.h +++ b/tasmota/language/ko_KO.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/nl_NL.h b/tasmota/language/nl_NL.h index 8087a8770..d7f11bd99 100644 --- a/tasmota/language/nl_NL.h +++ b/tasmota/language/nl_NL.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/pl_PL.h b/tasmota/language/pl_PL.h index 5919b35b5..b5fac0432 100644 --- a/tasmota/language/pl_PL.h +++ b/tasmota/language/pl_PL.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/pt_BR.h b/tasmota/language/pt_BR.h index 8069a265f..feb940b36 100644 --- a/tasmota/language/pt_BR.h +++ b/tasmota/language/pt_BR.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/pt_PT.h b/tasmota/language/pt_PT.h index af9ee37a0..31d3b4a27 100644 --- a/tasmota/language/pt_PT.h +++ b/tasmota/language/pt_PT.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/ro_RO.h b/tasmota/language/ro_RO.h index bf23a7c8d..0b8d26d20 100644 --- a/tasmota/language/ro_RO.h +++ b/tasmota/language/ro_RO.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/ru_RU.h b/tasmota/language/ru_RU.h index 965f5f5d7..7191969b7 100644 --- a/tasmota/language/ru_RU.h +++ b/tasmota/language/ru_RU.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "А" diff --git a/tasmota/language/sk_SK.h b/tasmota/language/sk_SK.h index 20a691be6..787d841cb 100644 --- a/tasmota/language/sk_SK.h +++ b/tasmota/language/sk_SK.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/sv_SE.h b/tasmota/language/sv_SE.h index 18822f2b8..db6e9fc48 100644 --- a/tasmota/language/sv_SE.h +++ b/tasmota/language/sv_SE.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/tr_TR.h b/tasmota/language/tr_TR.h index f307a9e73..5014afcd6 100644 --- a/tasmota/language/tr_TR.h +++ b/tasmota/language/tr_TR.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/uk_UA.h b/tasmota/language/uk_UA.h index 2626572ae..b027a95ac 100644 --- a/tasmota/language/uk_UA.h +++ b/tasmota/language/uk_UA.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "А" diff --git a/tasmota/language/vi_VN.h b/tasmota/language/vi_VN.h index d8d9d5124..0fb6cd6a4 100644 --- a/tasmota/language/vi_VN.h +++ b/tasmota/language/vi_VN.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "A" diff --git a/tasmota/language/zh_CN.h b/tasmota/language/zh_CN.h index 1895fc690..05ca75c7b 100644 --- a/tasmota/language/zh_CN.h +++ b/tasmota/language/zh_CN.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "安" diff --git a/tasmota/language/zh_TW.h b/tasmota/language/zh_TW.h index 2f2ec544e..384103e01 100644 --- a/tasmota/language/zh_TW.h +++ b/tasmota/language/zh_TW.h @@ -778,6 +778,7 @@ #define D_SENSOR_ST7789_DC "ST7789 DC" #define D_SENSOR_SSD1331_CS "SSD1331 CS" #define D_SENSOR_SSD1331_DC "SSD1331 DC" +#define D_SENSOR_SDCARD_CS "SDCard CS" // Units #define D_UNIT_AMPERE "安培" diff --git a/tasmota/tasmota_template.h b/tasmota/tasmota_template.h index 874f5ab2f..8e8de6142 100644 --- a/tasmota/tasmota_template.h +++ b/tasmota/tasmota_template.h @@ -142,6 +142,7 @@ enum UserSelectablePins { GPIO_RA8876_CS, GPIO_ST7789_CS, GPIO_ST7789_DC, GPIO_SSD1331_CS, GPIO_SSD1331_DC, + GPIO_SDCARD_CS, GPIO_SENSOR_END }; enum ProgramSelectablePins { @@ -304,6 +305,7 @@ const char kSensorNames[] PROGMEM = D_SENSOR_RA8876_CS "|" D_SENSOR_ST7789_CS "|" D_SENSOR_ST7789_DC "|" D_SENSOR_SSD1331_CS "|" D_SENSOR_SSD1331_DC "|" + D_SENSOR_SDCARD_CS "|" ; const char kSensorNamesFixed[] PROGMEM = @@ -374,12 +376,9 @@ const uint16_t kGpioNiceList[] PROGMEM = { AGPIO(GPIO_RC522_CS), // RC522 Rfid Chip Select AGPIO(GPIO_RC522_RST), // RC522 Rfid Reset #endif -#ifdef USE_DISPLAY -#ifdef USE_DISPLAY_ILI9341 - AGPIO(GPIO_ILI9341_CS), - AGPIO(GPIO_ILI9341_DC), -#endif // USE_DISPLAY_ILI9341 -#endif // USE_DISPLAY +#ifdef USE_SDCARD + 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 @@ -387,6 +386,10 @@ const uint16_t kGpioNiceList[] PROGMEM = { 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), + AGPIO(GPIO_ILI9341_DC), +#endif // USE_DISPLAY_ILI9341 #ifdef USE_DISPLAY_ILI9488 AGPIO(GPIO_ILI9488_CS), #endif // USE_DISPLAY_ILI9488