diff options
author | Elwin Hammer <elwinhammer@gmail.com> | 2024-05-29 21:41:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-29 21:41:24 +0200 |
commit | 1f78927e2e399a504368fb9b407de12d06dddcb5 (patch) | |
tree | f80ba30274ca75704075610a39fc28930f7ac4fa /main/main.c | |
parent | d7616546dd5e8ba35c2b1b1ece736bca60e0b990 (diff) | |
parent | 8894d20ff0d1c1dde69879a21e756e01bcfa5262 (diff) |
Merge pull request #11 from lonkaars/masterprot/software-puzzle
Bring software-puzzle up-to-date
Diffstat (limited to 'main/main.c')
-rw-r--r-- | main/main.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/main/main.c b/main/main.c new file mode 100644 index 0000000..19dd3cd --- /dev/null +++ b/main/main.c @@ -0,0 +1,32 @@ +#include <FreeRTOS.h> +#include <task.h> + +#include <pico/stdlib.h> +#include <pico/time.h> + +#include "config.h" +#include "init.h" +#include "sock.h" +#include "i2c.h" + +void blink_task() { + await_init(); // `blink_task` uses GPIO + + while (true) { + cyw43_arch_gpio_put(LED_PIN, 0); + vTaskDelay(250 / portTICK_PERIOD_MS); + cyw43_arch_gpio_put(LED_PIN, 1); + vTaskDelay(250 / portTICK_PERIOD_MS); + } +} + +int main() { + init(); + + xTaskCreate((TaskFunction_t) blink_task, "blink", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 2, NULL); + //xTaskCreate((TaskFunction_t) serve_task, "serve", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 2, NULL); + xTaskCreate((TaskFunction_t) bus_task, "bus", configMINIMAL_STACK_SIZE, NULL, tskIDLE_PRIORITY + 2, NULL); + + vTaskStartScheduler(); +} + |