aboutsummaryrefslogtreecommitdiff
path: root/main/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.c')
-rw-r--r--main/main.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/main/main.c b/main/main.c
index 19dd3cd..33912ec 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1,4 +1,5 @@
#include <FreeRTOS.h>
+#include <queue.h>
#include <task.h>
#include <pico/stdlib.h>
@@ -9,6 +10,8 @@
#include "sock.h"
#include "i2c.h"
+QueueHandle_t queue;
+
void blink_task() {
await_init(); // `blink_task` uses GPIO
@@ -23,10 +26,21 @@ void blink_task() {
int main() {
init();
+ // change queue size(?) + queue
+ uint8_t i2cData[2];
+ queue = xQueueCreate(10, sizeof(i2cData));
+
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) 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();
+
+ while(1) {
+ // we should have never gotten here
+ printf("Why are we here?!\n");
+ }
+
+ return 0;
}