NinjaFlight
|
#include <stdbool.h>
#include <stdint.h>
#include <platform.h>
#include "barometer.h"
#include "barometer_ms5611.h"
#include "gpio.h"
#include "system.h"
#include "bus_i2c.h"
#include "build_config.h"
Macros | |
#define | MS5611_ADDR 0x77 |
#define | CMD_RESET 0x1E |
#define | CMD_ADC_READ 0x00 |
#define | CMD_ADC_CONV 0x40 |
#define | CMD_ADC_D1 0x00 |
#define | CMD_ADC_D2 0x10 |
#define | CMD_ADC_256 0x00 |
#define | CMD_ADC_512 0x02 |
#define | CMD_ADC_1024 0x04 |
#define | CMD_ADC_2048 0x06 |
#define | CMD_ADC_4096 0x08 |
#define | CMD_PROM_RD 0xA0 |
#define | PROM_NB 8 |
Functions | |
int8_t | ms5611_crc (uint16_t *prom) |
void | ms5611_calculate (uint32_t *pressure, int32_t *temperature) |
bool | ms5611Detect (baro_t *baro) |
Variables | |
uint32_t | ms5611_ut |
uint32_t | ms5611_up |
uint16_t | ms5611_c [PROM_NB] |
#define CMD_ADC_1024 0x04 |
#define CMD_ADC_2048 0x06 |
#define CMD_ADC_256 0x00 |
#define CMD_ADC_4096 0x08 |
#define CMD_ADC_512 0x02 |
#define CMD_ADC_CONV 0x40 |
#define CMD_ADC_D1 0x00 |
#define CMD_ADC_D2 0x10 |
#define CMD_ADC_READ 0x00 |
#define CMD_PROM_RD 0xA0 |
#define CMD_RESET 0x1E |
#define MS5611_ADDR 0x77 |
#define PROM_NB 8 |
void ms5611_calculate | ( | uint32_t * | pressure, |
int32_t * | temperature | ||
) |
int8_t ms5611_crc | ( | uint16_t * | prom | ) |
bool ms5611Detect | ( | baro_t * | baro | ) |
uint16_t ms5611_c[PROM_NB] |
uint32_t ms5611_up |
uint32_t ms5611_ut |