Paparazzi UAS  v5.15_devel-81-gd13dafb
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
baro_hca.c File Reference
#include "sensors/baro_hca.h"
#include "mcu_periph/i2c.h"
#include "subsystems/abi.h"
#include <math.h>
#include "mcu_periph/uart.h"
#include "pprzlink/messages.h"
#include "subsystems/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

#define BARO_HCA_ADDR   0xF0

Definition at line 34 of file baro_hca.c.

Referenced by baro_hca_read_periodic().

#define BARO_HCA_I2C_DEV   i2c0

Definition at line 51 of file baro_hca.c.

Referenced by baro_hca_read_periodic().

#define BARO_HCA_MAX_OUT   27852

Definition at line 37 of file baro_hca.c.

Referenced by baro_hca_read_event().

#define BARO_HCA_MAX_PRESSURE   1100

Definition at line 35 of file baro_hca.c.

#define BARO_HCA_MIN_OUT   1638

Definition at line 38 of file baro_hca.c.

Referenced by baro_hca_read_event().

#define BARO_HCA_MIN_PRESSURE   800

Definition at line 36 of file baro_hca.c.

#define BARO_HCA_PRESSURE_OFFSET   101325.0

Definition at line 47 of file baro_hca.c.

Referenced by baro_hca_read_event().

#define BARO_HCA_SCALE   1.0

Definition at line 42 of file baro_hca.c.

Referenced by baro_hca_read_event().

Function Documentation

void baro_hca_init ( void  )
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

struct i2c_transaction baro_hca_i2c_trans

Definition at line 60 of file baro_hca.c.

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

float baro_hca_p

Definition at line 57 of file baro_hca.c.

bool baro_hca_valid

Definition at line 56 of file baro_hca.c.

Referenced by baro_hca_init(), and baro_hca_read_event().

uint16_t pBaroRaw

Definition at line 55 of file baro_hca.c.

Referenced by baro_hca_init(), and baro_hca_read_event().