39 #define QMC5883L_ADDR0 (0b00001101 << 1)
42 #define QMC5883L_ODR_10 0x00
43 #define QMC5883L_ODR_50 0x04
44 #define QMC5883L_ODR_100 0x08
45 #define QMC5883L_ODR_200 0x0C
48 #define QMC5883L_ODR_DEFAULT QMC5883L_ODR_200
I2C transaction structure.
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
Paparazzi fixed point algebra.
void qmc5883l_event(struct Qmc5883l *mag)
volatile bool data_available
data ready flag
@ QMC5883L_CONF_TMRC_DONE
struct i2c_periph * i2c_p
peripheral used for communcation
void qmc5883l_read(struct Qmc5883l *mag)
enum Qmc5883lStatus status
init status
bool initialized
config done flag
void qmc5883l_configure(struct Qmc5883l *mag)
struct i2c_transaction i2c_trans
i2c transaction
void qmc5883l_init(struct Qmc5883l *mag, struct i2c_periph *i2c_p, uint8_t addr, uint8_t data_rate)
union Qmc5883l::@348 data
uint8_t data_rate
sensor data rate
static void qmc5883l_periodic(struct Qmc5883l *mag)
convenience function: read or start configuration if not already initialized
int int32_t
Typedef defining 32 bit int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.