File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed
TARGET_NXP/TARGET_LPC176X Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,19 @@ const ticker_info_t* us_ticker_get_info()
28
28
29
29
static bool us_ticker_inited = false;
30
30
31
+ #if MBED_CONF_TARGET_US_TICKER_TIMER == 0
32
+ #define US_TICKER_TIMER ((LPC_TIM_TypeDef *)LPC_TIM0_BASE)
33
+ #define US_TICKER_TIMER_IRQn TIMER0_IRQn
34
+ #elif MBED_CONF_TARGET_US_TICKER_TIMER == 1
35
+ #define US_TICKER_TIMER ((LPC_TIM_TypeDef *)LPC_TIM1_BASE)
36
+ #define US_TICKER_TIMER_IRQn TIMER1_IRQn
37
+ #elif MBED_CONF_TARGET_US_TICKER_TIMER == 2
38
+ #define US_TICKER_TIMER ((LPC_TIM_TypeDef *)LPC_TIM2_BASE)
39
+ #define US_TICKER_TIMER_IRQn TIMER2_IRQn
40
+ #else
31
41
#define US_TICKER_TIMER ((LPC_TIM_TypeDef *)LPC_TIM3_BASE)
32
42
#define US_TICKER_TIMER_IRQn TIMER3_IRQn
43
+ #endif
33
44
34
45
void us_ticker_init (void ) {
35
46
if (us_ticker_inited ) {
Original file line number Diff line number Diff line change 247
247
"release_versions" : [" 2" , " 5" ],
248
248
"device_name" : " LPC1768" ,
249
249
"bootloader_supported" : true ,
250
+ "config" : {
251
+ "us-ticker-timer" : {
252
+ "help" : " Chooses which timer (0-3) to use for us_ticker.c" ,
253
+ "value" : 3
254
+ }
255
+ },
250
256
"overrides" : {
251
257
"network-default-interface-type" : " ETHERNET"
252
258
}
You can’t perform that action at this time.
0 commit comments