I2C transaction structure.
uint8_t mode
Measurement mode.
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
static void hmc58xx_periodic(struct Hmc58xx *hmc)
convenience function: read or start configuration if not already initialized
struct i2c_periph * i2c_p
struct i2c_transaction i2c_trans
void hmc58xx_event(struct Hmc58xx *hmc)
uint8_t samples_averaged
Number of samples averaged per measurement output.
uint8_t temp_comp
Enable temperature sensor (only on HMC5983)
Hmc58xxConfStatus
config status states
uint8_t meas
Measurement configuration.
uint8_t gain
Gain configuration (1 -> +- 1 Gauss)
void hmc58xx_read(struct Hmc58xx *hmc)
void hmc58xx_start_configure(struct Hmc58xx *hmc)
struct Hmc58xxConfig config
enum Hmc58xxConfStatus init_status
init status
volatile bool data_available
data ready flag
uint8_t rate
Data Output Rate Bits(6 -> 50Hz with HMC5843, 75Hz with HMC5883)
uint16_t adc_overflow_cnt
counts number of ADC measurement under/overflows
Register defs for Honeywell HMC5843, HMC5883 and HMC5983 magnetometers.
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
Paparazzi fixed point algebra.
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.