Paparazzi UAS  v5.0.5_stable-7-g4b8bbb7
Paparazzi is a free software Unmanned Aircraft System.
 All Data Structures 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 <math.h>
#include "mcu_periph/uart.h"
#include "messages.h"
#include "subsystems/datalink/downlink.h"
+ Include dependency graph for baro_hca.c:

Go to the source code of this file.

Macros

#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE
 
#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_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_t 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 36 of file baro_hca.c.

Referenced by baro_hca_read_periodic().

#define BARO_HCA_I2C_DEV   i2c0

Definition at line 43 of file baro_hca.c.

Referenced by baro_hca_read_periodic().

#define BARO_HCA_MAX_OUT   27852

Definition at line 39 of file baro_hca.c.

Referenced by baro_hca_read_event().

#define BARO_HCA_MAX_PRESSURE   1100

Definition at line 37 of file baro_hca.c.

#define BARO_HCA_MIN_OUT   1638

Definition at line 40 of file baro_hca.c.

Referenced by baro_hca_read_event().

#define BARO_HCA_MIN_PRESSURE   800

Definition at line 38 of file baro_hca.c.

#define DOWNLINK_DEVICE   DOWNLINK_AP_DEVICE

Definition at line 33 of file baro_hca.c.

Function Documentation

void baro_hca_init ( void  )
void baro_hca_read_periodic ( void  )

Definition at line 61 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 52 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 49 of file baro_hca.c.

bool_t baro_hca_valid

Definition at line 48 of file baro_hca.c.

Referenced by baro_hca_init(), and baro_hca_read_event().

uint16_t pBaroRaw

Definition at line 47 of file baro_hca.c.

Referenced by baro_hca_init(), and baro_hca_read_event().