From 69a8aecbc8098b2b5fa2e709c295e57d123e7e72 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Fri, 12 May 2017 17:18:26 -1000 Subject: [PATCH] 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)