|
Paparazzi UAS
v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
|
struct i2c_periph * i2c_p
bool initialized
config done flag
volatile uint8_t buf[I2C_BUF_LEN]
Transaction buffer With I2C_BUF_LEN number of bytes.
struct i2c_transaction i2c_trans
bool is_ms5607
TRUE if MS5607, FALSE if MS5611.
bool ms5611_prom_crc_ok(uint16_t *prom)
Check if CRC of PROM data is OK.
void ms5611_i2c_init(struct Ms5611_I2c *ms, struct i2c_periph *i2c_p, uint8_t addr, bool is_ms5607)
@ I2CTransFailed
transaction failed
bool ms5611_calc(struct Ms5611Data *ms)
Calculate temperature and compensated pressure for MS5611.
@ I2CTransSuccess
transaction successfully finished by I2C driver
bool i2c_transmit(struct i2c_periph *p, struct i2c_transaction *t, uint8_t s_addr, uint8_t len)
Submit a write only transaction.
#define MS5611_START_CONV_D2
volatile bool data_available
data ready flag
@ MS5611_STATUS_CONV_D1_OK
#define MS5611_SOFT_RESET
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.
void ms5611_i2c_start_configure(struct Ms5611_I2c *ms)
@ MS5611_STATUS_CONV_D2_OK
enum I2CTransactionStatus status
Transaction status.
bool ms5607_calc(struct Ms5611Data *ms)
Calculate temperature and compensated pressure for MS5607.
void ms5611_i2c_event(struct Ms5611_I2c *ms)
if(GpsFixValid() &&e_identification_started)
uint8_t slave_addr
Slave address.
void ms5611_i2c_periodic_check(struct Ms5611_I2c *ms)
Periodic function to ensure proper delay after triggering reset or conversion.
int32_t prom_cnt
number of bytes read from PROM
void ms5611_i2c_start_conversion(struct Ms5611_I2c *ms)
@ I2CTransDone
transaction set to done by user level
#define MS5611_START_CONV_D1