aboutsummaryrefslogtreecommitdiff
path: root/main/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/init.c')
-rw-r--r--main/init.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/main/init.c b/main/init.c
index 9297093..1cfec9a 100644
--- a/main/init.c
+++ b/main/init.c
@@ -1,15 +1,13 @@
-#include "config.h"
-#include "init.h"
-#include "drv/rp2040/mod.h"
-
#include <FreeRTOS.h>
#include <task.h>
-#include <event_groups.h>
#include <pico/stdio.h>
#include <pico/cyw43_arch.h>
-EventGroupHandle_t init_complete;
+#include "config.h"
+#include "init.h"
+#include "tasks.h"
+#include "drv/rp2040/mod.h"
static void init_stdio() {
stdio_init_all();
@@ -46,16 +44,13 @@ static void async_init() {
#ifndef CFG_NET_DISABLE
init_wifi();
#endif
-
- xEventGroupSetBits(init_complete, 1);
+ init_tasks();
// delete self
vTaskDelete(NULL);
}
void init() {
- init_complete = xEventGroupCreate();
-
// used for debug `printf` and `panic` on errors
init_stdio();
@@ -63,7 +58,3 @@ void init() {
xTaskCreate((TaskFunction_t) async_init, "init", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 4, NULL);
}
-void await_init() {
- xEventGroupWaitBits(init_complete, 1, pdFALSE, pdFALSE, portMAX_DELAY);
-}
-