This fork of the MBED Library allows you to use counters on the external counter pins (15/16 for Timer 3, 29/30 for Timer 2) by switching internal timing functions in MBED to utilize Timer 0

Fork of mbed-src by mbed official

Files at this revision

API Documentation at this revision

Comitter:
bparrott
Date:
Thu Oct 23 10:10:42 2014 +0000
Parent:
348:3dfac0d3ce7b
Commit message:
This changes the timer used at the core of MBED from Timer 3 to Timer 0. This allows for the use of external pins with both Timer 2 and 3.

Changed in this revision

targets/hal/TARGET_NXP/TARGET_LPC176X/us_ticker.c Show annotated file Show diff for this revision Revisions of this file
diff -r 3dfac0d3ce7b -r 591ef4b19797 targets/hal/TARGET_NXP/TARGET_LPC176X/us_ticker.c
--- a/targets/hal/TARGET_NXP/TARGET_LPC176X/us_ticker.c	Mon Oct 13 15:15:07 2014 +0100
+++ b/targets/hal/TARGET_NXP/TARGET_LPC176X/us_ticker.c	Thu Oct 23 10:10:42 2014 +0000
@@ -17,8 +17,8 @@
 #include "us_ticker_api.h"
 #include "PeripheralNames.h"
 
-#define US_TICKER_TIMER      ((LPC_TIM_TypeDef *)LPC_TIM3_BASE)
-#define US_TICKER_TIMER_IRQn TIMER3_IRQn
+#define US_TICKER_TIMER      ((LPC_TIM_TypeDef *)LPC_TIM0_BASE)
+#define US_TICKER_TIMER_IRQn TIMER0_IRQn
 
 int us_ticker_inited = 0;