diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-09 10:23:15 +0200 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-06-09 10:23:15 +0200 |
commit | f6ac5839b6b54713126d430d8a037138d6619dce (patch) | |
tree | 4ff12033575cdf17787f4ccd91e93222df93b20f /main/init.c | |
parent | 228f50b8cb0e2bbd579cc8ae4f0a08e6d34af66e (diff) |
clean up init functions
Diffstat (limited to 'main/init.c')
-rw-r--r-- | main/init.c | 19 |
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); -} - |