Skip to content

Commit

Permalink
os_freertos: Create task.
Browse files Browse the repository at this point in the history
  • Loading branch information
vifino committed May 19, 2018
1 parent 612bd70 commit 1d36ecb
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/os/os_freertos.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,19 @@
#include <unistd.h>
#include <stdlib.h>

#define STACK_DEPTH 4096
#define TASK_PRIORITY 10

// Main entry point.
int main(int argc, char** argv) {
return sled_main(argc, argv);
static void sled_task(void *pvParameters) {
sled_main(0, NULL);
}

void user_main(void) {
if(xTaskGetSchedulerState() == taskSCHEDULER_NOT_STARTED)
vTaskStartScheduler();

xTaskCreate(&sled_task, "sled", STACK_DEPTH, NULL, 10, NULL);
}

// -- event
Expand Down

0 comments on commit 1d36ecb

Please sign in to comment.