summaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-08-23 14:11:21 +0700
committerhathach <[email protected]>2018-08-23 14:11:21 +0700
commitd18a9e8759fb168a55a2ded6f1f5b9d7db6ea078 (patch)
treeda682e33448848a793c83d2b542101cb723e13bf /hw
parent5d365193158c9429ca279ab5f8fa4446bcc9663f (diff)
freertos blinky with software timer
Diffstat (limited to 'hw')
-rw-r--r--hw/bsp/pca10056/board_pca10056.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/bsp/pca10056/board_pca10056.c b/hw/bsp/pca10056/board_pca10056.c
index c6815917e..4c67b902a 100644
--- a/hw/bsp/pca10056/board_pca10056.c
+++ b/hw/bsp/pca10056/board_pca10056.c
@@ -59,6 +59,7 @@ uint8_t _button_pins[] = { 11, 12, 24, 25 };
/*------------------------------------------------------------------*/
/* TUSB HAL MILLISECOND
*------------------------------------------------------------------*/
+#if CFG_TUSB_OS == OPT_OS_NONE
volatile uint32_t system_ticks = 0;
void SysTick_Handler (void)
@@ -70,6 +71,7 @@ uint32_t tusb_hal_millis(void)
{
return board_tick2ms(system_ticks);
}
+#endif
/*------------------------------------------------------------------*/
/* BOARD API
@@ -92,9 +94,10 @@ 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
// Tick init
SysTick_Config(SystemCoreClock/1000);
- NVIC_EnableIRQ(SysTick_IRQn);
+#endif
// USB power may already be ready at this time -> no event generated
// We need to invoke the handler based on the status initially