Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
bmp3_i2c.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 Gautier Hattenberger <gautier.hattenberger@enac.fr>
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, see
18 * <http://www.gnu.org/licenses/>.
19 */
20
31#ifndef BMP3_I2C_H
32#define BMP3_I2C_H
33
34/* Header includes */
36#include "mcu_periph/i2c.h"
37
38struct Bmp3_I2c {
43 volatile bool data_available;
45#if (BMP3_COMPENSATION == BMP3_DOUBLE_PRECISION_COMPENSATION) || ( BMP3_COMPENSATION == BMP3_SINGLE_PRECISION_COMPENSATION)
47#endif
50 float pressure;
52};
53
55extern void bmp3_i2c_init(struct Bmp3_I2c *bmp, struct i2c_periph *i2c_p, uint8_t addr);
56extern void bmp3_i2c_periodic(struct Bmp3_I2c *bmp);
57extern void bmp3_i2c_event(struct Bmp3_I2c *bmp);
58
59
60#endif /* BMP3_I2C_H */
61
float temperature
temperature in deg Celcius
Definition bmp3_i2c.h:51
struct bmp3_quantized_calib_data quant_calib
quantized calibration data
Definition bmp3_i2c.h:46
struct i2c_periph * i2c_p
Definition bmp3_i2c.h:39
void bmp3_i2c_event(struct Bmp3_I2c *bmp)
Definition bmp3_i2c.c:125
bool initialized
config done flag
Definition bmp3_i2c.h:42
void bmp3_i2c_read_eeprom_calib(struct Bmp3_I2c *bmp)
enum Bmp3Status status
state machine status
Definition bmp3_i2c.h:41
void bmp3_i2c_periodic(struct Bmp3_I2c *bmp)
Start new measurement if sensor ready.
Definition bmp3_i2c.c:78
void bmp3_i2c_init(struct Bmp3_I2c *bmp, struct i2c_periph *i2c_p, uint8_t addr)
init function
Definition bmp3_i2c.c:60
volatile bool data_available
data ready flag
Definition bmp3_i2c.h:43
struct i2c_transaction i2c_trans
Definition bmp3_i2c.h:40
float pressure
pressure in Pascal
Definition bmp3_i2c.h:50
struct bmp3_reg_calib_data calib
calibration data
Definition bmp3_i2c.h:44
uint32_t raw_temperature
uncompensated temperature
Definition bmp3_i2c.h:49
uint32_t raw_pressure
uncompensated pressure
Definition bmp3_i2c.h:48
Sensor driver for BMP280 sensor register definition.
Bmp3Status
Status enum.
Definition bmp3_regs.h:141
Quantized Trim Variables.
Definition bmp3_regs.h:173
Register Trim Variables.
Definition bmp3_regs.h:151
I2C transaction structure.
Definition i2c.h:93
Architecture independent I2C (Inter-Integrated Circuit Bus) API.
uint16_t foo
Definition main_demo5.c:58
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.