Disable reset pins from core

Disable reset pins from core. Works with core below 2.5.0 and 2.6.3 + e64cb619f (or current STAGE). Should stop relay toggling at restart.
This commit is contained in:
Theo Arends 2020-03-22 16:18:48 +01:00
parent 770497729a
commit 752fad8b19
3 changed files with 24 additions and 0 deletions

View File

@ -196,6 +196,7 @@ void initPins(void) {
U0IE = 0;
U1IE = 0;
/*
for (int i = 0; i <= 5; ++i) {
pinMode(i, INPUT);
}
@ -203,6 +204,7 @@ void initPins(void) {
for (int i = 12; i <= 16; ++i) {
pinMode(i, INPUT);
}
*/
ETS_GPIO_INTR_ATTACH(interrupt_handler, &interrupt_reg);
ETS_GPIO_INTR_ENABLE();

View File

@ -155,3 +155,24 @@ void* memmove_P(void *dest, const void *src, size_t n)
}
#endif // ARDUINO_ESP8266_RELEASE < 2_6_0
/*********************************************************************************************\
* Core overrides
\*********************************************************************************************/
// Add below line to tasmota_post.h
// extern "C" void resetPins();
void resetPins()
{
/*
for (int i = 0; i <= 5; ++i) {
pinMode(i, INPUT);
}
// pins 6-11 are used for the SPI flash interface
for (int i = 12; i <= 16; ++i) {
pinMode(i, INPUT);
}
*/
}

View File

@ -41,6 +41,7 @@ void KNX_CB_Action(message_t const &msg, void *arg);
void DomoticzTempHumPressureSensor(float temp, float hum, float baro = -1);
char* ToHex_P(const unsigned char * in, size_t insz, char * out, size_t outsz, char inbetween = '\0');
extern "C" void custom_crash_callback(struct rst_info * rst_info, uint32_t stack, uint32_t stack_end);
extern "C" void resetPins();
/*********************************************************************************************\
* Default global defines