summaryrefslogtreecommitdiff
path: root/src/drivers/ao_ps2.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2018-09-11 10:40:24 -0700
committerKeith Packard <keithp@keithp.com>2018-10-13 08:23:25 -0700
commitcdaa0d7b272505c49017f409b7c0b8e3240608f0 (patch)
tree75a8777ac04f7d4cc31260a5a7fd9dc9e3576948 /src/drivers/ao_ps2.c
parentf7ca88282466c271bad5e25e804729580fe83c47 (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_ps2.c')
-rw-r--r--src/drivers/ao_ps2.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drivers/ao_ps2.c b/src/drivers/ao_ps2.c
index 29eecea8..c7520b3a 100644
--- a/src/drivers/ao_ps2.c
+++ b/src/drivers/ao_ps2.c
@@ -91,11 +91,11 @@ ao_ps2_put(uint8_t c)
ao_arch_release_interrupts();
/* pull the clock pin down */
- ao_enable_output(AO_PS2_CLOCK_PORT, AO_PS2_CLOCK_BIT, AO_PS2_CLOCK_PIN, 0);
+ ao_enable_output(AO_PS2_CLOCK_PORT, AO_PS2_CLOCK_BIT, 0);
ao_delay(0);
/* pull the data pin down for the start bit */
- ao_enable_output(AO_PS2_DATA_PORT, AO_PS2_DATA_BIT, AO_PS2_DATA_PIN, 0);
+ ao_enable_output(AO_PS2_DATA_PORT, AO_PS2_DATA_BIT, 0);
ao_delay(0);
/* switch back to input mode for the interrupt to work */
@@ -369,7 +369,7 @@ ao_ps2_isr(void)
uint8_t bit;
if (ao_ps2_tx_count) {
- ao_gpio_set(AO_PS2_DATA_PORT, AO_PS2_DATA_BIT, AO_PS2_DATA_PIN, ao_ps2_tx&1);
+ ao_gpio_set(AO_PS2_DATA_PORT, AO_PS2_DATA_BIT, ao_ps2_tx&1);
ao_ps2_tx >>= 1;
ao_ps2_tx_count--;
if (!ao_ps2_tx_count) {
@@ -383,7 +383,7 @@ ao_ps2_isr(void)
ao_ps2_count = 0;
ao_ps2_tick = ao_tick_count;
- bit = ao_gpio_get(AO_PS2_DATA_PORT, AO_PS2_DATA_BIT, AO_PS2_DATA_PIN);
+ bit = ao_gpio_get(AO_PS2_DATA_PORT, AO_PS2_DATA_BIT);
if (ao_ps2_count == 0) {
/* check for start bit, ignore if not zero */
if (bit)