Skip to content

Commit e1eb357

Browse files
committed
Added changes to PWM API from LPC1114 to LPC11C24
1 parent b437a3c commit e1eb357

File tree

1 file changed

+15
-5
lines changed
  • libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11CXX

1 file changed

+15
-5
lines changed

libraries/mbed/targets/hal/TARGET_NXP/TARGET_LPC11CXX/pwmout_api.c

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,21 @@ typedef struct {
5454
uint8_t mr;
5555
} timer_mr;
5656

57-
static timer_mr pwm_timer_map[4] = {
58-
{0, 0},
59-
{1, 0},
60-
{2, 0},
61-
{3, 0},
57+
static timer_mr pwm_timer_map[11] = {
58+
{0, 0}, /* CT16B0, MR0 */
59+
{0, 1}, /* CT16B0, MR1 */
60+
{0, 2}, /* CT16B0, MR2 */
61+
62+
{1, 0}, /* CT16B1, MR0 */
63+
{1, 1}, /* CT16B1, MR1 */
64+
65+
{2, 0}, /* CT32B0, MR0 */
66+
{2, 1}, /* CT32B0, MR1 */
67+
{2, 2}, /* CT32B0, MR2 */
68+
69+
{3, 0}, /* CT32B1, MR0 */
70+
{3, 1}, /* CT32B1, MR1 */
71+
{3, 2} /* CT32B1, MR2 */
6272
};
6373

6474
static LPC_TMR_TypeDef *Timers[4] = {

0 commit comments

Comments
 (0)