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
baro_bmp3.c
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 */
21
30#include "baro_bmp3.h"
31
32#include "modules/core/abi.h"
33#include "mcu_periph/uart.h"
34#include "pprzlink/messages.h"
36
38#ifndef BMP3_SLAVE_ADDR
39#define BMP3_SLAVE_ADDR BMP3_I2C_ADDR
40#endif
41
43
48
53
74
Main include for ABI (AirBorneInterface).
#define BARO_BMP3_SENDER_ID
void baro_bmp3_periodic(void)
Definition baro_bmp3.c:49
void baro_bmp3_init(void)
Definition baro_bmp3.c:44
#define BMP3_SLAVE_ADDR
default slave address
Definition baro_bmp3.c:39
void baro_bmp3_event(void)
Definition baro_bmp3.c:54
struct Bmp3_I2c baro_bmp3
Definition baro_bmp3.c:42
Bosch BMP3 I2C sensor interface.
void bmp3_i2c_event(struct Bmp3_I2c *bmp)
Definition bmp3_i2c.c:125
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
float temperature
temperature in deg Celcius
Definition bmp3_i2c.h:51
volatile bool data_available
data ready flag
Definition bmp3_i2c.h:43
float pressure
pressure in Pascal
Definition bmp3_i2c.h:50
uint32_t raw_temperature
uncompensated temperature
Definition bmp3_i2c.h:49
uint32_t raw_pressure
uncompensated pressure
Definition bmp3_i2c.h:48
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
static float p[2][2]
uint16_t up[LIGHT_NB]
Definition light_solar.c:48
uint16_t foo
Definition main_demo5.c:58
arch independent UART (Universal Asynchronous Receiver/Transmitter) API
int int32_t
Typedef defining 32 bit int type.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.