Paparazzi UAS  v5.18.0_stable-1-g6993852-dirty
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
baro_bmp280_i2c.c File Reference

Bosch BMP280 I2C sensor interface. More...

#include "baro_bmp280_i2c.h"
#include "subsystems/abi.h"
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "subsystems/datalink/downlink.h"
#include "math/pprz_isa.h"
#include "subsystems/datalink/telemetry.h"
+ Include dependency graph for baro_bmp280_i2c.c:

Go to the source code of this file.

Macros

#define BMP280_SLAVE_ADDR   BMP280_I2C_ADDR
 default slave address More...
 

Functions

static void send_baro_bmp_data (struct transport_tx *trans, struct link_device *dev)
 
void baro_bmp280_init (void)
 
void baro_bmp280_periodic (void)
 
void baro_bmp280_event (void)
 

Variables

float baro_alt = 0
 
float baro_temp = 0
 
float baro_press = 0
 
bool baro_alt_valid = 0
 
struct Bmp280_I2c baro_bmp280
 

Detailed Description

Bosch BMP280 I2C sensor interface.

This reads the values for pressure and temperature from the Bosch BMP280 sensor through I2C.

Definition in file baro_bmp280_i2c.c.

Macro Definition Documentation

#define BMP280_SLAVE_ADDR   BMP280_I2C_ADDR

default slave address

Definition at line 43 of file baro_bmp280_i2c.c.

Referenced by baro_bmp280_init().

Function Documentation

void baro_bmp280_init ( void  )

Definition at line 68 of file baro_bmp280_i2c.c.

References baro_bmp280, bmp280_i2c_init(), BMP280_SLAVE_ADDR, DefaultPeriodic, register_periodic_telemetry(), and send_baro_bmp_data().

+ Here is the call graph for this function:

void baro_bmp280_periodic ( void  )

Definition at line 77 of file baro_bmp280_i2c.c.

References baro_bmp280, and bmp280_i2c_periodic().

+ Here is the call graph for this function:

static void send_baro_bmp_data ( struct transport_tx *  trans,
struct link_device *  dev 
)
static

Definition at line 55 of file baro_bmp280_i2c.c.

References baro_alt, baro_press, and baro_temp.

Referenced by baro_bmp280_init().

+ Here is the caller graph for this function:

Variable Documentation

float baro_alt = 0
bool baro_alt_valid = 0

Definition at line 49 of file baro_bmp280_i2c.c.

Referenced by baro_bmp280_event().

struct Bmp280_I2c baro_bmp280

Definition at line 52 of file baro_bmp280_i2c.c.

Referenced by baro_bmp280_event(), baro_bmp280_init(), and baro_bmp280_periodic().

float baro_press = 0

Definition at line 48 of file baro_bmp280_i2c.c.

Referenced by baro_bmp280_event(), and send_baro_bmp_data().

float baro_temp = 0

Definition at line 47 of file baro_bmp280_i2c.c.

Referenced by baro_bmp280_event(), and send_baro_bmp_data().