summaryrefslogtreecommitdiff
path: root/src/drivers/ao_mma655x.c
diff options
context:
space:
mode:
authorBdale Garbee <bdale@gag.com>2018-10-20 01:18:12 -0600
committerBdale Garbee <bdale@gag.com>2018-10-20 01:18:12 -0600
commit0686a7b8aec524d81bda4c572549a3a068ce0eed (patch)
tree2e6061c834b99e3b9668be8b3cfb1627251365d3 /src/drivers/ao_mma655x.c
parent6aa451ce81bfdfe679e3f9902043a5f0d235c745 (diff)
parentcc528f1ff0271ec6488a1a7b91c731183502101e (diff)
Merge branch 'master' of ssh://git.gag.com/scm/git/fw/altos
Diffstat (limited to 'src/drivers/ao_mma655x.c')
-rw-r--r--src/drivers/ao_mma655x.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/drivers/ao_mma655x.c b/src/drivers/ao_mma655x.c
index 5d44bffd..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
@@ -259,7 +257,7 @@ ao_mma655x_dump(void)
printf ("MMA655X value %d\n", ao_mma655x_current);
}
-__code struct ao_cmds ao_mma655x_cmds[] = {
+const struct ao_cmds ao_mma655x_cmds[] = {
{ ao_mma655x_dump, "A\0Display MMA655X data" },
{ 0, NULL },
};
@@ -277,7 +275,7 @@ ao_mma655x(void)
}
}
-static __xdata struct ao_task ao_mma655x_task;
+static struct ao_task ao_mma655x_task;
void
ao_mma655x_init(void)