Skip to content

Commit

Permalink
Create CommandLine task in main.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Cam0Cow committed Sep 30, 2023
1 parent 2e8460c commit b6fd25e
Showing 1 changed file with 32 additions and 14 deletions.
46 changes: 32 additions & 14 deletions Apps/Src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,24 @@ void Task_Init(void *p_arg){
);
assertOSError(OS_MAIN_LOC, err);

// Initialize ReadTritium
OSTaskCreate(
(OS_TCB*)&ReadTritium_TCB,
(CPU_CHAR*)"ReadTritium",
(OS_TASK_PTR)Task_ReadTritium,
(void*)NULL,
(OS_PRIO)TASK_READ_TRITIUM_PRIO,
(CPU_STK*)ReadTritium_Stk,
(CPU_STK_SIZE)WATERMARK_STACK_LIMIT,
(CPU_STK_SIZE)TASK_READ_TRITIUM_STACK_SIZE,
(OS_MSG_QTY)0,
(OS_TICK)0,
(void*)NULL,
(OS_OPT)(OS_OPT_TASK_STK_CLR),
(OS_ERR*)&err
);
assertOSError(OS_MAIN_LOC, err);

// Initialize SendTritium
OSTaskCreate(
(OS_TCB*)&SendTritium_TCB,
Expand Down Expand Up @@ -156,16 +174,16 @@ void Task_Init(void *p_arg){
);
assertOSError(OS_MAIN_LOC, err);

// Initialize ReadTritium
// Initialize SendCarCAN
OSTaskCreate(
(OS_TCB*)&ReadTritium_TCB,
(CPU_CHAR*)"ReadTritium",
(OS_TASK_PTR)Task_ReadTritium,
(OS_TCB*)&SendCarCAN_TCB,
(CPU_CHAR*)"SendCarCAN",
(OS_TASK_PTR)Task_SendCarCAN,
(void*)NULL,
(OS_PRIO)TASK_READ_TRITIUM_PRIO,
(CPU_STK*)ReadTritium_Stk,
(OS_PRIO)TASK_SEND_CAR_CAN_PRIO,
(CPU_STK*)SendCarCAN_Stk,
(CPU_STK_SIZE)WATERMARK_STACK_LIMIT,
(CPU_STK_SIZE)TASK_READ_TRITIUM_STACK_SIZE,
(CPU_STK_SIZE)TASK_SEND_CAR_CAN_STACK_SIZE,
(OS_MSG_QTY)0,
(OS_TICK)0,
(void*)NULL,
Expand All @@ -174,16 +192,16 @@ void Task_Init(void *p_arg){
);
assertOSError(OS_MAIN_LOC, err);

// Initialize SendCarCAN
// Initialize CommandLine
OSTaskCreate(
(OS_TCB*)&SendCarCAN_TCB,
(CPU_CHAR*)"SendCarCAN",
(OS_TASK_PTR)Task_SendCarCAN,
(OS_TCB*)&CommandLine_TCB,
(CPU_CHAR*)"CommandLine",
(OS_TASK_PTR)Task_CommandLine,
(void*)NULL,
(OS_PRIO)TASK_SEND_CAR_CAN_PRIO,
(CPU_STK*)SendCarCAN_Stk,
(OS_PRIO)TASK_COMMAND_LINE_PRIO,
(CPU_STK*)CommandLine_Stk,
(CPU_STK_SIZE)WATERMARK_STACK_LIMIT,
(CPU_STK_SIZE)TASK_SEND_CAR_CAN_STACK_SIZE,
(CPU_STK_SIZE)TASK_COMMAND_LINE_STACK_SIZE,
(OS_MSG_QTY)0,
(OS_TICK)0,
(void*)NULL,
Expand Down

0 comments on commit b6fd25e

Please sign in to comment.