1
0
This commit is contained in:
di0ib 2018-04-19 09:07:41 -10:00
commit bcd8e2cd90

View File

@ -70,6 +70,9 @@ uint8_t matrix_cols(void)
void matrix_init(void)
{
// disable JTAG SWD
AFIO->MAPR = AFIO_MAPR_SWJ_CFG_DISABLE;
// initialize row and col
unselect_rows();
init_cols();
@ -152,8 +155,8 @@ static void init_cols(void)
palSetPadMode(GPIOA, 4, PAL_MODE_INPUT_PULLUP);
palSetPadMode(GPIOA, 3, PAL_MODE_INPUT_PULLUP);
palSetPadMode(GPIOA, 2, PAL_MODE_INPUT_PULLUP);
palSetPadMode(GPIOB, 1, PAL_MODE_INPUT_PULLUP);
palSetPadMode(GPIOB, 0, PAL_MODE_INPUT_PULLUP);
palSetPadMode(GPIOA, 1, PAL_MODE_INPUT_PULLUP);
palSetPadMode(GPIOA, 0, PAL_MODE_INPUT_PULLUP);
palSetPadMode(GPIOC, 15, PAL_MODE_INPUT_PULLUP);
palSetPadMode(GPIOC, 14, PAL_MODE_INPUT_PULLUP);
palSetPadMode(GPIOC, 13, PAL_MODE_INPUT_PULLUP);