void hmc58xx_init(struct Hmc58xx *hmc, struct i2c_periph *i2c_p, uint8_t addr)
Initialize Hmc58xx struct and set default config options.
bool initialized
config done flag
volatile bool data_available
data ready flag
struct i2c_periph * i2c_p
enum Hmc58xxConfStatus init_status
init status
uint8_t mode
Measurement mode.
void hmc58xx_read(struct Hmc58xx *hmc)
struct i2c_transaction i2c_trans
uint8_t gain
Gain configuration (1 -> +- 1 Gauss)
uint8_t meas
Measurement configuration.
void hmc58xx_start_configure(struct Hmc58xx *hmc)
uint8_t rate
Data Output Rate Bits(6 -> 50Hz with HMC5843, 75Hz with HMC5883)
I2C transaction structure.
Hmc58xxConfStatus
config status states
Register defs for Honeywell HMC5843 and HMC5883 magnetometers.
I2C peripheral structure.
void hmc58xx_event(struct Hmc58xx *hmc)
uint16_t adc_overflow_cnt
counts number of ADC measurement under/overflows
struct Hmc58xxConfig config
static void hmc58xx_periodic(struct Hmc58xx *hmc)
convenience function: read or start configuration if not already initialized
Paparazzi fixed point algebra.
Architecture independent I2C (Inter-Integrated Circuit Bus) API.