1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| | void OS_Application_Startup(void) { } | #include <stdint.h> | #include <osapi.h> | | #define TASK_ID 1 | #define TASK_STACK_SIZE 1024 | #define TASK_PRIORITY 102 | void task(void) {}; | uint32 task_stack[TASK_STACK_SIZE]; | | int main(int argc, char *argv[]) | { | //preamble | OS_API_Init(); | | uint32 task_id = 0; | //init code | OS_TaskCreate(&task_id, "Task", (void *)task, task_stack, TASK_STACK_SIZE, TASK_PRIORITY, 0); | | OS_TaskSetPriority(task_id, 1); //target call | return 0; | } |
|