STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
dev_ms5611.h File Reference
#include <stdint.h>
#include "dev_bus.h"
Include dependency graph for dev_ms5611.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ms5611_prom_t

Macros

#define MS5611_CONVERSION_MS   10U /* >= 9.04 ms max at OSR 4096 */

Enumerations

enum  ms5611_conversion_t { MS5611_D1_PRESSURE = 0x48 , MS5611_D2_TEMPERATURE = 0x58 }

Functions

uint8_t ms5611_crc4 (const ms5611_prom_t *prom)
int ms5611_read_prom (const dev_bus_t *bus, ms5611_prom_t *prom)
int ms5611_start (const dev_bus_t *bus, ms5611_conversion_t which)
int ms5611_read_adc (const dev_bus_t *bus, uint32_t *raw)
void ms5611_compensate (const ms5611_prom_t *prom, uint32_t d1, uint32_t d2, int32_t *temp_c100, int32_t *pressure_pa)

Macro Definition Documentation

◆ MS5611_CONVERSION_MS

#define MS5611_CONVERSION_MS   10U /* >= 9.04 ms max at OSR 4096 */

Definition at line 29 of file dev_ms5611.h.

Enumeration Type Documentation

◆ ms5611_conversion_t

Enumerator
MS5611_D1_PRESSURE 
MS5611_D2_TEMPERATURE 

Definition at line 35 of file dev_ms5611.h.

Function Documentation

◆ ms5611_compensate()

void ms5611_compensate ( const ms5611_prom_t * prom,
uint32_t d1,
uint32_t d2,
int32_t * temp_c100,
int32_t * pressure_pa )

Definition at line 72 of file dev_ms5611.c.

References d1, d2, temp, and ms5611_prom_t::word.

Referenced by compensate(), and step_baro().

◆ ms5611_crc4()

uint8_t ms5611_crc4 ( const ms5611_prom_t * prom)

Definition at line 8 of file dev_ms5611.c.

References ms5611_prom_t::word.

Referenced by ms5611_read_prom(), and test_prom_read_and_crc().

◆ ms5611_read_adc()

int ms5611_read_adc ( const dev_bus_t * bus,
uint32_t * raw )

Definition at line 59 of file dev_ms5611.c.

References CMD_ADC_READ, DEV_ERR_BUS, DEV_ERR_DATA, DEV_ERR_PARAM, and DEV_OK.

Referenced by step_baro(), and test_conversion_commands_and_adc().

◆ ms5611_read_prom()

◆ ms5611_start()

int ms5611_start ( const dev_bus_t * bus,
ms5611_conversion_t which )