Paparazzi UAS  v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ms5611.h File Reference

MS5611 barometer driver common interface (I2C and SPI). More...

#include "std.h"
#include "peripherals/ms5611_regs.h"
+ Include dependency graph for ms5611.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Ms5611Data
 

Enumerations

enum  Ms5611Status {
  MS5611_STATUS_UNINIT, MS5611_STATUS_RESET, MS5611_STATUS_RESET_OK, MS5611_STATUS_PROM,
  MS5611_STATUS_IDLE, MS5611_STATUS_CONV_D1, MS5611_STATUS_CONV_D1_OK, MS5611_STATUS_ADC_D1,
  MS5611_STATUS_CONV_D2, MS5611_STATUS_CONV_D2_OK, MS5611_STATUS_ADC_D2
}
 

Functions

bool ms5611_prom_crc_ok (uint16_t *prom)
 Check if CRC of PROM data is OK. More...
 
bool ms5611_calc (struct Ms5611Data *ms)
 Calculate temperature and compensated pressure for MS5611. More...
 
bool ms5607_calc (struct Ms5611Data *ms)
 Calculate temperature and compensated pressure for MS5607. More...
 

Detailed Description

MS5611 barometer driver common interface (I2C and SPI).

Definition in file ms5611.h.


Data Structure Documentation

struct Ms5611Data

Definition at line 51 of file ms5611.h.

Data Fields
uint16_t c[PROM_NB]
uint32_t d1
uint32_t d2
uint32_t pressure pressure in Pascal (0.01mbar)
int32_t temperature temperature with 0.01 degrees Celsius resolution

Enumeration Type Documentation

Enumerator
MS5611_STATUS_UNINIT 
MS5611_STATUS_RESET 
MS5611_STATUS_RESET_OK 
MS5611_STATUS_PROM 
MS5611_STATUS_IDLE 
MS5611_STATUS_CONV_D1 
MS5611_STATUS_CONV_D1_OK 
MS5611_STATUS_ADC_D1 
MS5611_STATUS_CONV_D2 
MS5611_STATUS_CONV_D2_OK 
MS5611_STATUS_ADC_D2 

Definition at line 37 of file ms5611.h.

Function Documentation

bool ms5607_calc ( struct Ms5611Data ms)

Calculate temperature and compensated pressure for MS5607.

MS5607 basically has half the resolution of the MS5611.

Returns
TRUE if measurement was valid, FALSE otherwise

Definition at line 124 of file ms5611.c.

References Ms5611Data::c, Ms5611Data::d1, Ms5611Data::d2, p, Ms5611Data::pressure, and Ms5611Data::temperature.

Referenced by ms5611_i2c_event(), and ms5611_spi_event().

+ Here is the caller graph for this function:

bool ms5611_calc ( struct Ms5611Data ms)

Calculate temperature and compensated pressure for MS5611.

Returns
TRUE if measurement was valid, FALSE otherwise

Definition at line 81 of file ms5611.c.

References Ms5611Data::c, Ms5611Data::d1, Ms5611Data::d2, p, Ms5611Data::pressure, and Ms5611Data::temperature.

Referenced by ms5611_i2c_event(), and ms5611_spi_event().

+ Here is the caller graph for this function:

bool ms5611_prom_crc_ok ( uint16_t prom)

Check if CRC of PROM data is OK.

Returns
TRUE if OK, FALSE otherwise

Definition at line 36 of file ms5611.c.

References crc.

Referenced by ms5611_i2c_event(), and ms5611_spi_event().

+ Here is the caller graph for this function: