mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-24 03:06:33 +00:00
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)
|
void update_rotary(void)
|
||||||
{
|
{
|
||||||
if (MI_DESK_LAMP == my_module_type) {
|
if (MI_DESK_LAMP == my_module_type) {
|
||||||
if (LightPower()) {
|
if (LightPowerIRAM()) {
|
||||||
/*
|
/*
|
||||||
* https://github.com/PaulStoffregen/Encoder/blob/master/Encoder.h
|
* https://github.com/PaulStoffregen/Encoder/blob/master/Encoder.h
|
||||||
*/
|
*/
|
||||||
|
@ -277,6 +277,16 @@ power_t LightPower(void)
|
|||||||
return Light.power; // Make external
|
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)
|
uint8_t LightDevice(void)
|
||||||
{
|
{
|
||||||
return Light.device; // Make external
|
return Light.device; // Make external
|
||||||
|
Loading…
x
Reference in New Issue
Block a user