summaryrefslogtreecommitdiff
path: root/src/drivers/ao_mma655x.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_mma655x.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_mma655x.c')
-rw-r--r--src/drivers/ao_mma655x.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/drivers/ao_mma655x.c b/src/drivers/ao_mma655x.c
index a48c1db2..e8eeea6e 100644
--- a/src/drivers/ao_mma655x.c
+++ b/src/drivers/ao_mma655x.c
@@ -34,7 +34,6 @@ static void
ao_mma655x_start(void) {
ao_spi_get_bit(AO_MMA655X_CS_PORT,
AO_MMA655X_CS_PIN,
- AO_MMA655X_CS,
AO_MMA655X_SPI_INDEX,
AO_SPI_SPEED_FAST);
}
@@ -43,19 +42,18 @@ static void
ao_mma655x_stop(void) {
ao_spi_put_bit(AO_MMA655X_CS_PORT,
AO_MMA655X_CS_PIN,
- AO_MMA655X_CS,
AO_MMA655X_SPI_INDEX);
}
static void
ao_mma655x_restart(void) {
uint8_t i;
- ao_gpio_set(AO_MMA655X_CS_PORT, AO_MMA655X_CS_PIN, AO_MMA655X_CS, 1);
+ ao_gpio_set(AO_MMA655X_CS_PORT, AO_MMA655X_CS_PIN, 1);
/* Emperical testing on STM32L151 at 32MHz for this delay amount */
for (i = 0; i < 10; i++)
ao_arch_nop();
- ao_gpio_set(AO_MMA655X_CS_PORT, AO_MMA655X_CS_PIN, AO_MMA655X_CS, 0);
+ ao_gpio_set(AO_MMA655X_CS_PORT, AO_MMA655X_CS_PIN, 0);
}
static uint8_t