frdm_k64f: Add support for RGB LEDs

Add PTB22, PTE26, and PTB21 to the frdm_k64f pinmux table, and helper
macros to board.h to map them to red, green, and blue LEDs respectively.

Change-Id: I257621467e71dfd9bdc5d97d6da444dfb5c58b2b
Signed-off-by: Maureen Helm <maureen.helm@nxp.com>
This commit is contained in:
Maureen Helm 2016-09-26 09:46:47 -05:00
parent a6b57c9455
commit 51c146b95b
2 changed files with 16 additions and 0 deletions

View File

@ -27,4 +27,16 @@
#define SW3_GPIO_NAME CONFIG_GPIO_K64_A_DEV_NAME
#define SW3_GPIO_PIN 4
/* Red LED */
#define RED_GPIO_NAME CONFIG_GPIO_K64_B_DEV_NAME
#define RED_GPIO_PIN 22
/* Green LED */
#define GREEN_GPIO_NAME CONFIG_GPIO_K64_E_DEV_NAME
#define GREEN_GPIO_PIN 26
/* Blue LED */
#define BLUE_GPIO_NAME CONFIG_GPIO_K64_B_DEV_NAME
#define BLUE_GPIO_PIN 21
#endif /* __INC_BOARD_H */

View File

@ -63,6 +63,10 @@ struct pin_config mux_config[] = {
{ K64_PIN_PTC6, K64_PINMUX_FUNC_GPIO }, /* SW2 / FXOS8700 INT1 */
{ K64_PIN_PTA4, K64_PINMUX_FUNC_GPIO }, /* SW3 */
{ K64_PIN_PTB22, K64_PINMUX_FUNC_GPIO }, /* Red LED */
{ K64_PIN_PTE26, K64_PINMUX_FUNC_GPIO }, /* Green LED */
{ K64_PIN_PTB21, K64_PINMUX_FUNC_GPIO }, /* Blue LED */
{ K64_PIN_PTD0, K64_PINMUX_FUNC_GPIO },
{ K64_PIN_PTD2, K64_PINMUX_FUNC_GPIO },
{ K64_PIN_PTD3, K64_PINMUX_FUNC_GPIO },