mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #1 from thesupershan/lpc1768-us-ticker
choose which lpc1768 timer to use for us_ticker.cpull/8122/head
commit
e5000abd93
|
@ -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) {
|
||||
|
|
|
@ -247,6 +247,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