mirror of https://github.com/arendst/Tasmota.git
Reverted changes to xdsp_interface and related changes done in 75699fe
This commit is contained in:
parent
728074ccd2
commit
7fe8f117a5
|
@ -147,7 +147,6 @@ struct {
|
|||
bool module_changed; // Indicate module changed since last restart
|
||||
bool wifi_stay_asleep; // Allow sleep only incase of ESP32 BLE
|
||||
bool no_autoexec; // Disable autoexec
|
||||
bool tm1637_enabled; // TM1637 driver enabled
|
||||
|
||||
StateBitfield global_state; // Global states (currently Wifi and Mqtt) (8 bits)
|
||||
uint8_t spi_enabled; // SPI configured
|
||||
|
@ -228,9 +227,7 @@ void setup(void) {
|
|||
TasmotaGlobal.tele_period = 9999;
|
||||
TasmotaGlobal.active_device = 1;
|
||||
TasmotaGlobal.global_state.data = 0xF; // Init global state (wifi_down, mqtt_down) to solve possible network issues
|
||||
#if defined(USE_DISPLAY) && defined(USE_DISPLAY_TM1637)
|
||||
TasmotaGlobal.tm1637_enabled = true;
|
||||
#endif
|
||||
|
||||
RtcRebootLoad();
|
||||
if (!RtcRebootValid()) {
|
||||
RtcReboot.fast_reboot_count = 0;
|
||||
|
|
|
@ -150,7 +150,6 @@ enum UserSelectablePins {
|
|||
GPIO_NEOPOOL_TX, GPIO_NEOPOOL_RX, // Sugar Valley RS485 interface
|
||||
GPIO_SDM72_TX, GPIO_SDM72_RX, // SDM72 Serial interface
|
||||
GPIO_TM1637CLK, GPIO_TM1637DIO, // TM1637 interface
|
||||
GPIO_TM1638CLK, GPIO_TM1638DIO, GPIO_TM1638STB, // TM1638 interface
|
||||
GPIO_PROJECTOR_CTRL_TX, GPIO_PROJECTOR_CTRL_RX, // LCD/DLP Projector Serial Control
|
||||
GPIO_SSD1351_DC,
|
||||
GPIO_XPT2046_CS, // XPT2046 SPI Chip Select
|
||||
|
@ -325,7 +324,6 @@ const char kSensorNames[] PROGMEM =
|
|||
D_SENSOR_NEOPOOL_TX "|" D_SENSOR_NEOPOOL_RX "|"
|
||||
D_SENSOR_SDM72_TX "|" D_SENSOR_SDM72_RX "|"
|
||||
D_SENSOR_TM1637_CLK "|" D_SENSOR_TM1637_DIO "|"
|
||||
D_SENSOR_TM1638_CLK "|" D_SENSOR_TM1638_DIO "|" D_SENSOR_TM1638_STB "|"
|
||||
D_SENSOR_PROJECTOR_CTRL_TX "|" D_SENSOR_PROJECTOR_CTRL_RX "|"
|
||||
D_SENSOR_SSD1351_DC "|"
|
||||
D_SENSOR_XPT2046_CS "|"
|
||||
|
@ -451,9 +449,9 @@ const uint16_t kGpioNiceList[] PROGMEM = {
|
|||
#ifdef USE_DISPLAY_TM1637
|
||||
AGPIO(GPIO_TM1637CLK),
|
||||
AGPIO(GPIO_TM1637DIO),
|
||||
AGPIO(GPIO_TM1638CLK),
|
||||
AGPIO(GPIO_TM1638DIO),
|
||||
AGPIO(GPIO_TM1638STB),
|
||||
AGPIO(GPIO_TM16CLK),
|
||||
AGPIO(GPIO_TM16DIO),
|
||||
AGPIO(GPIO_TM16STB),
|
||||
#endif // USE_DISPLAY_TM1637
|
||||
AGPIO(GPIO_BACKLIGHT), // Display backlight control
|
||||
AGPIO(GPIO_OLED_RESET), // OLED Display Reset
|
||||
|
|
|
@ -2842,7 +2842,7 @@ bool Xdrv13(uint8_t function)
|
|||
{
|
||||
bool result = false;
|
||||
|
||||
if ((TasmotaGlobal.i2c_enabled || TasmotaGlobal.spi_enabled || TasmotaGlobal.soft_spi_enabled || TasmotaGlobal.tm1637_enabled) && XdspPresent()) {
|
||||
if ((TasmotaGlobal.i2c_enabled || TasmotaGlobal.spi_enabled || TasmotaGlobal.soft_spi_enabled) && XdspPresent()) {
|
||||
switch (function) {
|
||||
case FUNC_PRE_INIT:
|
||||
DisplayInitDriver();
|
||||
|
|
|
@ -268,7 +268,7 @@ bool DriverInit(void) {
|
|||
tm1637display->begin(TM1637Data.num_digits, 1);
|
||||
} else if(TM1637Data.display_type == TM1638) {
|
||||
strcpy(TM1637Data.model_name, "TM1638");
|
||||
tm1638display = new TM1638plus(Pin(GPIO_TM1638STB), Pin(GPIO_TM1638CLK), Pin(GPIO_TM1638DIO), true );
|
||||
tm1638display = new TM1638plus(Pin(GPIO_TM16STB), Pin(GPIO_TM16CLK), Pin(GPIO_TM16DIO), true );
|
||||
TM1637Data.num_digits = 8;
|
||||
tm1638display->displayBegin();
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#if defined(USE_I2C) || defined(USE_SPI) || defined(USE_DISPLAY_TM1637)
|
||||
#if defined(USE_I2C) || defined(USE_SPI)
|
||||
#ifdef USE_DISPLAY
|
||||
|
||||
#ifdef XFUNC_PTR_IN_ROM
|
||||
|
@ -26,8 +26,6 @@ bool (* const xdsp_func_ptr[])(uint8_t) PROGMEM = { // Display Function Pointe
|
|||
bool (* const xdsp_func_ptr[])(uint8_t) = { // Display Function Pointers
|
||||
#endif
|
||||
|
||||
#if defined(USE_I2C) || defined(USE_SPI)
|
||||
|
||||
#ifdef XDSP_01
|
||||
&Xdsp01,
|
||||
#endif
|
||||
|
@ -84,18 +82,10 @@ bool (* const xdsp_func_ptr[])(uint8_t) = { // Display Function Pointers
|
|||
&Xdsp14,
|
||||
#endif
|
||||
|
||||
#endif // #if defined(USE_I2C) || defined(USE_SPI)
|
||||
|
||||
#ifdef USE_DISPLAY_TM1637
|
||||
|
||||
#ifdef XDSP_15
|
||||
&Xdsp15,
|
||||
#endif
|
||||
|
||||
#endif // USE_DISPLAY_TM1637
|
||||
|
||||
#if defined(USE_I2C) || defined(USE_SPI)
|
||||
|
||||
#ifdef XDSP_16
|
||||
&Xdsp16,
|
||||
#endif
|
||||
|
@ -163,9 +153,6 @@ bool (* const xdsp_func_ptr[])(uint8_t) = { // Display Function Pointers
|
|||
#ifdef XDSP_32
|
||||
&Xdsp32
|
||||
#endif
|
||||
|
||||
#endif // #if defined(USE_I2C) || defined(USE_SPI)
|
||||
|
||||
};
|
||||
|
||||
const uint8_t xdsp_present = sizeof(xdsp_func_ptr) / sizeof(xdsp_func_ptr[0]); // Number of drivers found
|
||||
|
|
Loading…
Reference in New Issue