Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the source code of this file.
Macros | |
#define | Int16FromBuf(_buf, _idx) ((int16_t)(_buf[_idx] | (_buf[_idx+1] << 8))) |
Functions | |
void | ak8963_init (struct Ak8963 *ak, struct i2c_periph *i2c_p, uint8_t addr) |
Initialize AK8963 struct. More... | |
void | ak8963_configure (struct Ak8963 *ak) |
void | ak8963_read (struct Ak8963 *ak) |
void | ak8963_event (struct Ak8963 *ak) |
Driver for the AKM AK8963 magnetometer.
Definition in file ak8963.c.
#define Int16FromBuf | ( | _buf, | |
_idx | |||
) | ((int16_t)(_buf[_idx] | (_buf[_idx+1] << 8))) |
void ak8963_configure | ( | struct Ak8963 * | ak | ) |
Definition at line 46 of file ak8963.c.
References AK8963_CNTL1_CM_2, AK8963_REG_CNTL1, AK8963_REG_CNTL2, AK_CONF_MODE, AK_CONF_UNINIT, i2c_transaction::buf, Ak8963::i2c_p, Ak8963::i2c_trans, i2c_transmit(), I2CTransDone, I2CTransFailed, I2CTransSuccess, Ak8963::init_status, Ak8963::initialized, i2c_transaction::slave_addr, and i2c_transaction::status.
Referenced by ak8963_periodic(), and imu_mpu9250_configure_mag_slave().
void ak8963_event | ( | struct Ak8963 * | ak | ) |
Definition at line 95 of file ak8963.c.
References AK8963_REG_HXL, AK8963_REG_ST2, AK_STATUS_IDLE, AK_STATUS_READ, i2c_transaction::buf, Ak8963::data, Ak8963::data_available, Ak8963::i2c_p, Ak8963::i2c_trans, i2c_transceive(), I2CTransDone, I2CTransFailed, I2CTransSuccess, Ak8963::initialized, Int16FromBuf, i2c_transaction::slave_addr, Ak8963::status, and i2c_transaction::status.
Referenced by imu_bebop_event(), imu_disco_event(), and mpu9250_i2c_event().
void ak8963_init | ( | struct Ak8963 * | ak, |
struct i2c_periph * | i2c_p, | ||
uint8_t | addr | ||
) |
Initialize AK8963 struct.
Definition at line 34 of file ak8963.c.
References AK_CONF_UNINIT, Ak8963::data_available, Ak8963::i2c_p, Ak8963::i2c_trans, I2CTransDone, Ak8963::init_status, Ak8963::initialized, i2c_transaction::slave_addr, and i2c_transaction::status.
Referenced by imu_bebop_init(), imu_disco_init(), and mpu9250_i2c_init().
void ak8963_read | ( | struct Ak8963 * | ak | ) |
Definition at line 83 of file ak8963.c.
References AK8963_REG_ST1, AK_STATUS_IDLE, i2c_transaction::buf, Ak8963::i2c_p, Ak8963::i2c_trans, i2c_transceive(), i2c_transaction::slave_addr, and Ak8963::status.
Referenced by ak8963_periodic(), and mpu9250_i2c_read().