|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
35 #define AK8975_I2C_SLV_ADDR (0x0C<<1)
36 #define AK8975_REG_ST1_ADDR 0x02
37 #define AK8975_REG_CNTL_ADDR 0x0A
38 #define AK8975_REG_ASASX 0x10
39 #define AK8975_MODE_FUSE_ACCESS 0b00001111
40 #define AK8975_MODE_POWER_DOWN 0b00000000
41 #define AK8975_MODE_SINGLE_MEAS 0b00000001
struct i2c_transaction i2c_trans
i2c transaction used for communication with the ak8936
void ak8975_read(struct Ak8975 *ak)
Ak8975Status
Normal status states.
uint32_t last_meas_time
last measurement time in ms
Ak8975ConfStatus
config status states
Paparazzi fixed point algebra.
@ AK_DISABLE_ACCESS_CALIBRATION
void ak8975_event(struct Ak8975 *ak)
void ak8975_configure(struct Ak8975 *ak)
void ak8975_init(struct Ak8975 *ak, struct i2c_periph *i2c_p, uint8_t addr)
static void ak8975_periodic(struct Ak8975 *ak)
convenience function: read or start configuration if not already initialized
I2C transaction structure.
enum Ak8975ConfStatus init_status
init status
bool initialized
config done flag
enum Ak8975Status status
main status
volatile bool data_available
data ready flag
struct i2c_periph * i2c_p
peripheral used for communcation