From 02179f57846b06b2bc8ef8039a9034cbd2e7e25b Mon Sep 17 00:00:00 2001
From: Serge Bazanski <q3k@q3k.org>
Date: Wed, 28 Jun 2023 00:44:26 +0200
Subject: [PATCH] st3m: initialize bl00mbox

---
 components/badge23/espan.c           | 4 ----
 components/st3m/st3m_board_startup.c | 3 +++
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/components/badge23/espan.c b/components/badge23/espan.c
index 2c76126584..d13e2bb8b2 100644
--- a/components/badge23/espan.c
+++ b/components/badge23/espan.c
@@ -1,8 +1,6 @@
 #include "badge23/captouch.h"
 #include "badge23/spio.h"
 #include "flow3r_bsp.h"
-#include "st3m_audio.h"
-#include "bl00mbox.h"
 
 #include "esp_log.h"
 #include "freertos/FreeRTOS.h"
@@ -28,8 +26,6 @@ void badge23_main(void)
     init_buttons();
     captouch_init();
     spio_badge_link_disable(255);
-    st3m_audio_set_player_function(bl00mbox_player_function);
-
     captouch_force_calibration();
 
     xTaskCreatePinnedToCore(&io_fast_task, "iofast", 4096, NULL, configMAX_PRIORITIES-1, NULL, 0);
diff --git a/components/st3m/st3m_board_startup.c b/components/st3m/st3m_board_startup.c
index f5c4bdb19d..cff1f282ab 100644
--- a/components/st3m/st3m_board_startup.c
+++ b/components/st3m/st3m_board_startup.c
@@ -4,6 +4,8 @@
 #include "st3m_scope.h"
 #include "st3m_leds.h"
 
+#include "bl00mbox.h"
+
 #include "flow3r_bsp.h"
 
 // Declared by badge23 codebase. To be removed and slurped up into st3m.
@@ -25,6 +27,7 @@ void st3m_board_startup(void) {
     st3m_fs_init();
     st3m_scope_init();
     st3m_audio_init();
+    st3m_audio_set_player_function(bl00mbox_player_function);
     st3m_leds_init();
 
     // Handoff to badge23.
-- 
GitLab