91 #define Int16FromBuf(_buf,_idx) ((int16_t)((_buf[_idx+1]<<8) | _buf[_idx]))
148 if (bmi->config.initialized) {
void bmi088_set_default_config(struct Bmi088Config *c)
void bmi088_send_config(Bmi088ConfigSet bmi_set, void *bmi, struct Bmi088Config *config)
Configuration sequence called once before normal use.
#define BMI088_CONFIG_ACCEL
bool initialized
config done flag
#define BMI088_CONFIG_GYRO
enum Bmi088ConfStatus init_status
init status
@ BMI088_CONF_ACCEL_PWR_CTRL
static void bmi088_i2c_write_to_reg(void *bmi, uint8_t _reg, uint8_t _val, uint8_t _type)
void bmi088_i2c_init(struct Bmi088_I2c *bmi, struct i2c_periph *i2c_p, uint8_t gyro_addr, uint8_t accel_addr)
void bmi088_i2c_read(struct Bmi088_I2c *bmi)
void bmi088_i2c_event(struct Bmi088_I2c *bmi)
void bmi088_i2c_start_configure(struct Bmi088_I2c *bmi)
#define Int16FromBuf(_buf, _idx)
Driver for the BMI088 using I2C.
struct i2c_transaction gyro_trans
i2c transaction for gyro
volatile bool accel_available
accel data ready flag
struct i2c_transaction accel_trans
i2c transaction for accel
union Bmi088_I2c::@312 data_accel
struct Bmi088Config config
union Bmi088_I2c::@313 data_rates
volatile bool gyro_available
gyro data ready flag
struct i2c_periph * i2c_p
#define BMI088_ACCEL_X_LSB
#define BMI088_GYRO_RATE_X_LSB
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
enum I2CTransactionStatus status
Transaction status.
uint8_t slave_addr
Slave address.
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
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.
@ I2CTransSuccess
transaction successfully finished by I2C driver
@ I2CTransFailed
transaction failed
@ I2CTransDone
transaction set to done by user level
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.