mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-10 06:59:54 +08:00
[peripherals] refactor baro mpl3115
This commit is contained in:
@@ -104,8 +104,6 @@ else ifeq ($(BOARD), px4fmu)
|
||||
# apogee baro
|
||||
else ifeq ($(BOARD), apogee)
|
||||
ap.CFLAGS += -DUSE_I2C1
|
||||
ap.CFLAGS += -DMPL3115_I2C_DEV=i2c1
|
||||
ap.CFLAGS += -DMPL3115_ALT_MODE=0
|
||||
ap.srcs += peripherals/mpl3115.c
|
||||
ap.srcs += $(SRC_BOARD)/baro_board.c
|
||||
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
<module name="baro_mpl3115" dir="sensors">
|
||||
<doc>
|
||||
<description>Baro MPL3115A2 (I2C)</description>
|
||||
<define name="MPL3115_I2C_DEV" value="i2cX" description="select which i2c peripheral to use (default i2c0)"/>
|
||||
<define name="BARO_MPL3115_I2C_DEV" value="i2cX" description="select which i2c peripheral to use (default i2c0)"/>
|
||||
<define name="BARO_MPL3115_I2C_SLAVE_ADDR" value="0xC0" description="i2c address (default factory: 0xC0)"/>
|
||||
<define name="BARO_MPL3115_SENDER_ID" value="20" description="ABI sender id"/>
|
||||
<define name="SENSOR_SYNC_SEND" description="flag to enable sending BARO_MPL3115 message on every new measurement"/>
|
||||
</doc>
|
||||
|
||||
<header>
|
||||
@@ -13,7 +16,7 @@
|
||||
<periodic fun="baro_mpl3115_read_periodic()" freq="5."/>
|
||||
<event fun="baro_mpl3115_read_event()"/>
|
||||
|
||||
<makefile>
|
||||
<makefile target="ap">
|
||||
<file name="baro_mpl3115.c"/>
|
||||
<file name="mpl3115.c" dir="peripherals"/>
|
||||
</makefile>
|
||||
|
||||
@@ -44,8 +44,10 @@
|
||||
#define BARO_STARTUP_COUNTER 200
|
||||
uint16_t startup_cnt;
|
||||
|
||||
struct Mpl3115 apogee_baro;
|
||||
|
||||
void baro_init( void ) {
|
||||
mpl3115_init();
|
||||
mpl3115_init(&apogee_baro, &i2c1, MPL3115_I2C_ADDR);
|
||||
#ifdef BARO_LED
|
||||
LED_OFF(BARO_LED);
|
||||
#endif
|
||||
@@ -57,10 +59,10 @@ void baro_periodic( void ) {
|
||||
// Baro is slave of the MPU, only start reading it after MPU is configured
|
||||
if (imu_apogee.mpu.config.initialized) {
|
||||
|
||||
if (startup_cnt > 0 && mpl3115_data_available) {
|
||||
if (startup_cnt > 0 && apogee_baro.data_available) {
|
||||
// Run some loops to get correct readings from the adc
|
||||
--startup_cnt;
|
||||
mpl3115_data_available = FALSE;
|
||||
apogee_baro.data_available = FALSE;
|
||||
#ifdef BARO_LED
|
||||
LED_TOGGLE(BARO_LED);
|
||||
if (startup_cnt == 0) {
|
||||
@@ -69,18 +71,18 @@ void baro_periodic( void ) {
|
||||
#endif
|
||||
}
|
||||
// Read the sensor
|
||||
Mpl3115Periodic();
|
||||
mpl3115_periodic(&apogee_baro);
|
||||
}
|
||||
}
|
||||
|
||||
void apogee_baro_event(void) {
|
||||
mpl3115_event();
|
||||
if (mpl3115_data_available) {
|
||||
mpl3115_event(&apogee_baro);
|
||||
if (apogee_baro.data_available) {
|
||||
if (startup_cnt == 0) {
|
||||
float pressure = ((float)mpl3115_pressure/(1<<2));
|
||||
float pressure = ((float)apogee_baro.pressure/(1<<4));
|
||||
AbiSendMsgBARO_ABS(APOGEE_BARO_SENDER_ID, &pressure);
|
||||
}
|
||||
mpl3115_data_available = FALSE;
|
||||
apogee_baro.data_available = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,10 +17,17 @@
|
||||
* along with paparazzi; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file modules/sensors/baro_mpl3155.c
|
||||
*
|
||||
* Module for the baro MPL3115A2 from Freescale (i2c)
|
||||
*
|
||||
*/
|
||||
|
||||
#include "modules/sensors/baro_mpl3115.h"
|
||||
#include "peripherals/mpl3115.h"
|
||||
#include "subsystems/abi.h"
|
||||
|
||||
//Messages
|
||||
@@ -32,29 +39,39 @@
|
||||
#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE
|
||||
#endif
|
||||
|
||||
#ifndef BARO_MPL3115_I2C_DEV
|
||||
#define BARO_MPL3115_I2C_DEV i2c0
|
||||
#endif
|
||||
|
||||
#ifndef BARO_MPL3115_I2C_SLAVE_ADDR
|
||||
#define BARO_MPL3115_I2C_SLAVE_ADDR MPL3115_I2C_ADDR
|
||||
#endif
|
||||
|
||||
#ifndef BARO_MPL3115_SENDER_ID
|
||||
#define BARO_MPL3115_SENDER_ID 20
|
||||
#endif
|
||||
|
||||
struct Mpl3115 baro_mpl;
|
||||
|
||||
void baro_mpl3115_init( void ) {
|
||||
mpl3115_init();
|
||||
mpl3115_init(&baro_mpl, &BARO_MPL3115_I2C_DEV, BARO_MPL3115_I2C_SLAVE_ADDR);
|
||||
}
|
||||
|
||||
|
||||
void baro_mpl3115_read_periodic( void ) {
|
||||
Mpl3115Periodic();
|
||||
mpl3115_periodic(&baro_mpl);
|
||||
}
|
||||
|
||||
|
||||
void baro_mpl3115_read_event( void ) {
|
||||
mpl3115_event();
|
||||
if (mpl3115_data_available) {
|
||||
float pressure = (float)mpl3115_pressure;
|
||||
mpl3115_event(&baro_mpl);
|
||||
if (baro_mpl.data_available) {
|
||||
float pressure = (float)baro_mpl.pressure/(1<<4);
|
||||
AbiSendMsgBARO_ABS(BARO_MPL3115_SENDER_ID, &pressure);
|
||||
#ifdef SENSOR_SYNC_SEND
|
||||
DOWNLINK_SEND_MPL3115_BARO(DefaultChannel, DefaultDevice, &mpl3115_pressure, &mpl3115_temperature, &mpl3115_alt);
|
||||
DOWNLINK_SEND_MPL3115_BARO(DefaultChannel, DefaultDevice, &baro_mpl.pressure, &baro_mpl.temperature, &baro_mpl.alt);
|
||||
#endif
|
||||
mpl3115_data_available = FALSE;
|
||||
baro_mpl.data_available = FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,14 +17,18 @@
|
||||
* along with paparazzi; see the file COPYING. If not, write to
|
||||
* the Free Software Foundation, 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file modules/sensors/baro_mpl3155.h
|
||||
*
|
||||
* Module for the baro MPL3115A2 from Freescale (i2c)
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef BARO_MPL3115_H
|
||||
#define BARO_MPL3115_H
|
||||
|
||||
#include "peripherals/mpl3115.h"
|
||||
|
||||
extern void baro_mpl3115_init( void );
|
||||
extern void baro_mpl3115_read_periodic( void );
|
||||
extern void baro_mpl3115_read_event( void );
|
||||
|
||||
@@ -27,57 +27,50 @@
|
||||
#include "peripherals/mpl3115.h"
|
||||
#include "std.h"
|
||||
|
||||
#define MPL_CONF_UNINIT 0
|
||||
#define MPL_CONF_PT_DATA 1
|
||||
#define MPL_CONF_CTRL1 2
|
||||
#define MPL_CONF_DONE 3
|
||||
|
||||
|
||||
// Data ready flag
|
||||
volatile bool_t mpl3115_data_available;
|
||||
// Data
|
||||
uint32_t mpl3115_pressure;
|
||||
int16_t mpl3115_temperature;
|
||||
float mpl3115_alt;
|
||||
// I2C transaction for reading and configuring
|
||||
struct i2c_transaction mpl3115_trans;
|
||||
// I2C transaction for conversion request
|
||||
struct i2c_transaction mpl3115_req_trans;
|
||||
// Init flag
|
||||
bool_t mpl3115_initialized;
|
||||
uint8_t mpl3115_init_status;
|
||||
|
||||
void mpl3115_init(void)
|
||||
void mpl3115_init(struct Mpl3115 *mpl, struct i2c_periph *i2c_p, uint8_t addr)
|
||||
{
|
||||
mpl3115_trans.status = I2CTransDone;
|
||||
mpl3115_req_trans.status = I2CTransDone;
|
||||
mpl3115_initialized = FALSE;
|
||||
mpl3115_init_status = MPL_CONF_UNINIT;
|
||||
|
||||
mpl3115_pressure = 0;
|
||||
mpl3115_temperature = 0;
|
||||
mpl3115_alt = 0.;
|
||||
/* set i2c_peripheral */
|
||||
mpl->i2c_p = i2c_p;
|
||||
|
||||
/* slave address */
|
||||
mpl->trans.slave_addr = addr;
|
||||
|
||||
mpl->trans.status = I2CTransDone;
|
||||
mpl->req_trans.status = I2CTransDone;
|
||||
mpl->initialized = FALSE;
|
||||
mpl->init_status = MPL_CONF_UNINIT;
|
||||
|
||||
/* by default disable raw mode and set pressure mode */
|
||||
mpl->raw_mode = FALSE;
|
||||
mpl->alt_mode = FALSE;
|
||||
|
||||
mpl->pressure = 0;
|
||||
mpl->temperature = 0;
|
||||
mpl->altitude = 0.;
|
||||
}
|
||||
|
||||
// Configuration function called once before normal use
|
||||
static void mpl3115_send_config(void)
|
||||
static void mpl3115_send_config(struct Mpl3115 *mpl)
|
||||
{
|
||||
switch (mpl3115_init_status) {
|
||||
switch (mpl->init_status) {
|
||||
case MPL_CONF_PT_DATA:
|
||||
mpl3115_trans.buf[0] = MPL3115_REG_PT_DATA_CFG;
|
||||
mpl3115_trans.buf[1] = MPL3115_PT_DATA_CFG;
|
||||
i2c_transmit(&MPL3115_I2C_DEV, &mpl3115_trans, MPL3115_I2C_ADDR, 2);
|
||||
mpl3115_init_status++;
|
||||
mpl->trans.buf[0] = MPL3115_REG_PT_DATA_CFG;
|
||||
mpl->trans.buf[1] = MPL3115_PT_DATA_CFG;
|
||||
i2c_transmit(mpl->i2c_p, &mpl->trans, mpl->trans.slave_addr, 2);
|
||||
mpl->init_status++;
|
||||
break;
|
||||
case MPL_CONF_CTRL1:
|
||||
mpl3115_trans.buf[0] = MPL3115_REG_CTRL_REG1;
|
||||
mpl3115_trans.buf[1] = MPL3115_CTRL_REG1;
|
||||
i2c_transmit(&MPL3115_I2C_DEV, &mpl3115_trans, MPL3115_I2C_ADDR, 2);
|
||||
mpl3115_init_status++;
|
||||
mpl->trans.buf[0] = MPL3115_REG_CTRL_REG1;
|
||||
mpl->trans.buf[1] = ((MPL3115_OVERSAMPLING<<3) | (mpl->raw_mode<<6) |
|
||||
(mpl->alt_mode<<7));
|
||||
i2c_transmit(mpl->i2c_p, &mpl->trans, mpl->trans.slave_addr, 2);
|
||||
mpl->init_status++;
|
||||
break;
|
||||
case MPL_CONF_DONE:
|
||||
mpl3115_initialized = TRUE;
|
||||
mpl3115_trans.status = I2CTransDone;
|
||||
mpl->initialized = TRUE;
|
||||
mpl->trans.status = I2CTransDone;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -85,77 +78,85 @@ static void mpl3115_send_config(void)
|
||||
}
|
||||
|
||||
// Configure
|
||||
void mpl3115_configure(void)
|
||||
void mpl3115_configure(struct Mpl3115 *mpl)
|
||||
{
|
||||
if (mpl3115_init_status == MPL_CONF_UNINIT) {
|
||||
mpl3115_init_status++;
|
||||
if (mpl3115_trans.status == I2CTransSuccess || mpl3115_trans.status == I2CTransDone) {
|
||||
mpl3115_send_config();
|
||||
if (mpl->init_status == MPL_CONF_UNINIT) {
|
||||
mpl->init_status++;
|
||||
if (mpl->trans.status == I2CTransSuccess || mpl->trans.status == I2CTransDone) {
|
||||
mpl3115_send_config(mpl);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Normal reading
|
||||
void mpl3115_read(void)
|
||||
void mpl3115_read(struct Mpl3115 *mpl)
|
||||
{
|
||||
// ask for a reading and then prepare next conversion
|
||||
if (mpl3115_initialized && mpl3115_trans.status == I2CTransDone) {
|
||||
mpl3115_trans.buf[0] = MPL3115_REG_STATUS;
|
||||
i2c_transceive(&MPL3115_I2C_DEV, &mpl3115_trans, MPL3115_I2C_ADDR, 1, 6);
|
||||
if (mpl3115_req_trans.status == I2CTransDone) {
|
||||
mpl3115_req_trans.buf[0] = MPL3115_REG_CTRL_REG1;
|
||||
mpl3115_req_trans.buf[1] = MPL3115_CTRL_REG1 | MPL3115_OST_BIT;
|
||||
i2c_transmit(&MPL3115_I2C_DEV, &mpl3115_req_trans, MPL3115_I2C_ADDR, 2);
|
||||
if (mpl->initialized && mpl->trans.status == I2CTransDone) {
|
||||
mpl->trans.buf[0] = MPL3115_REG_STATUS;
|
||||
i2c_transceive(mpl->i2c_p, &mpl->trans, mpl->trans.slave_addr, 1, 6);
|
||||
if (mpl->req_trans.status == I2CTransDone) {
|
||||
mpl->req_trans.buf[0] = MPL3115_REG_CTRL_REG1;
|
||||
mpl->req_trans.buf[1] = ((MPL3115_OVERSAMPLING<<3) | (mpl->raw_mode<<6) |
|
||||
(mpl->alt_mode<<7) | MPL3115_OST_BIT);
|
||||
i2c_transmit(mpl->i2c_p, &mpl->trans, mpl->trans.slave_addr, 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void mpl3115_event(void)
|
||||
void mpl3115_event(struct Mpl3115 *mpl)
|
||||
{
|
||||
if (mpl3115_initialized) {
|
||||
if (mpl3115_trans.status == I2CTransFailed) {
|
||||
mpl3115_trans.status = I2CTransDone;
|
||||
if (mpl->initialized) {
|
||||
if (mpl->trans.status == I2CTransFailed) {
|
||||
mpl->trans.status = I2CTransDone;
|
||||
}
|
||||
else if (mpl3115_trans.status == I2CTransSuccess) {
|
||||
else if (mpl->trans.status == I2CTransSuccess) {
|
||||
// Successfull reading and new pressure data available
|
||||
if (mpl3115_trans.buf[0] & (1<<2)) {
|
||||
#if MPL3115_RAW_OUTPUT
|
||||
// New data available
|
||||
mpl3115_pressure = ((uint32_t)mpl3115_trans.buf[1]<<16)|((uint16_t)mpl3115_trans.buf[2]<<8)|mpl3115_trans.buf[3];
|
||||
mpl3115_temperature = ((int16_t)mpl3115_trans.buf[4]<<8)|mpl3115_trans.buf[5];
|
||||
mpl3115_data_available = TRUE;
|
||||
#else // Not in raw mode
|
||||
#if MPL3115_ALT_MODE
|
||||
uint32_t tmp = ((uint32_t)mpl3115_trans.buf[1]<<16)|((uint16_t)mpl3115_trans.buf[2]<<8)|mpl3115_trans.buf[3];
|
||||
mpl3115_alt = (float)(tmp>>4)/(1<<4);
|
||||
tmp = ((int16_t)mpl3115_trans.buf[4]<<8)|mpl3115_trans.buf[5];
|
||||
mpl3115_temperature = (tmp>>4);
|
||||
mpl3115_data_available = TRUE;
|
||||
#else // Pressure mode
|
||||
uint32_t tmp = ((uint32_t)mpl3115_trans.buf[1]<<16)|((uint16_t)mpl3115_trans.buf[2]<<8)|mpl3115_trans.buf[3];
|
||||
mpl3115_pressure = (tmp>>4);
|
||||
tmp = ((int16_t)mpl3115_trans.buf[4]<<8)|mpl3115_trans.buf[5];
|
||||
mpl3115_temperature = (tmp>>4);
|
||||
mpl3115_data_available = TRUE;
|
||||
#endif // end alt mode
|
||||
#endif // end raw mode
|
||||
if (mpl->trans.buf[0] & (1<<2)) {
|
||||
if (mpl->raw_mode) {
|
||||
// New data available
|
||||
mpl->pressure = (((uint32_t)mpl->trans.buf[1]<<16) |
|
||||
((uint16_t)mpl->trans.buf[2]<<8) |
|
||||
mpl->trans.buf[3]);
|
||||
mpl->temperature = ((int16_t)mpl->trans.buf[4]<<8) | mpl->trans.buf[5];
|
||||
}
|
||||
else { // not in raw mode
|
||||
uint32_t tmp = (((uint32_t)mpl->trans.buf[1]<<16) |
|
||||
((uint16_t)mpl->trans.buf[2]<<8) |
|
||||
mpl->trans.buf[3]);
|
||||
if (mpl->alt_mode) {
|
||||
mpl->altitude = (float)(tmp>>4) / (1<<4);
|
||||
}
|
||||
else { // Pressure mode
|
||||
mpl->pressure = (tmp>>4);
|
||||
}
|
||||
tmp = ((int16_t)mpl->trans.buf[4]<<8) | mpl->trans.buf[5];
|
||||
mpl->temperature = (tmp>>4);
|
||||
}
|
||||
mpl->data_available = TRUE;
|
||||
}
|
||||
mpl3115_trans.status = I2CTransDone;
|
||||
mpl->trans.status = I2CTransDone;
|
||||
}
|
||||
}
|
||||
else if (!mpl3115_initialized && mpl3115_init_status != MPL_CONF_UNINIT) { // Configuring
|
||||
if (mpl3115_trans.status == I2CTransSuccess || mpl3115_trans.status == I2CTransDone) {
|
||||
mpl3115_trans.status = I2CTransDone;
|
||||
mpl3115_send_config();
|
||||
else if (!mpl->initialized && mpl->init_status != MPL_CONF_UNINIT) { // Configuring
|
||||
if (mpl->trans.status == I2CTransSuccess || mpl->trans.status == I2CTransDone) {
|
||||
mpl->trans.status = I2CTransDone;
|
||||
mpl3115_send_config(mpl);
|
||||
}
|
||||
if (mpl3115_trans.status == I2CTransFailed) {
|
||||
mpl3115_init_status--;
|
||||
mpl3115_trans.status = I2CTransDone;
|
||||
mpl3115_send_config(); // Retry config (TODO max retry)
|
||||
if (mpl->trans.status == I2CTransFailed) {
|
||||
mpl->init_status--;
|
||||
mpl->trans.status = I2CTransDone;
|
||||
mpl3115_send_config(mpl); // Retry config (TODO max retry)
|
||||
}
|
||||
}
|
||||
if (mpl3115_req_trans.status == I2CTransSuccess || mpl3115_req_trans.status == I2CTransFailed) {
|
||||
mpl3115_req_trans.status = I2CTransDone;
|
||||
if (mpl->req_trans.status == I2CTransSuccess || mpl->req_trans.status == I2CTransFailed) {
|
||||
mpl->req_trans.status = I2CTransDone;
|
||||
}
|
||||
}
|
||||
|
||||
void mpl3115_periodic(struct Mpl3115 *mpl) {
|
||||
if (mpl->initialized)
|
||||
mpl3115_read(mpl);
|
||||
else
|
||||
mpl3115_configure(mpl);
|
||||
}
|
||||
|
||||
@@ -34,11 +34,6 @@
|
||||
/* Device address (8 bits) */
|
||||
#define MPL3115_I2C_ADDR 0xC0
|
||||
|
||||
/* Default I2C device */
|
||||
#ifndef MPL3115_I2C_DEV
|
||||
#define MPL3115_I2C_DEV i2c0
|
||||
#endif
|
||||
|
||||
/* Registers */
|
||||
#define MPL3115_REG_STATUS 0x00
|
||||
#define MPL3115_REG_OUT_P_MSB 0x01
|
||||
@@ -63,36 +58,34 @@
|
||||
#ifndef MPL3115_OVERSAMPLING
|
||||
#define MPL3115_OVERSAMPLING 0x5 // Oversample ratio (0x5: 130ms between data sample)
|
||||
#endif
|
||||
#ifndef MPL3115_RAW_OUTPUT
|
||||
#define MPL3115_RAW_OUTPUT 0x0 // Raw output (disable alt mode if true)
|
||||
#endif
|
||||
#ifndef MPL3115_ALT_MODE
|
||||
#define MPL3115_ALT_MODE 0x1 // 0: baro, 1: alti (disable by raw mode)
|
||||
#endif
|
||||
|
||||
#define MPL3115_CTRL_REG1 ((MPL3115_OVERSAMPLING<<3)|(MPL3115_RAW_OUTPUT<<6)|(MPL3115_ALT_MODE<<7))
|
||||
|
||||
// Config done flag
|
||||
extern bool_t mpl3115_initialized;
|
||||
// Data ready flag
|
||||
extern volatile bool_t mpl3115_data_available;
|
||||
// Data
|
||||
extern uint32_t mpl3115_pressure; ///< absolute pressure in Pascal
|
||||
extern int16_t mpl3115_temperature;
|
||||
extern float mpl3115_alt;
|
||||
// I2C transaction structure
|
||||
//extern struct i2c_transaction mpl3115_trans;
|
||||
enum Mpl3115Status {
|
||||
MPL_CONF_UNINIT,
|
||||
MPL_CONF_PT_DATA,
|
||||
MPL_CONF_CTRL1,
|
||||
MPL_CONF_DONE
|
||||
};
|
||||
|
||||
struct Mpl3115 {
|
||||
struct i2c_periph *i2c_p;
|
||||
struct i2c_transaction trans; ///< I2C transaction for reading and configuring
|
||||
struct i2c_transaction req_trans; ///< I2C transaction for conversion request
|
||||
enum Mpl3115Status init_status;
|
||||
bool_t initialized; ///< config done flag
|
||||
volatile bool_t data_available; ///< data ready flag
|
||||
bool_t raw_mode; ///< set to TRUE to enable raw output
|
||||
bool_t alt_mode; ///< set to TRUE to enable altitude output (otherwise pressure)
|
||||
int16_t temperature; ///< temperature in 1/16 degrees Celcius
|
||||
uint32_t pressure; ///< pressure in 1/16 Pascal
|
||||
float altitude; ///< altitude in meters
|
||||
};
|
||||
|
||||
// Functions
|
||||
extern void mpl3115_init(void);
|
||||
extern void mpl3115_configure(void);
|
||||
extern void mpl3115_read(void);
|
||||
extern void mpl3115_event(void);
|
||||
|
||||
// Macro for using MPL3115 in periodic function
|
||||
#define Mpl3115Periodic() { \
|
||||
if (mpl3115_initialized) mpl3115_read(); \
|
||||
else mpl3115_configure(); \
|
||||
}
|
||||
extern void mpl3115_init(struct Mpl3115 *mpl, struct i2c_periph *i2c_p, uint8_t addr);
|
||||
extern void mpl3115_configure(struct Mpl3115 *mpl);
|
||||
extern void mpl3115_read(struct Mpl3115 *mpl);
|
||||
extern void mpl3115_event(struct Mpl3115 *mpl);
|
||||
extern void mpl3115_periodic(struct Mpl3115 *mpl);
|
||||
|
||||
#endif // MPL3115_H
|
||||
|
||||
Reference in New Issue
Block a user