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 251
251
"release_versions" : [" 2" , " 5" ],
252
252
"device_name" : " LPC1768" ,
253
253
"bootloader_supported" : true ,
254
+ "config" : {
255
+ "us-ticker-timer" : {
256
+ "help" : " Chooses which timer (0-3) to use for us_ticker.c" ,
257
+ "value" : 3
258
+ }
259
+ },
254
260
"overrides" : {
255
261
"network-default-interface-type" : " ETHERNET"
256
262
}
You can’t perform that action at this time.
0 commit comments