diff options
author | Clyne Sullivan <tullivan99@gmail.com> | 2018-03-05 11:36:00 -0500 |
---|---|---|
committer | Clyne Sullivan <tullivan99@gmail.com> | 2018-03-05 11:36:00 -0500 |
commit | 77338a6b34d6a164fc2f70e6d736eca8a5b7d251 (patch) | |
tree | 719635f76eea070f0b39d9a3c3c81f5b48b894f9 /src/keypad.c | |
parent | 51b884c44c858aa56aae6675a2c3a8b2d882768e (diff) |
bug fixes, keypad work
Diffstat (limited to 'src/keypad.c')
-rw-r--r-- | src/keypad.c | 26 |
1 files changed, 13 insertions, 13 deletions
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 <keypad.h> #include <gpio.h> -#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); } } |