126 mpl->
altitude = (float)(tmp >> 4) / (1 << 4);
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
void mpl3115_read(struct Mpl3115 *mpl)
static void mpl3115_send_config(struct Mpl3115 *mpl)
void mpl3115_periodic(struct Mpl3115 *mpl)
void mpl3115_init(struct Mpl3115 *mpl, struct i2c_periph *i2c_p, uint8_t addr)
void mpl3115_configure(struct Mpl3115 *mpl)
void mpl3115_event(struct Mpl3115 *mpl)
Driver for the baro MPL3115A2 from Freescale (i2c)
uint32_t pressure
pressure in 1/4 Pascal
bool alt_mode
set to TRUE to enable altitude output (otherwise pressure)
float altitude
altitude in meters
bool initialized
config done flag
struct i2c_transaction req_trans
I2C transaction for conversion request.
#define MPL3115_OVERSAMPLING
#define MPL3115_REG_CTRL_REG1
bool raw_mode
set to TRUE to enable raw output
int16_t temperature
temperature in 1/16 degrees Celcius
struct i2c_periph * i2c_p
#define MPL3115_PT_DATA_CFG
enum Mpl3115Status init_status
struct i2c_transaction trans
I2C transaction for reading and configuring.
volatile bool data_available
data ready flag
#define MPL3115_REG_STATUS
#define MPL3115_REG_PT_DATA_CFG
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
short int16_t
Typedef defining 16 bit short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.