1
0

Update matrix.c

This commit is contained in:
di0ib 2018-04-13 19:19:21 -10:00 committed by GitHub
parent 4dab703eb2
commit 8168810036
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -152,8 +152,8 @@ static void init_cols(void)
palSetPadMode(GPIOA, 4, PAL_MODE_INPUT_PULLUP); palSetPadMode(GPIOA, 4, PAL_MODE_INPUT_PULLUP);
palSetPadMode(GPIOA, 3, PAL_MODE_INPUT_PULLUP); palSetPadMode(GPIOA, 3, PAL_MODE_INPUT_PULLUP);
palSetPadMode(GPIOA, 2, PAL_MODE_INPUT_PULLUP); palSetPadMode(GPIOA, 2, PAL_MODE_INPUT_PULLUP);
palSetPadMode(GPIOB, 1, PAL_MODE_INPUT_PULLUP); palSetPadMode(GPIOA, 1, PAL_MODE_INPUT_PULLUP);
palSetPadMode(GPIOB, 0, PAL_MODE_INPUT_PULLUP); palSetPadMode(GPIOA, 0, PAL_MODE_INPUT_PULLUP);
palSetPadMode(GPIOC, 15, PAL_MODE_INPUT_PULLUP); palSetPadMode(GPIOC, 15, PAL_MODE_INPUT_PULLUP);
palSetPadMode(GPIOC, 14, PAL_MODE_INPUT_PULLUP); palSetPadMode(GPIOC, 14, PAL_MODE_INPUT_PULLUP);
palSetPadMode(GPIOC, 13, PAL_MODE_INPUT_PULLUP); palSetPadMode(GPIOC, 13, PAL_MODE_INPUT_PULLUP);
@ -218,12 +218,12 @@ static void select_row(uint8_t row)
palClearPad(GPIOB, 5); palClearPad(GPIOB, 5);
break; break;
case 3: case 3:
palSetPadMode(GPIOB, 4, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOB, 4, PAL_MODE_OUTPUT_PUSHPULL);
palClearPad(GPIOB, 4); palClearPad(GPIOB, 4);
break; break;
case 4: case 4:
palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL);
palClearPad(GPIOB, 3); palClearPad(GPIOB, 3);
break; break;
case 5: case 5:
palSetPadMode(GPIOA, 15, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOA, 15, PAL_MODE_OUTPUT_PUSHPULL);
@ -242,12 +242,12 @@ static void select_row(uint8_t row)
palClearPad(GPIOA, 10); palClearPad(GPIOA, 10);
break; break;
case 9: case 9:
palSetPadMode(GPIOA, 9, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOA, 9, PAL_MODE_OUTPUT_PUSHPULL);
palClearPad(GPIOA, 9); palClearPad(GPIOA, 9);
break; break;
case 10: case 10:
palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL);
palClearPad(GPIOA, 8); palClearPad(GPIOA, 8);
break; break;
case 11: case 11:
palSetPadMode(GPIOB, 15, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOB, 15, PAL_MODE_OUTPUT_PUSHPULL);