~aleteoryx/muditaos

6888e44c329cee239730f0caa00ec907e3e22053 — Tigran Soghbatyan 4 years ago 3a9d409
[BH-1025] Fix timer callbacks in switches

Make queue calls from timer callbacks non "FromISR"
1 files changed, 3 insertions(+), 3 deletions(-)

M module-bsp/board/rt1051/bellpx/bsp/switches/switches.cpp
M module-bsp/board/rt1051/bellpx/bsp/switches/switches.cpp => module-bsp/board/rt1051/bellpx/bsp/switches/switches.cpp +3 -3
@@ 126,7 126,7 @@ namespace bsp::bell_switches
                    latchEventFlag.setPressed();
                }
                auto val = static_cast<std::uint16_t>(timerState->notificationSource);
                xQueueSendFromISR(qHandleIrq, &val, &xHigherPriorityTaskWoken);
                xQueueSend(qHandleIrq, &val, 0);
                timerState->lastState = KeyEvents::Released;
            }
            else {


@@ 153,7 153,7 @@ namespace bsp::bell_switches
                default:
                    break;
                }
                xQueueSendFromISR(qHandleIrq, &val, &xHigherPriorityTaskWoken);
                xQueueSend(qHandleIrq, &val, 0);
                timerState->lastState = KeyEvents::Pressed;
            }
        }


@@ 173,7 173,7 @@ namespace bsp::bell_switches
            }
            else {
                auto val = static_cast<std::uint16_t>(timerState->notificationSource);
                xQueueSendFromISR(qHandleIrq, &val, &xHigherPriorityTaskWoken);
                xQueueSend(qHandleIrq, &val, 0);
            }
        }