PebbleOS v4.47.0-1362-gd278268fe
Loading...
Searching...
No Matches
BMP390

Bosch BMP380/BMP390 pressure sensor (compatible bosch,bmp380). More...

Data Structures

struct  pbl_bmp390_calib
 BMP390 trimming coefficients, as stored in its NVM. More...
 
struct  pbl_bmp390
 BMP390 pressure sensor. More...
 

Macros

#define PBL_BMP390_DEFINE(sym, _bus, _addr)
 Define a BMP390.
 

Detailed Description

Bosch BMP380/BMP390 pressure sensor (compatible bosch,bmp380).

Runs one forced-mode conversion per read and leaves the sensor in sleep mode otherwise.

PBL_BMP390_DEFINE(s_bmp390, &s_i2c, 0x76);
const struct pbl_sensor *const PRESSURE = &s_bmp390;
#define PBL_BMP390_DEFINE(sym, _bus, _addr)
Define a BMP390.
Definition bmp390.h:66
A sensor.
Definition driver.h:142
const struct pbl_sensor *const PRESSURE
The board's barometric pressure sensor.

Data Structure Documentation

◆ pbl_bmp390_calib

struct pbl_bmp390_calib

BMP390 trimming coefficients, as stored in its NVM.

Data Fields
int16_t par_p1
int8_t par_p10
int8_t par_p11
int16_t par_p2
int8_t par_p3
int8_t par_p4
uint16_t par_p5
uint16_t par_p6
int8_t par_p7
int8_t par_p8
int16_t par_p9
uint16_t par_t1
uint16_t par_t2
int8_t par_t3

◆ pbl_bmp390

struct pbl_bmp390

BMP390 pressure sensor.

Data Fields
struct pbl_bmp390_calib * calib Trimming coefficients, read at init.
struct pbl_i2c_dev i2c I2C device.
struct pbl_sensor sensor Sensor, child of the I2C bus.

Macro Definition Documentation

◆ PBL_BMP390_DEFINE

#define PBL_BMP390_DEFINE (   sym,
  _bus,
  _addr 
)
Value:
static struct pbl_bmp390_calib sym##_bmp390_calib; \
PBL_DEVICE_INSTANCE(sym, struct pbl_bmp390, struct pbl_sensor, sensor) { \
.sensor = PBL_SENSOR_INIT(sym, "bmp390", &(_bus)->dev, &pbl_bmp390_ops, pbl_bmp390_chans, 0U, \
.calib = &sym##_bmp390_calib, .i2c = PBL_I2C_DEV(_bus, _addr), \
}
#define PBL_I2C_DEV(_bus, _addr)
Initializer for a struct pbl_i2c_dev.
Definition i2c.h:159
BMP390 trimming coefficients, as stored in its NVM.
Definition bmp390.h:27
BMP390 pressure sensor.
Definition bmp390.h:45
#define PBL_SENSOR_STATE_DEFINE(sym)
Define the class state of sensor sym, without batch buffers, for sensors that are only read.
Definition driver.h:170
#define PBL_SENSOR_MOUNT_IDENTITY
Identity mounting, for sensors aligned with the device or without vector types.
Definition driver.h:71
#define PBL_SENSOR_INIT(sym, _name, _parent, _ops, _chans, _events,...)
Initializer for the struct pbl_sensor of sensor sym.
Definition driver.h:206

Define a BMP390.

Parameters
symSymbol of the instance, a struct pbl_sensor.
_busI2C bus.
_addr7-bit I2C address.