|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
Go to the documentation of this file.
80 #define Int16FromBuf(_buf,_idx) ((int16_t)((_buf[_idx]<<8) | _buf[_idx+1]))
99 mpu->
temp = (float)temp_raw / 340.0
f + 36.53
f;
106 #pragma GCC diagnostic push
107 #pragma GCC diagnostic ignored "-Wcast-qual"
109 #pragma GCC diagnostic pop
124 if (mpu->config.initialized) {
float temp
temperature in degrees Celcius
uint8_t nb_bytes
number of bytes to read starting with MPU60X0_REG_INT_STATUS
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
uint8_t nb_slave_init
number of already configured/initialized slaves
#define MPU60X0_REG_USER_CTRL
@ MPU60X0_I2C_CONF_I2C_MST_DELAY
@ MPU60X0_I2C_CONF_SLAVES_CONFIGURE
@ MPU60X0_I2C_CONF_I2C_MST_CLK
@ MPU60X0_I2C_CONF_I2C_SMPLRT
#define MPU60X0_REG_INT_PIN_CFG
@ I2CTransFailed
transaction failed
void mpu60x0_i2c_start_configure(struct Mpu60x0_I2c *mpu)
enum Mpu60x0MstClk i2c_mst_clk
MPU I2C master clock speed.
#define MPU60X0_REG_I2C_MST_CTRL
@ MPU60X0_I2C_CONF_I2C_BYPASS_DIS
struct i2c_periph * i2c_p
bool mpu60x0_configure_i2c_slaves(Mpu60x0ConfigSet mpu_set, void *mpu)
configure the registered I2C slaves
void(* Mpu60x0ConfigSet)(void *mpu, uint8_t _reg, uint8_t _val)
Configuration function prototype.
@ MPU60X0_I2C_CONF_I2C_MST_DIS
@ I2CTransSuccess
transaction successfully finished by I2C driver
@ MPU60X0_I2C_CONF_I2C_MST_EN
#define MPU60X0_REG_I2C_MST_DELAY
Mpu60x0I2cSlaveConfigure configure
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
void mpu60x0_i2c_init(struct Mpu60x0_I2c *mpu, struct i2c_periph *i2c_p, uint8_t addr)
void mpu60x0_send_config(Mpu60x0ConfigSet mpu_set, void *mpu, struct Mpu60x0Config *config)
Configuration sequence called once before normal use.
enum Mpu60x0I2cSlaveInitStatus slave_init_status
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.
struct i2c_transaction i2c_trans
void mpu60x0_i2c_event(struct Mpu60x0_I2c *mpu)
enum Mpu60x0ConfStatus init_status
init status
enum I2CTransactionStatus status
Transaction status.
struct Mpu60x0Config config
void mpu60x0_i2c_read(struct Mpu60x0_I2c *mpu)
static void mpu60x0_i2c_write_to_reg(void *mpu, uint8_t _reg, uint8_t _val)
uint16_t f
Camera baseline, in meters (i.e. horizontal distance between the two cameras of the stereo setup)
uint8_t slave_addr
Slave address.
#define MPU60X0_I2C_NB_SLAVES
uint8_t nb_slaves
number of used I2C slaves
bool i2c_bypass
Bypass MPU I2C.
uint8_t data_ext[MPU60X0_BUFFER_EXT_LEN]
union Mpu60x0_I2c::@331 data_accel
#define MPU60X0_REG_INT_STATUS
@ MPU60X0_I2C_CONF_I2C_BYPASS_EN
uint8_t i2c_mst_delay
MPU I2C slaves delayed sample rate.
struct Mpu60x0I2cSlave slaves[MPU60X0_I2C_NB_SLAVES]
I2C slaves.
union Mpu60x0_I2c::@332 data_rates
void mpu60x0_set_default_config(struct Mpu60x0Config *c)
@ I2CTransDone
transaction set to done by user level
@ MPU60X0_I2C_CONF_UNINIT
volatile bool data_available
data ready flag
#define Int16FromBuf(_buf, _idx)
#define MPU60X0_REG_I2C_SLV4_CTRL
#define MPU60X0_I2C_MST_EN
bool initialized
config done flag