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+1]<<8) | _buf[_idx])) |
Functions | |
void | l3g4200_set_default_config (struct L3g4200Config *c) |
void | l3g4200_init (struct L3g4200 *l3g, struct i2c_periph *i2c_p, uint8_t addr) |
Initialize L3g4200 struct and set default config options. More... | |
static void | l3g4200_i2c_tx_reg (struct L3g4200 *l3g, uint8_t reg, uint8_t val) |
static void | l3g4200_send_config (struct L3g4200 *l3g) |
void | l3g4200_start_configure (struct L3g4200 *l3g) |
void | l3g4200_read (struct L3g4200 *l3g) |
void | l3g4200_event (struct L3g4200 *l3g) |
Driver for L3G4200 from ST.
Definition in file l3g4200.c.
#define Int16FromBuf | ( | _buf, | |
_idx | |||
) | ((int16_t)((_buf[_idx+1]<<8) | _buf[_idx])) |
void l3g4200_event | ( | struct L3g4200 * | l3g | ) |
Definition at line 114 of file l3g4200.c.
References i2c_transaction::buf, L3g4200::data, L3g4200::data_available, L3g4200::i2c_trans, I2CTransDone, I2CTransFailed, I2CTransSuccess, L3g4200::init_status, L3g4200::initialized, Int16FromBuf, l3g4200_send_config(), L3G_CONF_UNINIT, and i2c_transaction::status.
Referenced by imu_gl1_event().
Definition at line 60 of file l3g4200.c.
References i2c_transaction::buf, L3g4200::i2c_p, L3g4200::i2c_trans, i2c_transmit(), i2c_transaction::slave_addr, and val.
Referenced by l3g4200_send_config().
void l3g4200_init | ( | struct L3g4200 * | l3g, |
struct i2c_periph * | i2c_p, | ||
uint8_t | addr | ||
) |
Initialize L3g4200 struct and set default config options.
l3g | L3g4200 struct |
i2c_p | I2C periperal to use |
addr | I2C address of L3G4200 |
Definition at line 47 of file l3g4200.c.
References L3g4200::config, L3g4200::i2c_p, L3g4200::i2c_trans, I2CTransDone, L3g4200::init_status, L3g4200::initialized, l3g4200_set_default_config(), L3G_CONF_UNINIT, i2c_transaction::slave_addr, and i2c_transaction::status.
Referenced by imu_gl1_init().
void l3g4200_read | ( | struct L3g4200 * | l3g | ) |
Definition at line 104 of file l3g4200.c.
References i2c_transaction::buf, L3g4200::i2c_p, L3g4200::i2c_trans, i2c_transceive(), I2CTransDone, L3g4200::initialized, L3G4200_REG_STATUS_REG, i2c_transaction::slave_addr, and i2c_transaction::status.
Referenced by l3g4200_periodic().
|
static |
Definition at line 68 of file l3g4200.c.
References L3g4200::config, L3g4200Config::ctrl_reg1, L3g4200Config::ctrl_reg4, L3g4200Config::ctrl_reg5, L3g4200::i2c_trans, I2CTransDone, L3g4200::init_status, L3g4200::initialized, l3g4200_i2c_tx_reg(), L3G4200_REG_CTRL_REG1, L3G4200_REG_CTRL_REG4, L3G4200_REG_CTRL_REG5, L3G_CONF_DONE, L3G_CONF_REG1, L3G_CONF_REG4, L3G_CONF_REG5, and i2c_transaction::status.
Referenced by l3g4200_event(), and l3g4200_start_configure().
void l3g4200_set_default_config | ( | struct L3g4200Config * | c | ) |
Definition at line 33 of file l3g4200.c.
References c(), L3G4200_DEFAULT_CTRL_REG1, L3G4200_DEFAULT_CTRL_REG4, and L3G4200_DEFAULT_CTRL_REG5.
Referenced by l3g4200_init().
void l3g4200_start_configure | ( | struct L3g4200 * | l3g | ) |
Definition at line 93 of file l3g4200.c.
References L3g4200::i2c_trans, I2CTransDone, I2CTransSuccess, L3g4200::init_status, l3g4200_send_config(), L3G_CONF_UNINIT, and i2c_transaction::status.
Referenced by l3g4200_periodic().