From 9b1b401dcb986a26d10bcc898be670653acc2d3f Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 26 Jul 2023 17:11:23 +1000 Subject: big cleanup of new encoder + stream buffer types --- src/main/main.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/main') diff --git a/src/main/main.cpp b/src/main/main.cpp index d283b01d..685e1fc1 100644 --- a/src/main/main.cpp +++ b/src/main/main.cpp @@ -20,6 +20,10 @@ extern "C" void app_main(void) { ESP_ERROR_CHECK(drivers::init_i2c()); drivers::Gpios* gpios = system_fsm::SystemState::early_init_gpios(); + // Semaphores must be empty before being added to a queue set. Hence all this + // weird early init stuff; by being explicit about initialisation order, we're + // able to handle GPIO ISR notifcations + system events from the same task, + // and a little mess with worth not needing to allocate a whole extra stack. QueueSetHandle_t set = xQueueCreateSet(2); auto* event_queue = events::queues::SystemAndAudio(); xQueueAddToSet(event_queue->has_events(), set); -- cgit v1.2.3