mirror of https://github.com/arendst/Tasmota.git
Merge pull request #7426 from s-hadinger/rotary_iram
Add LightPowerIRAM() for rotary interrupt handler
This commit is contained in:
commit
07d79f3076
|
@ -43,7 +43,7 @@ void update_rotary(void) ICACHE_RAM_ATTR;
|
|||
void update_rotary(void)
|
||||
{
|
||||
if (MI_DESK_LAMP == my_module_type) {
|
||||
if (LightPower()) {
|
||||
if (LightPowerIRAM()) {
|
||||
/*
|
||||
* https://github.com/PaulStoffregen/Encoder/blob/master/Encoder.h
|
||||
*/
|
||||
|
|
|
@ -277,6 +277,16 @@ power_t LightPower(void)
|
|||
return Light.power; // Make external
|
||||
}
|
||||
|
||||
// IRAM variant for rotary
|
||||
#ifndef ARDUINO_ESP8266_RELEASE_2_3_0 // Fix core 2.5.x ISR not in IRAM Exception
|
||||
power_t LightPowerIRAM(void) ICACHE_RAM_ATTR;
|
||||
#endif // ARDUINO_ESP8266_RELEASE_2_3_0
|
||||
|
||||
power_t LightPowerIRAM(void)
|
||||
{
|
||||
return Light.power; // Make external
|
||||
}
|
||||
|
||||
uint8_t LightDevice(void)
|
||||
{
|
||||
return Light.device; // Make external
|
||||
|
|
Loading…
Reference in New Issue