BMP390 barometric sensor driver and SPP producer. More...
#include <stdint.h>#include "spp/core/returnTypes.h"#include "spp/core/types.h"#include "spp/hal/gpio/gpio.h"#include "spp/services/service.h"Go to the source code of this file.
Data Structures | |
| struct | BMP390_temp_calib_t |
| Raw temperature calibration coefficients (as read from sensor). More... | |
| struct | BMP390_temp_params_t |
| Scaled temperature calibration parameters. More... | |
| struct | BMP390_press_calib_t |
| Raw pressure calibration coefficients. More... | |
| struct | BMP390_press_params_t |
| Scaled pressure calibration parameters. More... | |
| struct | BMP390_SpiConfig_t |
| struct | BMP390_GpioConfig_t |
| struct | BMP390_t |
| BMP390 sensor instance. More... | |
Functions | |
| const SPP_SERVICE_ProducerContract_t * | SPP_SERVICES_BMP390_getProducerContract (void) |
| Returns the BMP390 producer contract for PUBSUB registration. | |
BMP390 barometric sensor driver and SPP producer.
Provides SPI-based pressure, temperature and altitude acquisition using GPIO data-ready interrupts. Sensor data is published through PUBSUB.
Definition in file bmp390.h.
| #define K_BMP_SERVICE_PAYLOAD_LEN (12U) |
| #define K_BMP390_SPI_READ 0x80U |
SPI read flag: OR with register address.
Definition at line 26 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_configCheck(), SPP_SERVICES_BMP390_readRawPress(), SPP_SERVICES_BMP390_readRawPressCoeffs(), SPP_SERVICES_BMP390_readRawTemp(), and SPP_SERVICES_BMP390_readRawTempCoeffs().
| #define K_BMP390_SPI_WRITE 0x00U |
SPI write flag: OR with register address.
Definition at line 27 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_configCheck(), SPP_SERVICES_BMP390_readRawPress(), SPP_SERVICES_BMP390_readRawPressCoeffs(), SPP_SERVICES_BMP390_readRawTemp(), and SPP_SERVICES_BMP390_readRawTempCoeffs().
| #define K_BMP390_PIN_NUM_CS 18U |
| #define K_BMP390_SPI_BUS_IDX 0U |
SPI bus index (informational; set by HAL).
Definition at line 29 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_init().
| #define K_BMP390_CHIP_ID_REG 0x00 |
Chip ID register address.
Definition at line 32 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_configCheck().
| #define K_BMP390_SOFT_RESET_REG 0x7E |
Soft-reset register address.
Definition at line 34 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_configCheck(), and SPP_SERVICES_BMP390_softReset().
| #define BMP390_SOFT_RESET_CMD 0xB6 |
Soft-reset command byte.
Definition at line 35 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_softReset().
| #define K_BMP390_IF_CONF_REG 0x1A |
Interface configuration register address.
Definition at line 36 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_configCheck(), and SPP_SERVICES_BMP390_enableSpiMode().
| #define BMP390_IF_CONF_SPI 0x00 |
SPI interface mode value.
Definition at line 37 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_enableSpiMode().
| #define K_BMP390_REG_PWRCTRL 0x1B |
Power control register address.
Definition at line 40 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_prepareMeasure().
| #define BMP390_VALUE_PWRCTRL 0x33 |
Power control value (temp+press on, normal mode).
Definition at line 41 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_prepareMeasure().
| #define K_BMP390_REG_OSR 0x1C |
Oversampling register address.
Definition at line 42 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_prepareMeasure().
| #define BMP390_VALUE_OSR 0x00 |
Oversampling value (no oversampling).
Definition at line 43 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_prepareMeasure().
| #define K_BMP390_REG_ODR 0x1D |
Output data rate register address.
Definition at line 44 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_prepareMeasure().
| #define BMP390_VALUE_ODR 0x01 |
Output data rate value.
Definition at line 45 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_prepareMeasure().
| #define K_BMP390_REG_IIR 0x1F |
IIR filter register address.
Definition at line 46 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_prepareMeasure().
| #define BMP390_VALUE_IIR 0x02 |
IIR filter coefficient value.
Definition at line 47 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_prepareMeasure().
| #define K_BMP390_STATUS_DRDY_TEMP 0x40 |
| #define BMP390_STATUS_DRDY_PRES 0x20 |
| #define K_BMP390_TEMP_CALIB_REG_START 0x31 |
Start address of temperature calibration regs.
Definition at line 55 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_readRawTempCoeffs().
| #define K_BMP390_TEMP_RAW_REG 0x07 |
Start address of raw temperature data regs.
Definition at line 56 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_readRawTemp().
| #define K_BMP390_DRDY_TIMEOUT_MS 5000U |
| #define K_BMP390_PRESS_CALIB_REG_START 0x36 |
Start address of pressure calibration regs.
Definition at line 60 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_readRawPressCoeffs().
| #define K_BMP390_PRESS_RAW_REG 0x04 |
Start address of raw pressure data regs.
Definition at line 61 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_readRawPress().
| #define K_BMP390_REG_INT_CTRL 0x19 |
Interrupt control register address.
Definition at line 64 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_intEnableDrdy().
| #define K_BMP390_INT_CTRL_DRDY_EN 0x40 |
Interrupt control: enable data-ready interrupt.
Definition at line 65 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_intEnableDrdy().
| #define K_BMP390_INT_CTRL_LEVEL 0x02 |
Interrupt control: active-high level.
Definition at line 66 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_intEnableDrdy().
| #define K_BMP390_INT_PIN_NUM 3U |
Interrupt GPIO pin
Definition at line 67 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_init().
| #define K_BMP390_INT_INTR_TYPE 1U |
Interrupt trigger type (1=rising).
Definition at line 68 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_init().
| #define K_BMP390_INT_PULL 0U |
Pull resistor: 0=none 1=up 2=down.
Definition at line 69 of file bmp390.h.
Referenced by SPP_SERVICES_BMP390_init().
| const SPP_SERVICE_ProducerContract_t * SPP_SERVICES_BMP390_getProducerContract | ( | void | ) |
Returns the BMP390 producer contract for PUBSUB registration.
Definition at line 101 of file bmp390.c.
References g_bmp390ProducerContract, and SPP_SERVICES_BMP390_getProducerContract().
Referenced by CUSTOM_registerConsumerProducer(), guard_startInitializationOfModules(), and SPP_SERVICES_BMP390_getProducerContract().