mirror of https://github.com/ARMmbed/mbed-os.git
commit
9f98d39d1f
|
@ -28,8 +28,19 @@ const ticker_info_t* us_ticker_get_info()
|
|||
|
||||
static bool us_ticker_inited = false;
|
||||
|
||||
#if MBED_CONF_TARGET_US_TICKER_TIMER == 0
|
||||
#define US_TICKER_TIMER ((LPC_TIM_TypeDef *)LPC_TIM0_BASE)
|
||||
#define US_TICKER_TIMER_IRQn TIMER0_IRQn
|
||||
#elif MBED_CONF_TARGET_US_TICKER_TIMER == 1
|
||||
#define US_TICKER_TIMER ((LPC_TIM_TypeDef *)LPC_TIM1_BASE)
|
||||
#define US_TICKER_TIMER_IRQn TIMER1_IRQn
|
||||
#elif MBED_CONF_TARGET_US_TICKER_TIMER == 2
|
||||
#define US_TICKER_TIMER ((LPC_TIM_TypeDef *)LPC_TIM2_BASE)
|
||||
#define US_TICKER_TIMER_IRQn TIMER2_IRQn
|
||||
#else
|
||||
#define US_TICKER_TIMER ((LPC_TIM_TypeDef *)LPC_TIM3_BASE)
|
||||
#define US_TICKER_TIMER_IRQn TIMER3_IRQn
|
||||
#endif
|
||||
|
||||
void us_ticker_init(void) {
|
||||
if (us_ticker_inited) {
|
||||
|
|
|
@ -251,6 +251,12 @@
|
|||
"release_versions": ["2", "5"],
|
||||
"device_name": "LPC1768",
|
||||
"bootloader_supported": true,
|
||||
"config": {
|
||||
"us-ticker-timer": {
|
||||
"help": "Chooses which timer (0-3) to use for us_ticker.c",
|
||||
"value": 3
|
||||
}
|
||||
},
|
||||
"overrides": {
|
||||
"network-default-interface-type": "ETHERNET"
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue