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
mpl3115.c File Reference

Driver for MPL3115A2 baro sensor. More...

#include "peripherals/mpl3115.h"
#include "std.h"
+ Include dependency graph for mpl3115.c:

Go to the source code of this file.

Macros

#define MPL_CONF_UNINIT   0
 
#define MPL_CONF_PT_DATA   1
 
#define MPL_CONF_CTRL1   2
 
#define MPL_CONF_DONE   3
 

Functions

void mpl3115_init (void)
 
static void mpl3115_send_config (void)
 
void mpl3115_configure (void)
 
void mpl3115_read (void)
 
void mpl3115_event (void)
 

Variables

volatile bool_t mpl3115_data_available
 
uint32_t mpl3115_pressure
 
int16_t mpl3115_temperature
 
float mpl3115_alt
 
struct i2c_transaction mpl3115_trans
 
struct i2c_transaction mpl3115_req_trans
 
bool_t mpl3115_initialized
 
uint8_t mpl3115_init_status
 

Detailed Description

Driver for MPL3115A2 baro sensor.

Definition in file mpl3115.c.

Macro Definition Documentation

#define MPL_CONF_CTRL1   2

Definition at line 32 of file mpl3115.c.

Referenced by mpl3115_send_config().

#define MPL_CONF_DONE   3

Definition at line 33 of file mpl3115.c.

Referenced by mpl3115_send_config().

#define MPL_CONF_PT_DATA   1

Definition at line 31 of file mpl3115.c.

Referenced by mpl3115_send_config().

#define MPL_CONF_UNINIT   0

Definition at line 30 of file mpl3115.c.

Referenced by mpl3115_configure(), mpl3115_event(), and mpl3115_init().

Function Documentation

void mpl3115_configure ( void  )

Definition at line 88 of file mpl3115.c.

References I2CTransDone, I2CTransSuccess, mpl3115_init_status, mpl3115_send_config(), mpl3115_trans, MPL_CONF_UNINIT, and i2c_transaction::status.

+ Here is the call graph for this function:

void mpl3115_event ( void  )
void mpl3115_init ( void  )
static void mpl3115_send_config ( void  )
static

Variable Documentation

float mpl3115_alt

Definition at line 41 of file mpl3115.c.

Referenced by baro_mpl3115_read_periodic(), mpl3115_event(), and mpl3115_init().

volatile bool_t mpl3115_data_available

Definition at line 37 of file mpl3115.c.

Referenced by baro_mpl3115_read_periodic(), baro_periodic(), and mpl3115_event().

uint8_t mpl3115_init_status

Definition at line 48 of file mpl3115.c.

Referenced by mpl3115_configure(), mpl3115_event(), mpl3115_init(), and mpl3115_send_config().

bool_t mpl3115_initialized

Definition at line 47 of file mpl3115.c.

Referenced by mpl3115_event(), mpl3115_init(), mpl3115_read(), and mpl3115_send_config().

uint32_t mpl3115_pressure

Definition at line 39 of file mpl3115.c.

Referenced by baro_mpl3115_read_periodic(), mpl3115_event(), and mpl3115_init().

struct i2c_transaction mpl3115_req_trans

Definition at line 45 of file mpl3115.c.

Referenced by mpl3115_event(), mpl3115_init(), and mpl3115_read().

int16_t mpl3115_temperature

Definition at line 40 of file mpl3115.c.

Referenced by baro_mpl3115_read_periodic(), mpl3115_event(), and mpl3115_init().

struct i2c_transaction mpl3115_trans