*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
ao_hmc5883_done = 0;
ao_exti_enable(AO_HMC5883_INT_PORT, AO_HMC5883_INT_PIN);
ao_hmc5883_reg_write(HMC5883_MODE, HMC5883_MODE_SINGLE);
ao_hmc5883_done = 0;
ao_exti_enable(AO_HMC5883_INT_PORT, AO_HMC5883_INT_PIN);
ao_hmc5883_reg_write(HMC5883_MODE, HMC5883_MODE_SINGLE);
ao_hmc5883_read(HMC5883_X_MSB, (uint8_t *) sample, sizeof (struct ao_hmc5883_sample));
#if __BYTE_ORDER == __LITTLE_ENDIAN
ao_hmc5883_read(HMC5883_X_MSB, (uint8_t *) sample, sizeof (struct ao_hmc5883_sample));
#if __BYTE_ORDER == __LITTLE_ENDIAN
ao_hmc5883_reg_write(HMC5883_CONFIG_A,
(HMC5883_CONFIG_A_MA_8 << HMC5883_CONFIG_A_MA) |
ao_hmc5883_reg_write(HMC5883_CONFIG_A,
(HMC5883_CONFIG_A_MA_8 << HMC5883_CONFIG_A_MA) |
- sample.x, sample.y, sample.z, ao_hmc5883_missed_irq);
+ sample.hmc5883.x, sample.hmc5883.y, sample.hmc5883.z, ao_hmc5883_missed_irq);
ao_enable_port(AO_HMC5883_INT_PORT);
ao_exti_setup(AO_HMC5883_INT_PORT,
ao_enable_port(AO_HMC5883_INT_PORT);
ao_exti_setup(AO_HMC5883_INT_PORT,
ao_add_task(&ao_hmc5883_task, ao_hmc5883, "hmc5883");
ao_cmd_register(&ao_hmc5883_cmds[0]);
}
ao_add_task(&ao_hmc5883_task, ao_hmc5883, "hmc5883");
ao_cmd_register(&ao_hmc5883_cmds[0]);
}