Skip to content

Commit

Permalink
Remove deprecated code from drivers, USE_TTGO_WATCH and `USE_M5STAC…
Browse files Browse the repository at this point in the history
…K_CORE2` (#21533)
  • Loading branch information
s-hadinger committed May 31, 2024
1 parent 90e21a5 commit 0bd5f6b
Show file tree
Hide file tree
Showing 15 changed files with 8 additions and 1,839 deletions.
1 change: 0 additions & 1 deletion BUILDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,6 @@ Note: the `minimal` variant is not listed as it shouldn't be used outside of the
| USE_WEBCAM | | / - | | | | |
| USE_ETHERNET | | / x | | | | |
| USE_I2S_AUDIO | | / - | | | | |
| USE_TTGO_WATCH | | / - | | | | |
| USE_SONOFF_SPM | | / x | | | | |
| USE_DISPLAY_TM1621_SONOFF | | / x | | | | |
| USE_SHELLY_PRO | | / x | | | | |
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ All notable changes to this project will be documented in this file.
- uDisplay Parallel display on Core3 (#21529)

### Removed
- Deprecated code from drivers, `USE_TTGO_WATCH` and `USE_M5STACK_CORE2`

## [14.0.0.3] 20240530
### Changed
Expand Down
64 changes: 0 additions & 64 deletions tasmota/include/tasmota_template.h
Original file line number Diff line number Diff line change
Expand Up @@ -3235,8 +3235,6 @@ enum SupportedModulesESP32 {
ODROID_GO,
ESP32_SOLO,
WT32_ETH01,
TTGO_WATCH,
M5STACK_CORE2,
MAXMODULE };

// Default module settings
Expand All @@ -3254,12 +3252,6 @@ const uint8_t kModuleNiceList[] PROGMEM = {
#ifdef USE_WT32_ETH01
WT32_ETH01,
#endif // USE_WT32_ETH01
#ifdef USE_TTGO_WATCH
// TTGO_WATCH, // To be defined
#endif // USE_TTGO_WATCH
#ifdef USE_M5STACK_CORE2
M5STACK_CORE2,
#endif // USE_M5STACK_CORE2
};

// !!! Update this list in the same order as kModuleNiceList !!!
Expand All @@ -3277,12 +3269,6 @@ const char kModuleNames[] PROGMEM =
#ifdef USE_WT32_ETH01
"WT32-Eth01|"
#endif // USE_WT32_ETH01
#ifdef USE_TTGO_WATCH
// "TTGO Watch|" // To be defined
#endif // USE_TTGO_WATCH
#ifdef USE_M5STACK_CORE2
"M5Stack Core2|"
#endif // USE_M5STACK_CORE2
;

// !!! Update this list in the same order as SupportedModulesESP32 !!!
Expand Down Expand Up @@ -3474,56 +3460,6 @@ const mytmplt kModules[] PROGMEM = {
},
#endif // USE_WT32_ETH01

#ifdef USE_TTGO_WATCH
// { // TTGO Watch (ESP32) - To be defined
// },
#endif // USE_TTGO_WATCH

#ifdef USE_M5STACK_CORE2
{ // M5STACK CORE2 - (ESP32)
AGPIO(GPIO_USER), // 0 (I)O GPIO0, SPKR_LRCK
AGPIO(GPIO_USER), // 1 IO TXD0 GPIO1, U0TXD
AGPIO(GPIO_USER), // 2 IO GPIO2, SPKR_DATA
AGPIO(GPIO_USER), // 3 IO RXD0 GPIO3, U0RXD
AGPIO(GPIO_SDCARD_CS), // 4 IO GPIO4, SPI_CS_CARD
AGPIO(GPIO_ILI9341_CS), // 5 IO GPIO5, SPI_CS_LCD
// 6 IO Remapped to 28
// 7 IO Remapped to 29
// 8 IO Remapped to 30
0, // 9 IO GPIO9, Flash D2, PSRAM_D3
0, // 10 IO GPIO10, Flash D3, PSRAM_D2
// 11 IO Remapped to 31
0, // 12 (I)O GPIO12, SPKR_CLK
AGPIO(GPIO_USER), // 13 IO GPIO13, ADC2_CH4, TOUCH4, RTC_GPIO14, MTCK, HSPID, HS2_DATA3, SD_DATA3, EMAC_RX_ER
AGPIO(GPIO_USER), // 14 IO GPIO14, ADC2_CH6, TOUCH6, RTC_GPIO16, MTMS, HSPICLK, HS2_CLK, SD_CLK, EMAC_TXD2
AGPIO(GPIO_ILI9341_DC), // 15 (I)O GPIO15, SPI_DC_LCD
0, // 16 IO GPIO16, PSRAM_CS
0, // 17 IO GPIO17, PSRAM_CLK
AGPIO(GPIO_SPI_CLK), // 18 IO GPIO18, SPI_CLK
AGPIO(GPIO_USER), // 19 IO GPIO19, VSPIQ, U0CTS, EMAC_TXD0
0, // 20
0, // 21 IO GPIO21, I2C_SDA_INTERNAL
0, // 22 IO LED GPIO22, I2C_SCL_INTERNAL
AGPIO(GPIO_SPI_MOSI), // 23 IO GPIO23, SPI_MOSI
0, // 24
AGPIO(GPIO_USER), // 25 IO GPIO25, DAC_1, ADC2_CH8, RTC_GPIO6, EMAC_RXD0
AGPIO(GPIO_USER), // 26 IO GPIO26, DAC_2, ADC2_CH9, RTC_GPIO7, EMAC_RXD1
AGPIO(GPIO_USER), // 27 IO GPIO27, ADC2_CH7, TOUCH7, RTC_GPIO17, EMAC_RX_DV
0, // 6 IO GPIO6, Flash CLK
0, // 7 IO GPIO7, Flash D0
0, // 8 IO GPIO8, Flash D1
0, // 11 IO GPIO11, Flash CMD
AGPIO(GPIO_I2C_SDA), // 32 IO GPIO32, I2C_SDA
AGPIO(GPIO_I2C_SCL), // 33 IO GPIO33, I2C_SCL
AGPIO(GPIO_USER), // 34 I NO PULLUP GPIO34, ADC1_CH6, RTC_GPIO4
AGPIO(GPIO_USER), // 35 I NO PULLUP GPIO35, ADC1_CH7, RTC_GPIO5
AGPIO(GPIO_USER), // 36 I NO PULLUP GPIO36, SENSOR_VP, ADC_H, ADC1_CH0, RTC_GPIO0
0, // 37 NO PULLUP
AGPIO(GPIO_SPI_MISO), // 38 NO PULLUP GPIO38, SPI_MISO
0, // 39 I NO PULLUP GPIO39, INT_TOUCHPAD
0 // Flag
}
#endif // USE_M5STACK_CORE2
};

/*********************************************************************************************\
Expand Down
6 changes: 3 additions & 3 deletions tasmota/tasmota_support/support_features.ino
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,9 @@ constexpr uint32_t feature[] = {
#if defined(USE_I2C) && defined(USE_EZOPH)
0x10000000 | // xsns_78_ezoph.ino
#endif
#if defined(ESP32) && defined(USE_TTGO_WATCH)
0x20000000 | // xdrv_83_esp32watch.ino
#endif
// #if defined(ESP32) && defined(USE_TTGO_WATCH)
// 0x20000000 | // xdrv_83_esp32watch.ino
// #endif
#if defined(ESP32) && defined(USE_ETHERNET)
0x40000000 | // xdrv_82_ethernet.ino
#endif
Expand Down
2 changes: 1 addition & 1 deletion tasmota/tasmota_xdrv_driver/xdrv_42_3_i2s_saytime.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#if (defined(USE_I2S_AUDIO) || defined(USE_TTGO_WATCH) || defined(USE_M5STACK_CORE2) || defined(ESP32S3_BOX))
#if (defined(USE_I2S_AUDIO) || defined(ESP32S3_BOX))
#ifdef USE_I2S_SAY_TIME
long timezone = 2;
byte daysavetime = 1;
Expand Down
2 changes: 1 addition & 1 deletion tasmota/tasmota_xdrv_driver/xdrv_42_6_i2s_rtttl.ino
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#if (defined(USE_I2S_AUDIO) || defined(USE_TTGO_WATCH) || defined(USE_M5STACK_CORE2) || defined(ESP32S3_BOX))
#if (defined(USE_I2S_AUDIO) || defined(ESP32S3_BOX))
#ifdef USE_I2S_RTTTL
#include "AudioFileSourcePROGMEM.h"
#include "AudioGeneratorRTTTL.h"
Expand Down
37 changes: 0 additions & 37 deletions tasmota/tasmota_xdrv_driver/xdrv_55_touch.ino
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@ uint32_t Touch_Status(int32_t sel) {
}
}

#ifdef USE_M5STACK_CORE2
uint8_t tbstate[3];
#endif // USE_M5STACK_CORE2


// simple resistive touch pins
// with dma it should check for active transfers
// so currently dont use dma
Expand Down Expand Up @@ -447,27 +442,6 @@ void Touch_Check(void(*rotconvert)(int16_t *x, int16_t *y)) {

if (TSGlobal.touched) {
was_touched = true;
#ifdef USE_TOUCH_BUTTONS
#ifdef USE_M5STACK_CORE2
// handle 3 built in touch buttons
uint16_t xcenter = 80;
#define TDELTA 30
#define TYPOS 275
for (uint32_t tbut = 0; tbut < 3; tbut++) {
if (TSGlobal.touch_xp > (xcenter - TDELTA) && TSGlobal.touch_xp < (xcenter + TDELTA) && TSGlobal.touch_yp > (TYPOS - TDELTA) && TSGlobal.touch_yp < (TYPOS + TDELTA)) {
// hit a button
if (!(tbstate[tbut] & 1)) {
// pressed
tbstate[tbut] |= 1;
//AddLog(LOG_LEVEL_INFO, PSTR("tbut: %d pressed"), tbut);
Touch_MQTT(tbut, "BIB", tbstate[tbut] & 1);
}
}
xcenter += 100;
}
#endif // USE_M5STACK_CORE2
#endif // USE_TOUCH_BUTTONS

rotconvert(&TSGlobal.touch_xp, &TSGlobal.touch_yp);
AddLog(LOG_LEVEL_DEBUG_MORE, "TS : touched x=%i y=%i gest=0x%02x (raw x=%i y=%i)", TSGlobal.touch_xp, TSGlobal.touch_yp, TSGlobal.gesture, TSGlobal.raw_touch_xp, TSGlobal.raw_touch_yp);

Expand All @@ -476,17 +450,6 @@ void Touch_Check(void(*rotconvert)(int16_t *x, int16_t *y)) {
#endif // USE_TOUCH_BUTTONS

} else {
#ifdef USE_M5STACK_CORE2
for (uint32_t tbut = 0; tbut < 3; tbut++) {
if (tbstate[tbut] & 1) {
// released
tbstate[tbut] &= 0xfe;
Touch_MQTT(tbut, "BIB", tbstate[tbut] & 1);
//AddLog(LOG_LEVEL_INFO, PSTR("tbut: %d released"), tbut);
}
}
#endif // USE_M5STACK_CORE2

rotconvert(&TSGlobal.touch_xp, &TSGlobal.touch_yp); // still do rot convert if not TSGlobal.touched
if (was_touched) {
AddLog(LOG_LEVEL_DEBUG_MORE, "TS : released x=%i y=%i (raw x=%i y=%i)", TSGlobal.touch_xp, TSGlobal.touch_yp, TSGlobal.raw_touch_xp, TSGlobal.raw_touch_yp);
Expand Down
Loading

0 comments on commit 0bd5f6b

Please sign in to comment.