-#if 0
- for (addr = 0; addr <= 12; addr++) {
- ao_hmc5883_read(addr, &data, 1);
- printf ("hmc5883 register %2d: %02x\n",
- addr, data);
- }
-#endif
- ao_hmc5883_sample(&sample);
- printf ("X: %d Y: %d Z: %d\n", sample.x, sample.y, sample.z);
+}
+
+static struct ao_task ao_hmc5883_task;
+
+static void
+ao_hmc5883_show(void)
+{
+ struct ao_data sample;
+ ao_data_get(&sample);
+ printf ("X: %d Y: %d Z: %d missed irq: %lu\n",
+ sample.hmc5883.x, sample.hmc5883.y, sample.hmc5883.z, ao_hmc5883_missed_irq);