STAR
Cal STAR — firmware, DAQ server, and engine design
Loading...
Searching...
No Matches
dev_ms5611.c File Reference
#include "dev_ms5611.h"
#include <stddef.h>
Include dependency graph for dev_ms5611.c:

Go to the source code of this file.

Macros

#define CMD_ADC_READ   0x00U
#define CMD_PROM_READ   0xA0U

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

◆ CMD_ADC_READ

#define CMD_ADC_READ   0x00U

Definition at line 5 of file dev_ms5611.c.

Referenced by ms5611_read_adc().

◆ CMD_PROM_READ

#define CMD_PROM_READ   0xA0U

Definition at line 6 of file dev_ms5611.c.

Referenced by ms5611_read_prom().

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 )