diff options
author | Keith Packard <keithp@keithp.com> | 2018-09-11 10:40:24 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2018-10-13 08:23:25 -0700 |
commit | cdaa0d7b272505c49017f409b7c0b8e3240608f0 (patch) | |
tree | 75a8777ac04f7d4cc31260a5a7fd9dc9e3576948 /src/drivers/ao_button.c | |
parent | f7ca88282466c271bad5e25e804729580fe83c47 (diff) |
altos: Eliminate 'pin' field from GPIO functions
This was used with the 8051 bit-addressing mode to provide
single-instruction access to GPIO pins.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/drivers/ao_button.c')
-rw-r--r-- | src/drivers/ao_button.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/drivers/ao_button.c b/src/drivers/ao_button.c index f6a9676b..c8103e88 100644 --- a/src/drivers/ao_button.c +++ b/src/drivers/ao_button.c @@ -37,7 +37,6 @@ static struct ao_button_state ao_button_state[AO_BUTTON_COUNT]; #define port(q) AO_BUTTON_ ## q ## _PORT #define bit(q) AO_BUTTON_ ## q -#define pin(q) AO_BUTTON_ ## q ## _PIN #ifndef AO_BUTTON_INVERTED #define AO_BUTTON_INVERTED 1 @@ -45,9 +44,9 @@ static struct ao_button_state ao_button_state[AO_BUTTON_COUNT]; #if AO_BUTTON_INVERTED /* pins are inverted */ -#define ao_button_value(b) !ao_gpio_get(port(b), bit(b), pin(b)) +#define ao_button_value(b) !ao_gpio_get(port(b), bit(b)) #else -#define ao_button_value(b) ao_gpio_get(port(b), bit(b), pin(b)) +#define ao_button_value(b) ao_gpio_get(port(b), bit(b)) #endif static uint8_t |