diff --git a/lib/default/TasmotaSerial-3.3.0/src/TasmotaSerial.cpp b/lib/default/TasmotaSerial-3.3.0/src/TasmotaSerial.cpp index 22c42b8a9..0ea060517 100644 --- a/lib/default/TasmotaSerial-3.3.0/src/TasmotaSerial.cpp +++ b/lib/default/TasmotaSerial-3.3.0/src/TasmotaSerial.cpp @@ -29,7 +29,7 @@ extern "C" { #ifdef ESP8266 -void ICACHE_RAM_ATTR callRxRead(void *self) { ((TasmotaSerial*)self)->rxRead(); }; +void IRAM_ATTR callRxRead(void *self) { ((TasmotaSerial*)self)->rxRead(); }; // As the Arduino attachInterrupt has no parameter, lists of objects // and callbacks corresponding to each possible GPIO pins have to be defined @@ -260,7 +260,7 @@ int TasmotaSerial::available(void) { #define TM_SERIAL_WAIT_RCV { while (ESP.getCycleCount() < (wait + start)); wait += m_bit_time; } #define TM_SERIAL_WAIT_RCV_LOOP { while (ESP.getCycleCount() < (wait + start)); } -void ICACHE_RAM_ATTR TasmotaSerial::_fast_write(uint8_t b) { +void IRAM_ATTR TasmotaSerial::_fast_write(uint8_t b) { uint32_t wait = m_bit_time; uint32_t start = ESP.getCycleCount(); // Start bit; @@ -316,7 +316,7 @@ size_t TasmotaSerial::write(uint8_t b) { } } -void ICACHE_RAM_ATTR TasmotaSerial::rxRead(void) { +void IRAM_ATTR TasmotaSerial::rxRead(void) { if (!m_nwmode) { int32_t loop_read = m_very_high_speed ? serial_buffer_size : 1; // Advance the starting point for the samples but compensate for the diff --git a/tasmota/support.ino b/tasmota/support.ino index 63ebc371e..9b210f4d7 100644 --- a/tasmota/support.ino +++ b/tasmota/support.ino @@ -35,7 +35,7 @@ static unsigned long oswatch_last_loop_time; uint8_t oswatch_blocked_loop = 0; #ifndef USE_WS2812_DMA // Collides with Neopixelbus but solves exception -//void OsWatchTicker() ICACHE_RAM_ATTR; +//void OsWatchTicker() IRAM_ATTR; #endif // USE_WS2812_DMA #ifdef USE_KNX @@ -1320,8 +1320,8 @@ void DumpConvertTable(void) { */ #endif // ESP8266 -int ICACHE_RAM_ATTR Pin(uint32_t gpio, uint32_t index = 0); -int ICACHE_RAM_ATTR Pin(uint32_t gpio, uint32_t index) { +int IRAM_ATTR Pin(uint32_t gpio, uint32_t index = 0); +int IRAM_ATTR Pin(uint32_t gpio, uint32_t index) { uint16_t real_gpio = gpio << 5; uint16_t mask = 0xFFE0; if (index < GPIO_ANY) { diff --git a/tasmota/support_rotary.ino b/tasmota/support_rotary.ino index 06ca99f7c..fa17867c2 100644 --- a/tasmota/support_rotary.ino +++ b/tasmota/support_rotary.ino @@ -104,7 +104,7 @@ bool RotaryButtonPressed(uint32_t button_index) { return false; } -void ICACHE_RAM_ATTR RotaryIsrArgMiDesk(void *arg) { +void IRAM_ATTR RotaryIsrArgMiDesk(void *arg) { tEncoder* encoder = static_cast(arg); // https://github.com/PaulStoffregen/Encoder/blob/master/Encoder.h @@ -115,7 +115,7 @@ void ICACHE_RAM_ATTR RotaryIsrArgMiDesk(void *arg) { encoder->state = (state >> 2); } -void ICACHE_RAM_ATTR RotaryIsrArg(void *arg) { +void IRAM_ATTR RotaryIsrArg(void *arg) { tEncoder* encoder = static_cast(arg); // Theo Arends diff --git a/tasmota/support_tasmota.ino b/tasmota/support_tasmota.ino index 7262cc253..98e8a4134 100644 --- a/tasmota/support_tasmota.ino +++ b/tasmota/support_tasmota.ino @@ -194,7 +194,7 @@ void ZeroCrossMomentEnd(void) { #endif } -void ICACHE_RAM_ATTR ZeroCrossIsr(void) { +void IRAM_ATTR ZeroCrossIsr(void) { uint32_t time = micros(); TasmotaGlobal.zc_interval = ((int32_t) (time - TasmotaGlobal.zc_time)); TasmotaGlobal.zc_time = time; diff --git a/tasmota/xdrv_10_scripter.ino b/tasmota/xdrv_10_scripter.ino index 042478b07..e5d617521 100755 --- a/tasmota/xdrv_10_scripter.ino +++ b/tasmota/xdrv_10_scripter.ino @@ -1345,7 +1345,7 @@ uint8_t pt_pin; #define MPT_DEBOUNCE 10 -void ICACHE_RAM_ATTR MP_Timer(void) { +void IRAM_ATTR MP_Timer(void) { uint32_t level = digitalRead(pt_pin&0x3f); uint32_t ms = millis(); uint32_t time; diff --git a/tasmota/xdrv_26_ariluxrf.ino b/tasmota/xdrv_26_ariluxrf.ino index 0246e6a8f..da0913540 100644 --- a/tasmota/xdrv_26_ariluxrf.ino +++ b/tasmota/xdrv_26_ariluxrf.ino @@ -46,7 +46,7 @@ struct ARILUX { } Arilux; #ifndef USE_WS2812_DMA // Collides with Neopixelbus but solves RF misses -void AriluxRfInterrupt(void) ICACHE_RAM_ATTR; // As iram is tight and it works this way too +void AriluxRfInterrupt(void) IRAM_ATTR; // As iram is tight and it works this way too #endif // USE_WS2812_DMA void AriluxRfInterrupt(void) diff --git a/tasmota/xdrv_47_ftc532.ino b/tasmota/xdrv_47_ftc532.ino index a5c8fd384..2e1e26ac7 100644 --- a/tasmota/xdrv_47_ftc532.ino +++ b/tasmota/xdrv_47_ftc532.ino @@ -119,7 +119,7 @@ struct FTC532 { const char ftc532_json[] PROGMEM = "\"FTC532\":{\"KEYS\":\""; -void ICACHE_RAM_ATTR ftc532_ISR(void) { // Hardware interrupt routine, triggers on rising edge +void IRAM_ATTR ftc532_ISR(void) { // Hardware interrupt routine, triggers on rising edge uint32_t time = micros(); uint32_t time_diff = time - Ftc532.rxtime; Ftc532.rxtime = time; diff --git a/tasmota/xnrg_01_hlw8012.ino b/tasmota/xnrg_01_hlw8012.ino index ff6b40bf5..4f83c8e19 100644 --- a/tasmota/xnrg_01_hlw8012.ino +++ b/tasmota/xnrg_01_hlw8012.ino @@ -73,8 +73,8 @@ struct HLW { // Fix core 2.5.x ISR not in IRAM Exception #ifndef USE_WS2812_DMA // Collides with Neopixelbus but solves exception -void HlwCfInterrupt(void) ICACHE_RAM_ATTR; -void HlwCf1Interrupt(void) ICACHE_RAM_ATTR; +void HlwCfInterrupt(void) IRAM_ATTR; +void HlwCf1Interrupt(void) IRAM_ATTR; #endif // USE_WS2812_DMA void HlwCfInterrupt(void) // Service Power diff --git a/tasmota/xsns_01_counter.ino b/tasmota/xsns_01_counter.ino index ef3b13e4c..e9fce6ef9 100644 --- a/tasmota/xsns_01_counter.ino +++ b/tasmota/xsns_01_counter.ino @@ -61,7 +61,7 @@ struct AC_ZERO_CROSS_DIMMER { } ac_zero_cross_dimmer; #endif -void ICACHE_RAM_ATTR CounterIsrArg(void *arg) { +void IRAM_ATTR CounterIsrArg(void *arg) { uint32_t index = *static_cast(arg); uint32_t time = micros(); diff --git a/tasmota/xsns_35_tx20.ino b/tasmota/xsns_35_tx20.ino index 87c707350..11ea71da8 100644 --- a/tasmota/xsns_35_tx20.ino +++ b/tasmota/xsns_35_tx20.ino @@ -150,7 +150,7 @@ uint32_t tx2x_last_available = 0; uint32_t tx23_stage = 0; #endif // USE_TX23_WIND_SENSOR -void ICACHE_RAM_ATTR TX2xStartRead(void) +void IRAM_ATTR TX2xStartRead(void) { /** * La Crosse TX20 Anemometer datagram every 2 seconds diff --git a/tasmota/xsns_53_sml.ino b/tasmota/xsns_53_sml.ino index 0a300b96f..c29cd29a5 100755 --- a/tasmota/xsns_53_sml.ino +++ b/tasmota/xsns_53_sml.ino @@ -2114,7 +2114,7 @@ struct SML_COUNTER { uint8_t sml_counter_pinstate; uint8_t sml_cnt_index[MAX_COUNTERS] = { 0, 1, 2, 3 }; -void ICACHE_RAM_ATTR SML_CounterIsr(void *arg) { +void IRAM_ATTR SML_CounterIsr(void *arg) { uint32_t index = *static_cast(arg); uint32_t time = micros(); diff --git a/tasmota/xsns_67_as3935.ino b/tasmota/xsns_67_as3935.ino index 33b333352..5a74537b4 100644 --- a/tasmota/xsns_67_as3935.ino +++ b/tasmota/xsns_67_as3935.ino @@ -150,7 +150,7 @@ struct { volatile uint32_t pulse = 0; } as3935_sensor; -void ICACHE_RAM_ATTR AS3935Isr(void) { +void IRAM_ATTR AS3935Isr(void) { as3935_sensor.detected = true; as3935_sensor.icount++; } @@ -176,7 +176,7 @@ void AS3935WriteRegister(uint8_t reg, uint8_t mask, uint8_t shift, uint8_t data) /********************************************************************************************/ // Autotune Caps -void ICACHE_RAM_ATTR AS3935CountFreq(void) { +void IRAM_ATTR AS3935CountFreq(void) { if (as3935_sensor.dispLCO) as3935_sensor.pulse++; } diff --git a/tasmota/xsns_68_windmeter.ino b/tasmota/xsns_68_windmeter.ino index 758a176ab..43122f20a 100644 --- a/tasmota/xsns_68_windmeter.ino +++ b/tasmota/xsns_68_windmeter.ino @@ -72,7 +72,7 @@ struct WINDMETER { #endif // USE_WINDMETER_NOSTATISTICS } WindMeter; -void ICACHE_RAM_ATTR WindMeterUpdateSpeed(void) +void IRAM_ATTR WindMeterUpdateSpeed(void) { uint32_t time = micros(); uint32_t time_diff = time - WindMeter.counter_time; diff --git a/tasmota/xsns_69_opentherm.ino b/tasmota/xsns_69_opentherm.ino index 1f8bd1609..0d0cec710 100644 --- a/tasmota/xsns_69_opentherm.ino +++ b/tasmota/xsns_69_opentherm.ino @@ -157,7 +157,7 @@ void sns_opentherm_init_boiler_status() sns_ot_boiler_status.m_boiler_temperature_read = 0; } -void ICACHE_RAM_ATTR sns_opentherm_handleInterrupt() +void IRAM_ATTR sns_opentherm_handleInterrupt() { sns_ot_master->handleInterrupt(); } diff --git a/tasmota/xsns_74_lmt01.ino b/tasmota/xsns_74_lmt01.ino index cce7288db..fe3dbb383 100644 --- a/tasmota/xsns_74_lmt01.ino +++ b/tasmota/xsns_74_lmt01.ino @@ -42,7 +42,7 @@ void LMT01_Init(void) { volatile int lmt01_pulseCount = 0; -void ICACHE_RAM_ATTR LMT01_countPulse(void) { +void IRAM_ATTR LMT01_countPulse(void) { lmt01_pulseCount++; } diff --git a/tasmota/xsns_82_wiegand.ino b/tasmota/xsns_82_wiegand.ino index 0a8edb76a..59b47f375 100644 --- a/tasmota/xsns_82_wiegand.ino +++ b/tasmota/xsns_82_wiegand.ino @@ -147,22 +147,22 @@ volatile int Wiegand::currentFoundRFIDcount; -void ICACHE_RAM_ATTR Wiegand::ClearRFIDBuffer(int endIndex = WIEGAND_RFID_ARRAY_SIZE) { +void IRAM_ATTR Wiegand::ClearRFIDBuffer(int endIndex = WIEGAND_RFID_ARRAY_SIZE) { currentFoundRFIDcount=WIEGAND_RFID_ARRAY_SIZE-endIndex; // clear all buffers for (int i= 0; i < endIndex; i++) { rfid_found[i].RFID=0; rfid_found[i].bitCount=0; } } -void ICACHE_RAM_ATTR Wiegand::handleD1Interrupt() { // Receive a 1 bit. (D0=high & D1=low) +void IRAM_ATTR Wiegand::handleD1Interrupt() { // Receive a 1 bit. (D0=high & D1=low) handleDxInterrupt(1); } -void ICACHE_RAM_ATTR Wiegand::handleD0Interrupt() { // Receive a 0 bit. (D0=low & D1=high) +void IRAM_ATTR Wiegand::handleD0Interrupt() { // Receive a 0 bit. (D0=low & D1=high) handleDxInterrupt(0); } -void ICACHE_RAM_ATTR Wiegand::handleDxInterrupt(int in) { +void IRAM_ATTR Wiegand::handleDxInterrupt(int in) { unsigned long curTime = micros(); // to be sure I will use micros() instead of millis() overflow is handle by using the minus operator to compare unsigned long diffTime= curTime - lastFoundTime; if ( (diffTime > CodeGapTime) && (bitCount > 0)) {