diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-07-26 17:11:23 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-07-26 17:11:23 +1000 |
| commit | 9b1b401dcb986a26d10bcc898be670653acc2d3f (patch) | |
| tree | 697b14553dc75ddaab060406cd62ee4b08f05e9e /src/main/main.cpp | |
| parent | f94be3db2f2bb6c1b359744cb915683095e4ee80 (diff) | |
| download | tangara-fw-9b1b401dcb986a26d10bcc898be670653acc2d3f.tar.gz | |
big cleanup of new encoder + stream buffer types
Diffstat (limited to 'src/main/main.cpp')
| -rw-r--r-- | src/main/main.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
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); |
