X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdrivers%2Fao_hmc5883.c;h=059fc2c8d5fb85d75872d9325e34f341f50a5991;hb=5a55501660ebab3b858a48483c5df1cfb4e858e4;hp=ade6c263d84236823d7d366cdb1c42b8b18348c8;hpb=5ed88fb72c3e3ecf3333c700d838667db71cfbdc;p=fw%2Faltos diff --git a/src/drivers/ao_hmc5883.c b/src/drivers/ao_hmc5883.c index ade6c263..059fc2c8 100644 --- a/src/drivers/ao_hmc5883.c +++ b/src/drivers/ao_hmc5883.c @@ -123,12 +123,14 @@ ao_hmc5883_setup(void) return 1; } +struct ao_hmc5883_sample ao_hmc5883_current; + static void ao_hmc5883(void) { ao_hmc5883_setup(); for (;;) { - ao_hmc5883_sample((struct ao_hmc5883_sample *) &ao_data_ring[ao_data_head].hmc5883); + ao_hmc5883_sample(&ao_hmc5883_current); ao_arch_critical( AO_DATA_PRESENT(AO_DATA_HMC5883); AO_DATA_WAIT();