X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdrivers%2Fao_mma655x.c;h=28fe1e08b1d28b46354ce0200d2954aaacb826d3;hb=0361235c9ef56738ba0e97be88a85afef0ce8268;hp=005bc68461bb27d8fa146e51aa6b05970937e8c4;hpb=82fdc42d61340e6b76580ff12a9e1bea59eb8079;p=fw%2Faltos diff --git a/src/drivers/ao_mma655x.c b/src/drivers/ao_mma655x.c index 005bc684..28fe1e08 100644 --- a/src/drivers/ao_mma655x.c +++ b/src/drivers/ao_mma655x.c @@ -238,11 +238,12 @@ ao_mma655x_setup(void) } +uint16_t ao_mma655x_current; + static void ao_mma655x_dump(void) { - ao_mma655x_setup(); - printf ("MMA655X value %d\n", ao_mma655x_value()); + printf ("MMA655X value %d\n", ao_mma655x_current); } __code struct ao_cmds ao_mma655x_cmds[] = { @@ -255,7 +256,7 @@ 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();