From: Nathael Pajani Date: Tue, 19 Nov 2013 13:25:21 +0000 (+0100) Subject: Fix : it's the port numbers, not the pin numbers. X-Git-Url: http://git.techno-innov.fr/?a=commitdiff_plain;h=e71c601d26f29f7e4d099057274be285929e18aa;p=soft%2Flpc122x%2Fcore Fix : it's the port numbers, not the pin numbers. --- diff --git a/include/drivers/timers.h b/include/drivers/timers.h index 48163a6..c2efe94 100644 --- a/include/drivers/timers.h +++ b/include/drivers/timers.h @@ -100,38 +100,38 @@ int timer_setup(uint32_t timer_num, struct timer_config* conf); * port 2 are 2 and 3 instead of 3 and 4 ! */ /* 16 bits timer 0 match / capture pins */ -#define LPC_TIMER_16B0_CHANNEL_0_PIN_28 28 -#define LPC_TIMER_16B0_CHANNEL_1_PIN_29 29 -#define LPC_TIMER_16B0_CHANNEL_0_PIN_11 11 -#define LPC_TIMER_16B0_CHANNEL_1_PIN_12 12 +#define LPC_TIMER_16B0_CHANNEL_0_PIO_28 28 +#define LPC_TIMER_16B0_CHANNEL_1_PIO_29 29 +#define LPC_TIMER_16B0_CHANNEL_0_PIO_11 11 +#define LPC_TIMER_16B0_CHANNEL_1_PIO_12 12 /* Alternate on PIO2_0 and PIO2_1 */ /* 16 bits timer 1 match / capture pins */ -#define LPC_TIMER_16B1_CHANNEL_0_PIN_15 15 -#define LPC_TIMER_16B1_CHANNEL_1_PIN_16 16 +#define LPC_TIMER_16B1_CHANNEL_0_PIO_15 15 +#define LPC_TIMER_16B1_CHANNEL_1_PIO_16 16 /* Alternate on PIO1_5 and PIO1_6 */ /* Alternate on PIO2_2 and PIO2_3 */ /* 32 bits timer 0 match / capture pins */ -#define LPC_TIMER_32B0_CHANNEL_0_PIN_1 1 -#define LPC_TIMER_32B0_CHANNEL_1_PIN_2 2 -#define LPC_TIMER_32B0_CHANNEL_2_PIN_3 3 -#define LPC_TIMER_32B0_CHANNEL_3_PIN_4 4 -#define LPC_TIMER_32B0_CHANNEL_0_PIN_18 18 -#define LPC_TIMER_32B0_CHANNEL_1_PIN_19 19 -#define LPC_TIMER_32B0_CHANNEL_2_PIN_20 20 -#define LPC_TIMER_32B0_CHANNEL_3_PIN_21 21 +#define LPC_TIMER_32B0_CHANNEL_0_PIO_1 1 +#define LPC_TIMER_32B0_CHANNEL_1_PIO_2 2 +#define LPC_TIMER_32B0_CHANNEL_2_PIO_3 3 +#define LPC_TIMER_32B0_CHANNEL_3_PIO_4 4 +#define LPC_TIMER_32B0_CHANNEL_0_PIO_18 18 +#define LPC_TIMER_32B0_CHANNEL_1_PIO_19 19 +#define LPC_TIMER_32B0_CHANNEL_2_PIO_20 20 +#define LPC_TIMER_32B0_CHANNEL_3_PIO_21 21 /* Alternate on PIO2_4 to PIO2_7 */ /* 32 bits timer 1 match / capture pins */ -#define LPC_TIMER_32B1_CHANNEL_0_PIN_6 6 -#define LPC_TIMER_32B1_CHANNEL_1_PIN_7 7 -#define LPC_TIMER_32B1_CHANNEL_2_PIN_8 8 -#define LPC_TIMER_32B1_CHANNEL_3_PIN_9 9 -#define LPC_TIMER_32B1_CHANNEL_0_PIN_23 23 -#define LPC_TIMER_32B1_CHANNEL_1_PIN_24 24 -#define LPC_TIMER_32B1_CHANNEL_2_PIN_25 25 -#define LPC_TIMER_32B1_CHANNEL_3_PIN_26 26 +#define LPC_TIMER_32B1_CHANNEL_0_PIO_6 6 +#define LPC_TIMER_32B1_CHANNEL_1_PIO_7 7 +#define LPC_TIMER_32B1_CHANNEL_2_PIO_8 8 +#define LPC_TIMER_32B1_CHANNEL_3_PIO_9 9 +#define LPC_TIMER_32B1_CHANNEL_0_PIO_23 23 +#define LPC_TIMER_32B1_CHANNEL_1_PIO_24 24 +#define LPC_TIMER_32B1_CHANNEL_2_PIO_25 25 +#define LPC_TIMER_32B1_CHANNEL_3_PIO_26 26 /* Alternate on PIO2_8 to PIO2_11 */ /* Capture or match alternate function select for port 0 pins */ @@ -141,7 +141,7 @@ int timer_setup(uint32_t timer_num, struct timer_config* conf); /* Setup one pin to use as match or capture pin * This configure function can be used only for pins on port 0. - * Use LPC_TIMER_*B*_CHANNEL_*_PIN_* definitions for the pin number and either + * Use LPC_TIMER_*B*_CHANNEL_*_PIO_* definitions for the pin number and either * LPC_TIMER_PIN_FUNC_CAPTURE or LPC_TIMER_PIN_FUNC_MATCH for the function. * Note: These pins are not setup using the usual system set default pins functions * as most functions may be affected to many different pins, and the use of the