From 700e4ff5b60f85d4f26573d3de0d5e5533d28f19 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Fri, 12 May 2017 17:03:27 -1000 Subject: [PATCH 1/2] kinetis:K66 fixed TMP2_CH1 definition --- arch/arm/src/kinetis/chip/kinetis_k66pinmux.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/src/kinetis/chip/kinetis_k66pinmux.h b/arch/arm/src/kinetis/chip/kinetis_k66pinmux.h index ad15c5ac02..93676e9903 100644 --- a/arch/arm/src/kinetis/chip/kinetis_k66pinmux.h +++ b/arch/arm/src/kinetis/chip/kinetis_k66pinmux.h @@ -615,7 +615,7 @@ #define PIN_TPM1_CH1_3 (PIN_ALT6 | PIN_PORTB | PIN1) #define PIN_TPM2_CH0_1 (PIN_ALT6 | PIN_PORTA | PIN10) #define PIN_TPM2_CH0_2 (PIN_ALT6 | PIN_PORTB | PIN18) -#define PIN_TPM2_CH1_1 (PIN_ALT1 | PIN_PORTA | PIN11) +#define PIN_TPM2_CH1_1 (PIN_ALT6 | PIN_PORTA | PIN11) #define PIN_TPM2_CH1_2 (PIN_ALT6 | PIN_PORTB | PIN19) #define PIN_TPM_CLKIN0_1 (PIN_ALT7 | PIN_PORTA | PIN18) From 69a8aecbc8098b2b5fa2e709c295e57d123e7e72 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Fri, 12 May 2017 17:18:26 -1000 Subject: [PATCH 2/2] kinetis:K66 define ALT1 to match ref manual --- arch/arm/src/kinetis/kinetis.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/arch/arm/src/kinetis/kinetis.h b/arch/arm/src/kinetis/kinetis.h index 89ab791741..a1558179fd 100644 --- a/arch/arm/src/kinetis/kinetis.h +++ b/arch/arm/src/kinetis/kinetis.h @@ -82,7 +82,8 @@ /* Port Modes */ /* Unshifted versions: */ #define PIN_MODE_ANALOG (0) /* 000 Pin Disabled (Analog) */ -#define PIN_MODE_GPIO (1) /* 001 Alternative 1 (GPIO) */ +#define PIN_MODE_ALT1 (1) /* 001 Alternative 1 */ +#define PIN_MODE_GPIO PIN_MODE_ALT1 /* 001 Alternative 1 (GPIO) */ #define PIN_MODE_ALT2 (2) /* 010 Alternative 2 */ #define PIN_MODE_ALT3 (3) /* 011 Alternative 3 */ #define PIN_MODE_ALT4 (4) /* 100 Alternative 4 */ @@ -91,6 +92,7 @@ #define PIN_MODE_ALT7 (7) /* 111 Alternative 7 */ /* Shifted versions: */ #define _PIN_MODE_ANALOG (0 << _PIN_MODE_SHIFT) /* 000 Pin Disabled (Analog) */ +#define _PIN_MODE_ALT1 (1 << _PIN_MODE_SHIFT) /* 001 Alternative 1 */ #define _PIN_MODE_GPIO (1 << _PIN_MODE_SHIFT) /* 001 Alternative 1 (GPIO) */ #define _PIN_MODE_ALT2 (2 << _PIN_MODE_SHIFT) /* 010 Alternative 2 */ #define _PIN_MODE_ALT3 (3 << _PIN_MODE_SHIFT) /* 011 Alternative 3 */ @@ -137,6 +139,17 @@ #define GPIO_LOWDRIVE (_PIN_MODE_GPIO | _PIN_OUTPUT_LOWDRIVE) #define GPIO_HIGHDRIVE (_PIN_MODE_GPIO | _PIN_OUTPUT_HIGHDRIVE) +#define PIN_ALT1 _PIN_MODE_ALT1 +#define PIN_ALT1_INPUT (_PIN_MODE_ALT1 | _PIN_INPUT) +#define PIN_ALT1_PULLDOWN (_PIN_MODE_ALT1 | _PIN_INPUT_PULLDOWN) +#define PIN_ALT1_PULLUP (_PIN_MODE_ALT1 | _PIN_INPUT_PULLUP) +#define PIN_ALT1_OUTPUT (_PIN_MODE_ALT1 | _PIN_OUTPUT) +#define PIN_ALT1_FAST (_PIN_MODE_ALT1 | _PIN_OUTPUT_FAST) +#define PIN_ALT1_SLOW (_PIN_MODE_ALT1 | _PIN_OUTPUT_SLOW) +#define PIN_ALT1_OPENDRAIN (_PIN_MODE_ALT1 | _PIN_OUTPUT_OPENDRAIN) +#define PIN_ALT1_LOWDRIVE (_PIN_MODE_ALT1 | _PIN_OUTPUT_LOWDRIVE) +#define PIN_ALT1_HIGHDRIVE (_PIN_MODE_ALT1 | _PIN_OUTPUT_HIGHDRIVE) + #define PIN_ALT2 _PIN_MODE_ALT2 #define PIN_ALT2_INPUT (_PIN_MODE_ALT2 | _PIN_INPUT) #define PIN_ALT2_PULLDOWN (_PIN_MODE_ALT2 | _PIN_INPUT_PULLDOWN)