Paparazzi UAS  v5.2.2_stable-0-gd6b9f29
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
ms5611_spi.h File Reference

Measurement Specialties (Intersema) MS5611-01BA pressure/temperature sensor interface for SPI. More...

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

Go to the source code of this file.

Data Structures

struct  Ms5611_Spi
 

Functions

void ms5611_spi_init (struct Ms5611_Spi *ms, struct spi_periph *spi_p, uint8_t addr)
 
void ms5611_spi_start_configure (struct Ms5611_Spi *ms)
 
void ms5611_spi_start_conversion (struct Ms5611_Spi *ms)
 
void ms5611_spi_periodic_check (struct Ms5611_Spi *ms)
 Periodic function to ensure proper delay after triggering reset or conversion. More...
 
void ms5611_spi_event (struct Ms5611_Spi *ms)
 
static void ms5611_spi_read (struct Ms5611_Spi *ms)
 convenience function to trigger new measurement. More...
 
static void ms5611_spi_periodic (struct Ms5611_Spi *ms)
 convenience function More...
 

Detailed Description

Measurement Specialties (Intersema) MS5611-01BA pressure/temperature sensor interface for SPI.

Definition in file ms5611_spi.h.

Function Documentation

static void ms5611_spi_periodic ( struct Ms5611_Spi ms)
inlinestatic

convenience function

Definition at line 67 of file ms5611_spi.h.

References ms5611_spi_periodic_check(), and ms5611_spi_read().

Referenced by baro_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ms5611_spi_periodic_check ( struct Ms5611_Spi ms)

Periodic function to ensure proper delay after triggering reset or conversion.

Should run at 100Hz max. Typical conversion time is 8.22ms at max resolution.

Definition at line 90 of file ms5611_spi.c.

References MS5611_ADC_READ, MS5611_PROM_READ, MS5611_STATUS_ADC_D1, MS5611_STATUS_ADC_D2, MS5611_STATUS_CONV_D1, MS5611_STATUS_CONV_D1_OK, MS5611_STATUS_CONV_D2, MS5611_STATUS_CONV_D2_OK, MS5611_STATUS_PROM, MS5611_STATUS_RESET, MS5611_STATUS_RESET_OK, Ms5611_Spi::prom_cnt, Ms5611_Spi::spi_p, spi_submit(), Ms5611_Spi::spi_trans, SPITransDone, Ms5611_Spi::status, spi_transaction::status, and Ms5611_Spi::tx_buf.

Referenced by baro_ms5611_periodic_check(), and ms5611_spi_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static void ms5611_spi_read ( struct Ms5611_Spi ms)
inlinestatic

convenience function to trigger new measurement.

(or start configuration if not already initialized) Still need to regularly run ms5611_spi_periodic_check to complete the measurement.

Definition at line 59 of file ms5611_spi.h.

References Ms5611_Spi::initialized, ms5611_spi_start_configure(), and ms5611_spi_start_conversion().

Referenced by baro_ms5611_read(), and ms5611_spi_periodic().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ms5611_spi_start_configure ( struct Ms5611_Spi ms)

Definition at line 63 of file ms5611_spi.c.

References FALSE, Ms5611_Spi::initialized, MS5611_SOFT_RESET, MS5611_STATUS_RESET, MS5611_STATUS_UNINIT, Ms5611_Spi::prom_cnt, Ms5611_Spi::spi_p, spi_submit(), Ms5611_Spi::spi_trans, Ms5611_Spi::status, and Ms5611_Spi::tx_buf.

Referenced by ms5611_spi_read().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ms5611_spi_start_conversion ( struct Ms5611_Spi ms)

Definition at line 74 of file ms5611_spi.c.

References MS5611_START_CONV_D1, MS5611_STATUS_CONV_D1, MS5611_STATUS_IDLE, Ms5611_Spi::spi_p, spi_submit(), Ms5611_Spi::spi_trans, SPITransDone, Ms5611_Spi::status, spi_transaction::status, and Ms5611_Spi::tx_buf.

Referenced by ms5611_spi_read().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: