mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 20:47:08 +03:00
can't shift by more than length - release
This commit is contained in:
@@ -463,7 +463,7 @@ void service_handler(void *arg) {
|
|||||||
xSemaphoreGive(expander->mutex);
|
xSemaphoreGive(expander->mutex);
|
||||||
ESP_LOGD(TAG, "Handling GPIO %d reads 0x%04x and has 0x%04x pending", expander->first, expander->shadow, pending);
|
ESP_LOGD(TAG, "Handling GPIO %d reads 0x%04x and has 0x%04x pending", expander->first, expander->shadow, pending);
|
||||||
|
|
||||||
for (int gpio = 31, clz; pending; pending <<= (clz + 1)) {
|
for (int gpio = 31, clz = 0; pending && clz < 31; pending <<= (clz + 1)) {
|
||||||
clz = __builtin_clz(pending);
|
clz = __builtin_clz(pending);
|
||||||
gpio -= clz;
|
gpio -= clz;
|
||||||
if (expander->isr[gpio].timer) xTimerReset(expander->isr[gpio].timer, 1); // todo 0
|
if (expander->isr[gpio].timer) xTimerReset(expander->isr[gpio].timer, 1); // todo 0
|
||||||
|
|||||||
Reference in New Issue
Block a user