- struct ao_hmc5883_sample ao_hmc5883_next;
-
- ao_hmc5883_sample(&ao_hmc5883_next);
- ao_arch_critical(
- ao_hmc5883_current = ao_hmc5883_next;
- ao_hmc5883_valid = 1;
- );
- ao_delay(0);
+ ao_hmc5883_sample(&sample);
+ ao_arch_block_interrupts();
+ ao_hmc5883_current = sample;
+ AO_DATA_PRESENT(AO_DATA_HMC5883);
+ AO_DATA_WAIT();
+ ao_arch_release_interrupts();