remove tusb_hal_millis() usage, less work for porting

This commit is contained in:
hathach
2019-03-24 01:19:32 +07:00
parent 29e075b8b9
commit 18f248b142
36 changed files with 71 additions and 244 deletions
+2 -9
View File
@@ -36,8 +36,6 @@
#include "nrf_soc.h"
#endif
#include "tusb.h"
/*------------------------------------------------------------------*/
/* MACRO TYPEDEF CONSTANT ENUM
*------------------------------------------------------------------*/
@@ -52,7 +50,7 @@ uint8_t _button_pins[] = { 11, 12, 24, 25 };
/*------------------------------------------------------------------*/
/* TUSB HAL MILLISECOND
*------------------------------------------------------------------*/
#if CFG_TUSB_OS == OPT_OS_NONE
#if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0;
void SysTick_Handler (void)
@@ -60,11 +58,6 @@ void SysTick_Handler (void)
system_ticks++;
}
uint32_t tusb_hal_millis(void)
{
return board_tick2ms(system_ticks);
}
uint32_t board_millis(void)
{
return system_ticks;
@@ -93,7 +86,7 @@ void board_init(void)
// Button
for(uint8_t i=0; i<BOARD_BUTTON_COUNT; i++) nrf_gpio_cfg_input(_button_pins[i], NRF_GPIO_PIN_PULLUP);
#if CFG_TUSB_OS == OPT_OS_NONE
#if CFG_TUSB_OS == OPT_OS_NONE
// 1ms tick timer
SysTick_Config(SystemCoreClock/1000);
#endif