X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdrivers%2Fao_mma655x.c;h=18c5317ce8c89f6d4791062f2fec1b4d04940223;hb=mm-ms5611;hp=0642220669d25a7f932230efed3001179b73686e;hpb=e2b458a448106ba1ab207f0ea6824b56927d8547;p=fw%2Faltos diff --git a/src/drivers/ao_mma655x.c b/src/drivers/ao_mma655x.c index 06422206..18c5317c 100644 --- a/src/drivers/ao_mma655x.c +++ b/src/drivers/ao_mma655x.c @@ -20,7 +20,7 @@ #if HAS_MMA655X -#if 1 +#if 0 #define PRINTD(...) do { printf ("\r%5u %s: ", ao_tick_count, __func__); printf(__VA_ARGS__); } while(0) #else #define PRINTD(...) @@ -250,12 +250,14 @@ __code struct ao_cmds ao_mma655x_cmds[] = { { 0, NULL }, }; +uint16_t ao_mma655x_current; + static void ao_mma655x(void) { ao_mma655x_setup(); for (;;) { - ao_data_ring[ao_data_head].mma655x = ao_mma655x_value(); + ao_mma655x_current = ao_mma655x_value(); ao_arch_critical( AO_DATA_PRESENT(AO_DATA_MMA655X); AO_DATA_WAIT(); @@ -273,7 +275,7 @@ ao_mma655x_init(void) ao_cmd_register(&ao_mma655x_cmds[0]); ao_spi_init_cs(AO_MMA655X_CS_PORT, (1 << AO_MMA655X_CS_PIN)); -// ao_add_task(&ao_mma655x_task, ao_mma655x, "mma655x"); + ao_add_task(&ao_mma655x_task, ao_mma655x, "mma655x"); } #endif