From 77338a6b34d6a164fc2f70e6d736eca8a5b7d251 Mon Sep 17 00:00:00 2001 From: Clyne Sullivan Date: Mon, 5 Mar 2018 11:36:00 -0500 Subject: bug fixes, keypad work --- src/keypad.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) (limited to 'src/keypad.c') diff --git a/src/keypad.c b/src/keypad.c index 41fc924..06e0b6a 100644 --- a/src/keypad.c +++ b/src/keypad.c @@ -1,18 +1,18 @@ #include #include -#define PIN_0 GPIO_PORT(A, 11) -#define PIN_1 GPIO_PORT(B, 13) -#define PIN_2 GPIO_PORT(B, 2) -#define PIN_3 GPIO_PORT(A, 12) -#define PIN_4 GPIO_PORT(B, 14) -#define PIN_5 GPIO_PORT(B, 11) -#define PIN_6 GPIO_PORT(C, 5) -#define PIN_7 GPIO_PORT(B, 15) -#define PIN_8 GPIO_PORT(B, 12) -#define PIN_9 GPIO_PORT(C, 6) -#define PIN_S GPIO_PORT(B, 1) -#define PIN_P GPIO_PORT(C, 8) +#define PIN_0 GPIO_PORT(B, 2) +#define PIN_1 GPIO_PORT(B, 1) +#define PIN_2 GPIO_PORT(A, 11) +#define PIN_3 GPIO_PORT(C, 8) +#define PIN_4 GPIO_PORT(B, 15) +#define PIN_5 GPIO_PORT(B, 12) +#define PIN_6 GPIO_PORT(C, 6) +#define PIN_7 GPIO_PORT(B, 14) +#define PIN_8 GPIO_PORT(B, 11) +#define PIN_9 GPIO_PORT(C, 5) +#define PIN_S GPIO_PORT(B, 13) +#define PIN_P GPIO_PORT(A, 12) typedef struct { GPIO_TypeDef *port; @@ -43,7 +43,7 @@ void keypad_init(void) gpio_mode(p, pin, OUTPUT); gpio_dout(p, pin, 0); gpio_mode(p, pin, INPUT); - gpio_pupd(p, pin, PULLDOWN); + //gpio_pupd(p, pin, PULLDOWN); } } -- cgit v1.2.3