示例#1
0
int main (void)
{
    // Explicitly set the vector table since the bootloader might not set
    // it to what we expect.
    #if DAPLINK_ROM_BL_SIZE > 0
        SCB->VTOR = SCB_VTOR_TBLOFF_Msk & DAPLINK_ROM_IF_START;
    #endif
    os_sys_init_user(main_task, MAIN_TASK_PRIORITY, stk_main_task, MAIN_TASK_STACK);
}
示例#2
0
osThreadId_t osThreadNew(osThreadFunc_t func, void *argument, const osThreadAttr_t *attr)
{
    OS_TID tid = 0;
    //first task will init the rtx
    if (taskCount == 0) {
        os_sys_init_user((void (*)(void))func, MAIN_TASK_PRIORITY, stk_main_task, MAIN_TASK_STACK);
    }
    else {
        tid = os_tsk_create((void (*)(void))func, MAIN_TASK_PRIORITY+1);
    }
    taskCount++;
    return (osThreadId_t) tid;
}
示例#3
0
// Main Program
int main (void) {
  os_sys_init_user(main_task, MAIN_TASK_PRIORITY, stk_main_task, MAIN_TASK_STACK);
}
示例#4
0
文件: main.c 项目: K-Aadhi/CMSIS-DAP
// Main Program
int main (void) {
  /* Allow the board to do some last initialization before the main task is started */
  board_init();

  os_sys_init_user(main_task, MAIN_TASK_PRIORITY, stk_main_task, MAIN_TASK_STACK);
}