|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
31 void *mpu __attribute__((unused)));
50 #if IMU_MPU9250_READ_MAG
94 #if IMU_MPU9250_READ_MAG
95 #ifdef MPU9250_MAG_PRESCALER
104 #define Int16FromBuf(_buf,_idx) ((int16_t)((_buf[_idx]<<8) | _buf[_idx+1]))
127 #pragma GCC diagnostic push
128 #pragma GCC diagnostic ignored "-Wcast-qual"
130 #pragma GCC diagnostic pop
145 if (mpu->config.initialized) {
153 #if IMU_MPU9250_READ_MAG
@ MPU9250_I2C_CONF_I2C_MST_EN
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
struct i2c_periph * i2c_p
@ MPU9250_I2C_CONF_I2C_MST_DIS
enum Mpu9250MstClk i2c_mst_clk
MPU I2C master clock speed.
Mpu9250I2cSlaveConfigure configure
uint8_t nb_bytes
number of bytes to read starting with MPU9250_REG_INT_STATUS
enum Mpu9250I2cSlaveInitStatus slave_init_status
@ MPU9250_I2C_CONF_SLAVES_CONFIGURE
union Mpu9250_I2c::@336 data_rates
enum Mpu9250ConfStatus init_status
init status
@ I2CTransFailed
transaction failed
#define MPU9250_REG_INT_STATUS
void mpu9250_send_config(Mpu9250ConfigSet mpu_set, void *mpu, struct Mpu9250Config *config)
Configuration sequence called once before normal use.
struct i2c_transaction i2c_trans
void ak8963_init(struct Ak8963 *ak, struct i2c_periph *i2c_p, uint8_t addr)
Initialize AK8963 struct.
@ I2CTransSuccess
transaction successfully finished by I2C driver
struct Mpu9250Config config
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
#define MPU9250_REG_I2C_MST_CTRL
uint8_t data_ext[MPU9250_BUFFER_EXT_LEN]
void mpu9250_set_default_config(struct Mpu9250Config *c)
bool i2c_transceive(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len_w, uint16_t len_r)
Submit a write/read transaction.
bool i2c_bypass
Bypass MPU I2C.
#define MPU9250_REG_I2C_SLV4_CTRL
static void mpu9250_i2c_write_to_reg(void *mpu, uint8_t _reg, uint8_t _val)
@ MPU9250_I2C_CONF_UNINIT
enum I2CTransactionStatus status
Transaction status.
@ MPU9250_I2C_CONF_I2C_MST_CLK
bool initialized
config done flag
bool mpu9250_configure_i2c_slaves(Mpu9250ConfigSet mpu_set, void *mpu)
configure the registered I2C slaves
void mpu9250_i2c_event(struct Mpu9250_I2c *mpu)
#define MPU9250_I2C_NB_SLAVES
#define Int16FromBuf(_buf, _idx)
uint8_t slave_addr
Slave address.
union Mpu9250_I2c::@335 data_accel
void mpu9250_i2c_start_configure(struct Mpu9250_I2c *mpu)
uint8_t nb_slaves
number of used I2C slaves
void ak8963_configure(struct Ak8963 *ak)
#define MPU9250_REG_INT_PIN_CFG
@ MPU9250_I2C_CONF_I2C_MST_DELAY
#define MPU9250_REG_I2C_MST_DELAY
void ak8963_read(struct Ak8963 *ak)
void(* Mpu9250ConfigSet)(void *mpu, uint8_t _reg, uint8_t _val)
Configuration function prototype.
void mpu9250_i2c_read(struct Mpu9250_I2c *mpu)
@ I2CTransDone
transaction set to done by user level
@ MPU9250_I2C_CONF_I2C_BYPASS_EN
@ MPU9250_I2C_CONF_I2C_BYPASS_DIS
#define MPU9250_I2C_MST_EN
volatile bool data_available
data ready flag
struct Mpu9250I2cSlave slaves[MPU9250_I2C_NB_SLAVES]
I2C slaves.
#define MPU9250_REG_USER_CTRL
bool imu_mpu9250_configure_mag_slave(Mpu9250ConfigSet mpu_set, void *mpu)
callback function to configure ak8963 mag
@ MPU9250_I2C_CONF_I2C_SMPLRT
bool initialized
config done flag
void mpu9250_i2c_init(struct Mpu9250_I2c *mpu, struct i2c_periph *i2c_p, uint8_t addr)
uint8_t nb_slave_init
number of already configured/initialized slaves
struct Ak8963 akm
"internal" magnetometer
uint8_t i2c_mst_delay
MPU I2C slaves delayed sample rate.
void ak8963_event(struct Ak8963 *ak)