Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
Driver for LPS25H barometer I2C. More...
Go to the source code of this file.
Macros | |
#define | Int32FromBuf(buf, idx) (int32_t)(int8_t)buf[idx+2] << 16 | (uint16_t)buf[idx+1] << 8 | buf[idx]; |
Functions | |
void | lps25h_i2c_init (struct Lps25h_I2c *lps, struct i2c_periph *i2c_p, uint8_t addr) |
static void | lps25h_i2c_tx_reg (struct Lps25h_I2c *lps, uint8_t reg, uint8_t val) |
static void | lps25h_i2c_send_config (struct Lps25h_I2c *lps) |
void | lps25h_i2c_start_configure (struct Lps25h_I2c *lps) |
void | lps25h_i2c_read (struct Lps25h_I2c *lps) |
float | lps25h_readPressureMillibars (int32_t press) |
float | pressureToAltMeters (float pressure_mbar, float altimeter_setting_mbar) |
void | lps25h_i2c_event (struct Lps25h_I2c *lps) |
Driver for LPS25H barometer I2C.
Definition in file lps25h_i2c.c.
#define Int32FromBuf | ( | buf, | |
idx | |||
) | (int32_t)(int8_t)buf[idx+2] << 16 | (uint16_t)buf[idx+1] << 8 | buf[idx]; |
Definition at line 98 of file lps25h_i2c.c.
Referenced by lps25h_i2c_event().
void lps25h_i2c_event | ( | struct Lps25h_I2c * | lps | ) |
Definition at line 110 of file lps25h_i2c.c.
References i2c_transaction::buf, Lps25h_I2c::data, Lps25h_I2c::data_available, Lps25h_I2c::i2c_trans, I2CTransDone, I2CTransFailed, I2CTransSuccess, Lps25h_I2c::init_status, Lps25h_I2c::initialized, Int32FromBuf, LPS25H_CONF_UNINIT, lps25h_i2c_send_config(), and i2c_transaction::status.
void lps25h_i2c_init | ( | struct Lps25h_I2c * | lps, |
struct i2c_periph * | i2c_p, | ||
uint8_t | addr | ||
) |
Definition at line 33 of file lps25h_i2c.c.
References Lps25h_I2c::config, Lps25h_I2c::data_available, Lps25h_I2c::i2c_p, Lps25h_I2c::i2c_trans, I2CTransDone, Lps25h_I2c::init_status, Lps25h_I2c::initialized, LPS25H_CONF_UNINIT, lps25h_set_default_config(), i2c_transaction::slave_addr, and i2c_transaction::status.
void lps25h_i2c_read | ( | struct Lps25h_I2c * | lps | ) |
Definition at line 87 of file lps25h_i2c.c.
References i2c_transaction::buf, Lps25h_I2c::i2c_p, i2c_submit(), Lps25h_I2c::i2c_trans, I2CTransDone, I2CTransTxRx, Lps25h_I2c::initialized, i2c_transaction::len_r, i2c_transaction::len_w, LPS25H_REG_OUT_XL, i2c_transaction::status, and i2c_transaction::type.
Referenced by lps25h_i2c_periodic().
|
static |
Definition at line 59 of file lps25h_i2c.c.
References Lps25h_I2c::config, Lps25hConfig::ctrl1, Lps25h_I2c::i2c_trans, I2CTransDone, Lps25h_I2c::init_status, Lps25h_I2c::initialized, LPS25H_CONF_CTRL1, LPS25H_CONF_DONE, LPS25H_CTRL_REG1, lps25h_i2c_tx_reg(), and i2c_transaction::status.
Referenced by lps25h_i2c_event(), and lps25h_i2c_start_configure().
void lps25h_i2c_start_configure | ( | struct Lps25h_I2c * | lps | ) |
Definition at line 76 of file lps25h_i2c.c.
References Lps25h_I2c::i2c_trans, I2CTransDone, I2CTransSuccess, Lps25h_I2c::init_status, LPS25H_CONF_UNINIT, lps25h_i2c_send_config(), and i2c_transaction::status.
Referenced by lps25h_i2c_periodic().
|
static |
Definition at line 48 of file lps25h_i2c.c.
References i2c_transaction::buf, Lps25h_I2c::i2c_p, i2c_submit(), Lps25h_I2c::i2c_trans, I2CTransTx, i2c_transaction::len_r, i2c_transaction::len_w, i2c_transaction::type, and val.
Referenced by lps25h_i2c_send_config().
float lps25h_readPressureMillibars | ( | int32_t | press | ) |
Definition at line 101 of file lps25h_i2c.c.
float pressureToAltMeters | ( | float | pressure_mbar, |
float | altimeter_setting_mbar | ||
) |
Definition at line 106 of file lps25h_i2c.c.