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/kernel/ao_pyro.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/kernel/ao_pyro.c')
-rw-r--r-- | src/kernel/ao_pyro.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/kernel/ao_pyro.c b/src/kernel/ao_pyro.c index c01c9512..30d1518f 100644 --- a/src/kernel/ao_pyro.c +++ b/src/kernel/ao_pyro.c @@ -216,28 +216,28 @@ ao_pyro_pin_set(uint8_t p, uint8_t v) { switch (p) { #if AO_PYRO_NUM > 0 - case 0: ao_gpio_set(AO_PYRO_PORT_0, AO_PYRO_PIN_0, AO_PYRO_0, v); break; + case 0: ao_gpio_set(AO_PYRO_PORT_0, AO_PYRO_PIN_0, v); break; #endif #if AO_PYRO_NUM > 1 - case 1: ao_gpio_set(AO_PYRO_PORT_1, AO_PYRO_PIN_1, AO_PYRO_1, v); break; + case 1: ao_gpio_set(AO_PYRO_PORT_1, AO_PYRO_PIN_1, v); break; #endif #if AO_PYRO_NUM > 2 - case 2: ao_gpio_set(AO_PYRO_PORT_2, AO_PYRO_PIN_2, AO_PYRO_2, v); break; + case 2: ao_gpio_set(AO_PYRO_PORT_2, AO_PYRO_PIN_2, v); break; #endif #if AO_PYRO_NUM > 3 - case 3: ao_gpio_set(AO_PYRO_PORT_3, AO_PYRO_PIN_3, AO_PYRO_3, v); break; + case 3: ao_gpio_set(AO_PYRO_PORT_3, AO_PYRO_PIN_3, v); break; #endif #if AO_PYRO_NUM > 4 - case 4: ao_gpio_set(AO_PYRO_PORT_4, AO_PYRO_PIN_4, AO_PYRO_4, v); break; + case 4: ao_gpio_set(AO_PYRO_PORT_4, AO_PYRO_PIN_4, v); break; #endif #if AO_PYRO_NUM > 5 - case 5: ao_gpio_set(AO_PYRO_PORT_5, AO_PYRO_PIN_5, AO_PYRO_5, v); break; + case 5: ao_gpio_set(AO_PYRO_PORT_5, AO_PYRO_PIN_5, v); break; #endif #if AO_PYRO_NUM > 6 - case 6: ao_gpio_set(AO_PYRO_PORT_6, AO_PYRO_PIN_6, AO_PYRO_6, v); break; + case 6: ao_gpio_set(AO_PYRO_PORT_6, AO_PYRO_PIN_6, v); break; #endif #if AO_PYRO_NUM > 7 - case 7: ao_gpio_set(AO_PYRO_PORT_7, AO_PYRO_PIN_7, AO_PYRO_7, v); break; + case 7: ao_gpio_set(AO_PYRO_PORT_7, AO_PYRO_PIN_7, v); break; #endif default: break; } @@ -555,28 +555,28 @@ void ao_pyro_init(void) { #if AO_PYRO_NUM > 0 - ao_enable_output(AO_PYRO_PORT_0, AO_PYRO_PIN_0, AO_PYRO_0, 0); + ao_enable_output(AO_PYRO_PORT_0, AO_PYRO_PIN_0, 0); #endif #if AO_PYRO_NUM > 1 - ao_enable_output(AO_PYRO_PORT_1, AO_PYRO_PIN_1, AO_PYRO_1, 0); + ao_enable_output(AO_PYRO_PORT_1, AO_PYRO_PIN_1, 0); #endif #if AO_PYRO_NUM > 2 - ao_enable_output(AO_PYRO_PORT_2, AO_PYRO_PIN_2, AO_PYRO_2, 0); + ao_enable_output(AO_PYRO_PORT_2, AO_PYRO_PIN_2, 0); #endif #if AO_PYRO_NUM > 3 - ao_enable_output(AO_PYRO_PORT_3, AO_PYRO_PIN_3, AO_PYRO_3, 0); + ao_enable_output(AO_PYRO_PORT_3, AO_PYRO_PIN_3, 0); #endif #if AO_PYRO_NUM > 4 - ao_enable_output(AO_PYRO_PORT_4, AO_PYRO_PIN_4, AO_PYRO_4, 0); + ao_enable_output(AO_PYRO_PORT_4, AO_PYRO_PIN_4, 0); #endif #if AO_PYRO_NUM > 5 - ao_enable_output(AO_PYRO_PORT_5, AO_PYRO_PIN_5, AO_PYRO_5, 0); + ao_enable_output(AO_PYRO_PORT_5, AO_PYRO_PIN_5, 0); #endif #if AO_PYRO_NUM > 6 - ao_enable_output(AO_PYRO_PORT_6, AO_PYRO_PIN_6, AO_PYRO_6, 0); + ao_enable_output(AO_PYRO_PORT_6, AO_PYRO_PIN_6, 0); #endif #if AO_PYRO_NUM > 7 - ao_enable_output(AO_PYRO_PORT_7, AO_PYRO_PIN_7, AO_PYRO_7, 0); + ao_enable_output(AO_PYRO_PORT_7, AO_PYRO_PIN_7, 0); #endif ao_add_task(&ao_pyro_task, ao_pyro, "pyro"); } |