Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
lps25h_i2c.h File Reference

I2C interface for LPS25H barometer. More...

#include "std.h"
#include "math/pprz_algebra_int.h"
#include "mcu_periph/i2c.h"
#include "peripherals/lps25h.h"
+ Include dependency graph for lps25h_i2c.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Lps25h_I2c
 

Functions

void lps25h_i2c_init (struct Lps25h_I2c *lps, struct i2c_periph *i2c_p, uint8_t addr)
 
void lps25h_i2c_start_configure (struct Lps25h_I2c *lps)
 
void lps25h_i2c_read (struct Lps25h_I2c *lps)
 
void lps25h_i2c_event (struct Lps25h_I2c *lps)
 
float lps25h_readPressureMillibars (int32_t press)
 
float pressureToAltMeters (float pressure_mbar, float altimeter_setting_mbar)
 
static void lps25h_i2c_periodic (struct Lps25h_I2c *lps)
 

Detailed Description

I2C interface for LPS25H barometer.

Definition in file lps25h_i2c.h.


Data Structure Documentation

◆ Lps25h_I2c

struct Lps25h_I2c

Definition at line 38 of file lps25h_i2c.h.

+ Collaboration diagram for Lps25h_I2c:
Data Fields
struct Lps25hConfig config
int32_t data
volatile bool data_available data ready flag
struct i2c_periph * i2c_p
struct i2c_transaction i2c_trans
enum Lps25hConfStatus init_status init status
bool initialized config done flag

Function Documentation

◆ lps25h_i2c_event()

◆ lps25h_i2c_init()

◆ lps25h_i2c_periodic()

static void lps25h_i2c_periodic ( struct Lps25h_I2c lps)
inlinestatic

Definition at line 57 of file lps25h_i2c.h.

References Lps25h_I2c::initialized, lps25h_i2c_read(), and lps25h_i2c_start_configure().

+ Here is the call graph for this function:

◆ lps25h_i2c_read()

void lps25h_i2c_read ( struct Lps25h_I2c lps)

Definition at line 87 of file lps25h_i2c.c.

References i2c_transaction::buf, Lps25h_I2c::i2c_p, i2c_submit(), Lps25h_I2c::i2c_trans, I2CTransDone, I2CTransTxRx, Lps25h_I2c::initialized, i2c_transaction::len_r, i2c_transaction::len_w, LPS25H_REG_OUT_XL, i2c_transaction::status, and i2c_transaction::type.

Referenced by lps25h_i2c_periodic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lps25h_i2c_start_configure()

void lps25h_i2c_start_configure ( struct Lps25h_I2c lps)

Definition at line 76 of file lps25h_i2c.c.

References Lps25h_I2c::i2c_trans, I2CTransDone, I2CTransSuccess, Lps25h_I2c::init_status, LPS25H_CONF_UNINIT, lps25h_i2c_send_config(), and i2c_transaction::status.

Referenced by lps25h_i2c_periodic().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lps25h_readPressureMillibars()

float lps25h_readPressureMillibars ( int32_t  press)

Definition at line 101 of file lps25h_i2c.c.

◆ pressureToAltMeters()

float pressureToAltMeters ( float  pressure_mbar,
float  altimeter_setting_mbar 
)

Definition at line 106 of file lps25h_i2c.c.