|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
void mpl3115_read(struct Mpl3115 *mpl)
void mpl3115_event(struct Mpl3115 *mpl)
static void mpl3115_send_config(struct Mpl3115 *mpl)
#define MPL3115_PT_DATA_CFG
@ I2CTransFailed
transaction failed
#define MPL3115_REG_STATUS
uint32_t pressure
pressure in 1/4 Pascal
@ I2CTransSuccess
transaction successfully finished by I2C driver
#define MPL3115_REG_PT_DATA_CFG
#define MPL3115_OVERSAMPLING
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
struct i2c_transaction req_trans
I2C transaction for conversion request.
bool initialized
config done flag
void mpl3115_periodic(struct Mpl3115 *mpl)
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.
enum I2CTransactionStatus status
Transaction status.
void mpl3115_configure(struct Mpl3115 *mpl)
enum Mpl3115Status init_status
uint8_t slave_addr
Slave address.
bool raw_mode
set to TRUE to enable raw output
struct i2c_transaction trans
I2C transaction for reading and configuring.
bool alt_mode
set to TRUE to enable altitude output (otherwise pressure)
int16_t temperature
temperature in 1/16 degrees Celcius
@ I2CTransDone
transaction set to done by user level
float altitude
altitude in meters
struct i2c_periph * i2c_p
volatile bool data_available
data ready flag
#define MPL3115_REG_CTRL_REG1
void mpl3115_init(struct Mpl3115 *mpl, struct i2c_periph *i2c_p, uint8_t addr)