From be358b3314ce3fc0dca41d6dce6e6d925f56a768 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Tue, 27 Nov 2018 15:11:10 +0100 Subject: [PATCH] Prep for Software SPI Prep for Software SPI used by some displays --- sonoff/language/bg-BG.h | 5 +++++ sonoff/language/cs-CZ.h | 5 +++++ sonoff/language/de-DE.h | 5 +++++ sonoff/language/el-GR.h | 5 +++++ sonoff/language/en-GB.h | 6 ++++++ sonoff/language/es-AR.h | 5 +++++ sonoff/language/fr-FR.h | 5 +++++ sonoff/language/he-HE.h | 5 +++++ sonoff/language/hu-HU.h | 5 +++++ sonoff/language/it-IT.h | 5 +++++ sonoff/language/nl-NL.h | 5 +++++ sonoff/language/pl-PL.h | 5 +++++ sonoff/language/pt-BR.h | 5 +++++ sonoff/language/pt-PT.h | 5 +++++ sonoff/language/ru-RU.h | 5 +++++ sonoff/language/tr-TR.h | 5 +++++ sonoff/language/uk-UK.h | 5 +++++ sonoff/language/zh-CN.h | 5 +++++ sonoff/language/zh-TW.h | 5 +++++ sonoff/sonoff_template.h | 15 +++++++++++++-- 20 files changed, 109 insertions(+), 2 deletions(-) diff --git a/sonoff/language/bg-BG.h b/sonoff/language/bg-BG.h index 3663dfbae3f6..0707317f5194 100644 --- a/sonoff/language/bg-BG.h +++ b/sonoff/language/bg-BG.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "A" diff --git a/sonoff/language/cs-CZ.h b/sonoff/language/cs-CZ.h index e545ec0a9a8a..49e0991bb326 100644 --- a/sonoff/language/cs-CZ.h +++ b/sonoff/language/cs-CZ.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "A" diff --git a/sonoff/language/de-DE.h b/sonoff/language/de-DE.h index 17acd919487d..e497bcf4513e 100644 --- a/sonoff/language/de-DE.h +++ b/sonoff/language/de-DE.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "A" diff --git a/sonoff/language/el-GR.h b/sonoff/language/el-GR.h index 4a8e84a7a1e1..591c7f414bac 100644 --- a/sonoff/language/el-GR.h +++ b/sonoff/language/el-GR.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "A" diff --git a/sonoff/language/en-GB.h b/sonoff/language/en-GB.h index c276187abbb9..aeb61103dcbb 100644 --- a/sonoff/language/en-GB.h +++ b/sonoff/language/en-GB.h @@ -531,6 +531,12 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" + // Units #define D_UNIT_AMPERE "A" diff --git a/sonoff/language/es-AR.h b/sonoff/language/es-AR.h index 77d835604758..c90a20b09382 100644 --- a/sonoff/language/es-AR.h +++ b/sonoff/language/es-AR.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "A" diff --git a/sonoff/language/fr-FR.h b/sonoff/language/fr-FR.h index 6947bfc54bc5..0936f606931f 100644 --- a/sonoff/language/fr-FR.h +++ b/sonoff/language/fr-FR.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "A" diff --git a/sonoff/language/he-HE.h b/sonoff/language/he-HE.h index e6ef65a08892..ea0e4c6df35e 100644 --- a/sonoff/language/he-HE.h +++ b/sonoff/language/he-HE.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "A" diff --git a/sonoff/language/hu-HU.h b/sonoff/language/hu-HU.h index 81e4e77564e6..0ac020605415 100644 --- a/sonoff/language/hu-HU.h +++ b/sonoff/language/hu-HU.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "A" diff --git a/sonoff/language/it-IT.h b/sonoff/language/it-IT.h index 5cb974df5aee..3dc9d811b0b3 100644 --- a/sonoff/language/it-IT.h +++ b/sonoff/language/it-IT.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "A" diff --git a/sonoff/language/nl-NL.h b/sonoff/language/nl-NL.h index 875bfd9216d3..e288e71960a5 100644 --- a/sonoff/language/nl-NL.h +++ b/sonoff/language/nl-NL.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "A" diff --git a/sonoff/language/pl-PL.h b/sonoff/language/pl-PL.h index e697966e501f..aee1b99a0060 100644 --- a/sonoff/language/pl-PL.h +++ b/sonoff/language/pl-PL.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "A" diff --git a/sonoff/language/pt-BR.h b/sonoff/language/pt-BR.h index 0336bac9a77f..1c94a784d553 100644 --- a/sonoff/language/pt-BR.h +++ b/sonoff/language/pt-BR.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "A" diff --git a/sonoff/language/pt-PT.h b/sonoff/language/pt-PT.h index 7afd0b1bc6b6..5b1f778119f4 100644 --- a/sonoff/language/pt-PT.h +++ b/sonoff/language/pt-PT.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units diff --git a/sonoff/language/ru-RU.h b/sonoff/language/ru-RU.h index bc6383476156..3d470bfddf45 100644 --- a/sonoff/language/ru-RU.h +++ b/sonoff/language/ru-RU.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "А" diff --git a/sonoff/language/tr-TR.h b/sonoff/language/tr-TR.h index f5bf3ed8ff66..fa9a41d181ad 100755 --- a/sonoff/language/tr-TR.h +++ b/sonoff/language/tr-TR.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "A" diff --git a/sonoff/language/uk-UK.h b/sonoff/language/uk-UK.h index c6303e243207..d6bb5e074090 100644 --- a/sonoff/language/uk-UK.h +++ b/sonoff/language/uk-UK.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "А" diff --git a/sonoff/language/zh-CN.h b/sonoff/language/zh-CN.h index 746eb0b864b1..2f18d25814a7 100644 --- a/sonoff/language/zh-CN.h +++ b/sonoff/language/zh-CN.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "安" diff --git a/sonoff/language/zh-TW.h b/sonoff/language/zh-TW.h index a6894dc1e075..0084fa038107 100644 --- a/sonoff/language/zh-TW.h +++ b/sonoff/language/zh-TW.h @@ -531,6 +531,11 @@ #define D_SENSOR_TUYA_RX "Tuya Rx" #define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" #define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" // Units #define D_UNIT_AMPERE "安" diff --git a/sonoff/sonoff_template.h b/sonoff/sonoff_template.h index 5b12a5ded169..1f1cadb09c10 100644 --- a/sonoff/sonoff_template.h +++ b/sonoff/sonoff_template.h @@ -135,6 +135,11 @@ enum UserSelectablePins { GPIO_TUYA_RX, // Tuya Serial interface GPIO_MGC3130_XFER, // MGC3130 Transfer GPIO_MGC3130_RESET, // MGC3130 Reset + GPIO_SSPI_MISO, // Software SPI Master Input Slave Output + GPIO_SSPI_MOSI, // Software SPI Master Output Slave Input + GPIO_SSPI_SCLK, // Software SPI Serial Clock + GPIO_SSPI_CS, // Software SPI Chip Select + GPIO_SSPI_DC, // Software SPI Data or Command GPIO_SENSOR_END }; // Programmer selectable GPIO functionality offset by user selectable GPIOs @@ -193,7 +198,8 @@ const char kSensorNames[] PROGMEM = D_SENSOR_TX20_TX "|" D_SENSOR_RFSEND "|" D_SENSOR_RFRECV "|" D_SENSOR_TUYA_TX "|" D_SENSOR_TUYA_RX "|" - D_SENSOR_MGC3130_XFER "|" D_SENSOR_MGC3130_RESET; + D_SENSOR_MGC3130_XFER "|" D_SENSOR_MGC3130_RESET "|" + D_SENSOR_SSPI_MISO "|" D_SENSOR_SSPI_MOSI "|" D_SENSOR_SSPI_SCLK "|" D_SENSOR_SSPI_CS "|" D_SENSOR_SSPI_DC; /********************************************************************************************/ @@ -349,6 +355,11 @@ const uint8_t kGpioNiceList[] PROGMEM = { #ifdef USE_SPI GPIO_SPI_CS, // SPI Chip Select GPIO_SPI_DC, // SPI Data Direction + GPIO_SSPI_MISO, // Software SPI Master Input Slave Output + GPIO_SSPI_MOSI, // Software SPI Master Output Slave Input + GPIO_SSPI_SCLK, // Software SPI Serial Clock + GPIO_SSPI_CS, // Software SPI Chip Select + GPIO_SSPI_DC, // Software SPI Data or Command #endif #ifdef USE_DISPLAY GPIO_BACKLIGHT, // Display backlight control @@ -1276,7 +1287,7 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { GPIO_REL1, // GPIO15 Relay (0 = Off, 1 = On) 0, 0 }, - { "PS-16-DZ", // PS-16-DZ Dimmer (ESP8266 w/ separate Nuvoton MCU dimmer) + { "PS-16-DZ", // PS-16-DZ Dimmer (ESP8266 w/ separate Nuvoton MCU dimmer) // https://www.aliexpress.com/item/SM-Smart-WIFI-Wall-Dimmer-Light-Switch-US-Ewelink-APP-Remote-Control-Wi-Fi-Wirele-Work/32871151902.html GPIO_USER, GPIO_TXD, // GPIO01 MCU serial control