mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-29 09:07:17 -04:00
Move message handling loops to MessageQueue.
This commit is contained in:
parent
eb294c8e1c
commit
bf348cf30a
3 changed files with 14 additions and 8 deletions
|
@ -134,10 +134,9 @@ void EventDispatcher::dispatch(const eventmask_t events) {
|
|||
}
|
||||
|
||||
void EventDispatcher::handle_application_queue() {
|
||||
std::array<uint8_t, Message::MAX_SIZE> message_buffer;
|
||||
while(Message* const message = shared_memory.application_queue.pop(message_buffer)) {
|
||||
shared_memory.application_queue.handle([](Message* const message) {
|
||||
message_map().send(message);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void EventDispatcher::handle_rtc_tick() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue