add board_noos_millis() for blinky

This commit is contained in:
hathach
2019-03-23 16:51:07 +07:00
parent 43eb1a8b16
commit df1aac44b8
15 changed files with 110 additions and 20 deletions

View File

@@ -87,6 +87,14 @@ void board_init(void)
SysTick_Config(SystemCoreClock / BOARD_TICKS_HZ); // 1 msec tick timer
#endif
#if CFG_TUSB_OS == OPT_OS_NONE
// 1ms tick timer
SysTick_Config(SystemCoreClock / 1000);
#elif CFG_TUSB_OS == OPT_OS_FREERTOS
// If freeRTOS is used, IRQ priority is limit by max syscall ( smaller is higher )
NVIC_SetPriority(USB0_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY );
#endif
Chip_GPIO_Init(LPC_GPIO_PORT);
//------------- LED -------------//
@@ -119,6 +127,11 @@ uint32_t tusb_hal_millis(void)
return board_tick2ms(system_ticks);
}
uint32_t board_noos_millis(void)
{
return system_ticks;
}
#endif
//--------------------------------------------------------------------+