Paparazzi UAS  v5.18.0_stable
Paparazzi is a free software Unmanned Aircraft System.
ms5611.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2013 Felix Ruess <felix.ruess@gmail.com>
3  *
4  * This file is part of paparazzi.
5  *
6  * paparazzi is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * paparazzi is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with paparazzi; see the file COPYING. If not, write to
18  * the Free Software Foundation, 59 Temple Place - Suite 330,
19  * Boston, MA 02111-1307, USA.
20  */
21 
28 #ifndef MS5611_H
29 #define MS5611_H
30 
31 #include "std.h"
32 
33 /* Include address and register definition */
35 
36 
49 };
50 
51 struct Ms5611Data {
57 };
58 
59 extern bool ms5611_prom_crc_ok(uint16_t *prom);
60 extern bool ms5611_calc(struct Ms5611Data *ms);
61 extern bool ms5607_calc(struct Ms5611Data *ms);
62 
63 #endif /* MS5611_H */
uint16_t
unsigned short uint16_t
Definition: types.h:16
ms5611_prom_crc_ok
bool ms5611_prom_crc_ok(uint16_t *prom)
Check if CRC of PROM data is OK.
Definition: ms5611.c:36
Ms5611Data::temperature
int32_t temperature
temperature with 0.01 degrees Celsius resolution
Definition: ms5611.h:53
MS5611_STATUS_CONV_D2
@ MS5611_STATUS_CONV_D2
Definition: ms5611.h:46
MS5611_STATUS_UNINIT
@ MS5611_STATUS_UNINIT
Definition: ms5611.h:38
MS5611_STATUS_ADC_D1
@ MS5611_STATUS_ADC_D1
Definition: ms5611.h:45
uint32_t
unsigned long uint32_t
Definition: types.h:18
Ms5611Data::d2
uint32_t d2
Definition: ms5611.h:56
ms5611_calc
bool ms5611_calc(struct Ms5611Data *ms)
Calculate temperature and compensated pressure for MS5611.
Definition: ms5611.c:81
std.h
Ms5611Data
Definition: ms5611.h:51
MS5611_STATUS_PROM
@ MS5611_STATUS_PROM
Definition: ms5611.h:41
MS5611_STATUS_RESET
@ MS5611_STATUS_RESET
Definition: ms5611.h:39
MS5611_STATUS_CONV_D1_OK
@ MS5611_STATUS_CONV_D1_OK
Definition: ms5611.h:44
PROM_NB
#define PROM_NB
Definition: ms5611_regs.h:38
MS5611_STATUS_IDLE
@ MS5611_STATUS_IDLE
Definition: ms5611.h:42
MS5611_STATUS_CONV_D2_OK
@ MS5611_STATUS_CONV_D2_OK
Definition: ms5611.h:47
MS5611_STATUS_ADC_D2
@ MS5611_STATUS_ADC_D2
Definition: ms5611.h:48
ms5607_calc
bool ms5607_calc(struct Ms5611Data *ms)
Calculate temperature and compensated pressure for MS5607.
Definition: ms5611.c:124
Ms5611Status
Ms5611Status
Definition: ms5611.h:37
MS5611_STATUS_CONV_D1
@ MS5611_STATUS_CONV_D1
Definition: ms5611.h:43
int32_t
signed long int32_t
Definition: types.h:19
ms5611_regs.h
MS5611_STATUS_RESET_OK
@ MS5611_STATUS_RESET_OK
Definition: ms5611.h:40
Ms5611Data::pressure
uint32_t pressure
pressure in Pascal (0.01mbar)
Definition: ms5611.h:52
Ms5611Data::d1
uint32_t d1
Definition: ms5611.h:55
Ms5611Data::c
uint16_t c[PROM_NB]
Definition: ms5611.h:54