Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
baro_hca.c File Reference
#include "sensors/baro_hca.h"
#include "mcu_periph/i2c.h"
#include "modules/core/abi.h"
#include <math.h>
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "modules/datalink/downlink.h"
+ Include dependency graph for baro_hca.c:

Go to the source code of this file.

Macros

#define BARO_HCA_ADDR   0xF0
 
#define BARO_HCA_MAX_PRESSURE   1100
 
#define BARO_HCA_MIN_PRESSURE   800
 
#define BARO_HCA_MAX_OUT   27852
 
#define BARO_HCA_MIN_OUT   1638
 
#define BARO_HCA_SCALE   1.0
 
#define BARO_HCA_PRESSURE_OFFSET   101325.0
 
#define BARO_HCA_I2C_DEV   i2c0
 

Functions

void baro_hca_init (void)
 
void baro_hca_read_periodic (void)
 
void baro_hca_read_event (void)
 

Variables

uint16_t pBaroRaw
 
bool baro_hca_valid
 
float baro_hca_p
 
struct i2c_transaction baro_hca_i2c_trans
 

Macro Definition Documentation

◆ BARO_HCA_ADDR

#define BARO_HCA_ADDR   0xF0

Definition at line 34 of file baro_hca.c.

◆ BARO_HCA_I2C_DEV

#define BARO_HCA_I2C_DEV   i2c0

Definition at line 51 of file baro_hca.c.

◆ BARO_HCA_MAX_OUT

#define BARO_HCA_MAX_OUT   27852

Definition at line 37 of file baro_hca.c.

◆ BARO_HCA_MAX_PRESSURE

#define BARO_HCA_MAX_PRESSURE   1100

Definition at line 35 of file baro_hca.c.

◆ BARO_HCA_MIN_OUT

#define BARO_HCA_MIN_OUT   1638

Definition at line 38 of file baro_hca.c.

◆ BARO_HCA_MIN_PRESSURE

#define BARO_HCA_MIN_PRESSURE   800

Definition at line 36 of file baro_hca.c.

◆ BARO_HCA_PRESSURE_OFFSET

#define BARO_HCA_PRESSURE_OFFSET   101325.0

Definition at line 47 of file baro_hca.c.

◆ BARO_HCA_SCALE

#define BARO_HCA_SCALE   1.0

Definition at line 42 of file baro_hca.c.

Function Documentation

◆ baro_hca_init()

void baro_hca_init ( void  )

◆ baro_hca_read_event()

◆ baro_hca_read_periodic()

void baro_hca_read_periodic ( void  )

Definition at line 70 of file baro_hca.c.

References BARO_HCA_ADDR, BARO_HCA_I2C_DEV, baro_hca_i2c_trans, i2c_receive(), I2CTransDone, and i2c_transaction::status.

+ Here is the call graph for this function:

Variable Documentation

◆ baro_hca_i2c_trans

struct i2c_transaction baro_hca_i2c_trans

Definition at line 57 of file baro_hca.c.

Referenced by baro_hca_init(), baro_hca_read_event(), and baro_hca_read_periodic().

◆ baro_hca_p

float baro_hca_p

Definition at line 57 of file baro_hca.c.

◆ baro_hca_valid

bool baro_hca_valid

Definition at line 56 of file baro_hca.c.

Referenced by baro_hca_init(), and baro_hca_read_event().

◆ pBaroRaw

uint16_t pBaroRaw

Definition at line 55 of file baro_hca.c.

Referenced by baro_hca_init(), and baro_hca_read_event().