From e1eb357c53561eb37cdd4235e2c81f129cf7bb7f Mon Sep 17 00:00:00 2001 From: Matthew Else Date: Wed, 7 Aug 2013 09:45:47 +0100 Subject: [PATCH] Added changes to PWM API from LPC1114 to LPC11C24 --- .../TARGET_NXP/TARGET_LPC11CXX/pwmout_api.c | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11CXX/pwmout_api.c b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11CXX/pwmout_api.c index 1872302219..5cb2f8e54a 100644 --- a/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11CXX/pwmout_api.c +++ b/libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11CXX/pwmout_api.c @@ -54,11 +54,21 @@ typedef struct { uint8_t mr; } timer_mr; -static timer_mr pwm_timer_map[4] = { - {0, 0}, - {1, 0}, - {2, 0}, - {3, 0}, +static timer_mr pwm_timer_map[11] = { + {0, 0}, /* CT16B0, MR0 */ + {0, 1}, /* CT16B0, MR1 */ + {0, 2}, /* CT16B0, MR2 */ + + {1, 0}, /* CT16B1, MR0 */ + {1, 1}, /* CT16B1, MR1 */ + + {2, 0}, /* CT32B0, MR0 */ + {2, 1}, /* CT32B0, MR1 */ + {2, 2}, /* CT32B0, MR2 */ + + {3, 0}, /* CT32B1, MR0 */ + {3, 1}, /* CT32B1, MR1 */ + {3, 2} /* CT32B1, MR2 */ }; static LPC_TMR_TypeDef *Timers[4] = {