Make SW3 send the scancode of 'A' to the host.

This commit is contained in:
László Monda
2016-02-27 12:33:04 +01:00
parent f4c778be30
commit b3984c050b
2 changed files with 11 additions and 34 deletions

View File

@@ -31,19 +31,17 @@
#include "fsl_common.h"
#include "fsl_port.h"
/*******************************************************************************
* Code
******************************************************************************/
/* Function Name : BOARD_InitPins */
void BOARD_InitPins(void)
{
/* Initialize UART1 pins below */
/* Ungate the port clock */
// Set up UART1 for OpenSDA.
CLOCK_EnableClock(kCLOCK_PortE);
/* Affects PORTE_PCR0 register */
PORT_SetPinMux(PORTE, 0u, kPORT_MuxAlt3);
/* Affects PORTE_PCR1 register */
PORT_SetPinMux(PORTE, 1u, kPORT_MuxAlt3);
// Set up SW3.
CLOCK_EnableClock(kCLOCK_PortB);
port_pin_config_t switchConfig = {0};
switchConfig.pullSelect = kPORT_PullUp;
switchConfig.mux = kPORT_MuxAsGpio;
PORT_SetPinConfig(PORTB, 17U, &switchConfig);
}