APM:Libraries
Macros | Functions | Variables
AP_Baro_MS5611.cpp File Reference
#include "AP_Baro_MS5611.h"
#include <utility>
#include <stdio.h>
#include <AP_Math/AP_Math.h>
Include dependency graph for AP_Baro_MS5611.cpp:

Go to the source code of this file.

Macros

#define ADDR_CMD_CONVERT_D1_OSR256   0x40
 
#define ADDR_CMD_CONVERT_D1_OSR512   0x42
 
#define ADDR_CMD_CONVERT_D1_OSR1024   0x44
 
#define ADDR_CMD_CONVERT_D1_OSR2048   0x46
 
#define ADDR_CMD_CONVERT_D1_OSR4096   0x48
 
#define ADDR_CMD_CONVERT_D2_OSR256   0x50
 
#define ADDR_CMD_CONVERT_D2_OSR512   0x52
 
#define ADDR_CMD_CONVERT_D2_OSR1024   0x54
 
#define ADDR_CMD_CONVERT_D2_OSR2048   0x56
 
#define ADDR_CMD_CONVERT_D2_OSR4096   0x58
 

Functions

static uint16_t crc4 (uint16_t *data)
 

Variables

const AP_HAL::HALhal
 
static const uint8_t CMD_MS56XX_RESET = 0x1E
 
static const uint8_t CMD_MS56XX_READ_ADC = 0x00
 
static const uint8_t CMD_MS56XX_PROM = 0xA0
 
static const uint8_t ADDR_CMD_CONVERT_PRESSURE = ADDR_CMD_CONVERT_D1_OSR1024
 
static const uint8_t ADDR_CMD_CONVERT_TEMPERATURE = ADDR_CMD_CONVERT_D2_OSR1024
 

Macro Definition Documentation

◆ ADDR_CMD_CONVERT_D1_OSR1024

#define ADDR_CMD_CONVERT_D1_OSR1024   0x44

Definition at line 33 of file AP_Baro_MS5611.cpp.

◆ ADDR_CMD_CONVERT_D1_OSR2048

#define ADDR_CMD_CONVERT_D1_OSR2048   0x46

Definition at line 34 of file AP_Baro_MS5611.cpp.

◆ ADDR_CMD_CONVERT_D1_OSR256

#define ADDR_CMD_CONVERT_D1_OSR256   0x40

Definition at line 31 of file AP_Baro_MS5611.cpp.

◆ ADDR_CMD_CONVERT_D1_OSR4096

#define ADDR_CMD_CONVERT_D1_OSR4096   0x48

Definition at line 35 of file AP_Baro_MS5611.cpp.

◆ ADDR_CMD_CONVERT_D1_OSR512

#define ADDR_CMD_CONVERT_D1_OSR512   0x42

Definition at line 32 of file AP_Baro_MS5611.cpp.

◆ ADDR_CMD_CONVERT_D2_OSR1024

#define ADDR_CMD_CONVERT_D2_OSR1024   0x54

Definition at line 40 of file AP_Baro_MS5611.cpp.

◆ ADDR_CMD_CONVERT_D2_OSR2048

#define ADDR_CMD_CONVERT_D2_OSR2048   0x56

Definition at line 41 of file AP_Baro_MS5611.cpp.

◆ ADDR_CMD_CONVERT_D2_OSR256

#define ADDR_CMD_CONVERT_D2_OSR256   0x50

Definition at line 38 of file AP_Baro_MS5611.cpp.

◆ ADDR_CMD_CONVERT_D2_OSR4096

#define ADDR_CMD_CONVERT_D2_OSR4096   0x58

Definition at line 42 of file AP_Baro_MS5611.cpp.

◆ ADDR_CMD_CONVERT_D2_OSR512

#define ADDR_CMD_CONVERT_D2_OSR512   0x52

Definition at line 39 of file AP_Baro_MS5611.cpp.

Function Documentation

◆ crc4()

static uint16_t crc4 ( uint16_t *  data)
static

MS56XX crc4 method from datasheet for 16 bytes (8 short values)

Definition at line 156 of file AP_Baro_MS5611.cpp.

Referenced by AP_Baro_MS56XX::_read_prom_5611(), and AP_Baro_MS56XX::_read_prom_5637().

Here is the caller graph for this function:

Variable Documentation

◆ ADDR_CMD_CONVERT_PRESSURE

const uint8_t ADDR_CMD_CONVERT_PRESSURE = ADDR_CMD_CONVERT_D1_OSR1024
static

Definition at line 50 of file AP_Baro_MS5611.cpp.

Referenced by AP_Baro_MS56XX::_timer().

◆ ADDR_CMD_CONVERT_TEMPERATURE

const uint8_t ADDR_CMD_CONVERT_TEMPERATURE = ADDR_CMD_CONVERT_D2_OSR1024
static

Definition at line 51 of file AP_Baro_MS5611.cpp.

Referenced by AP_Baro_MS56XX::_init(), and AP_Baro_MS56XX::_timer().

◆ CMD_MS56XX_PROM

const uint8_t CMD_MS56XX_PROM = 0xA0
static

Definition at line 28 of file AP_Baro_MS5611.cpp.

Referenced by AP_Baro_MS56XX::_read_prom_word().

◆ CMD_MS56XX_READ_ADC

const uint8_t CMD_MS56XX_READ_ADC = 0x00
static

Definition at line 25 of file AP_Baro_MS5611.cpp.

Referenced by AP_Baro_MS56XX::_read_adc().

◆ CMD_MS56XX_RESET

const uint8_t CMD_MS56XX_RESET = 0x1E
static

Definition at line 24 of file AP_Baro_MS5611.cpp.

Referenced by AP_Baro_MS56XX::_init().

◆ hal

const AP_HAL::HAL& hal

Definition at line 14 of file AC_PID_test.cpp.