14 namespace bmp3xx_base {
16 static const uint8_t BMP388_ID = 0x50;
17 static const uint8_t BMP390_ID = 0x60;
18 static const uint8_t RESET_CODE = 0xB6;
74 void setup()
override;
235 virtual bool read_byte(uint8_t a_register, uint8_t *data) = 0;
236 virtual bool write_byte(uint8_t a_register, uint8_t data) = 0;
237 virtual bool read_bytes(uint8_t a_register, uint8_t *data,
size_t len) = 0;
238 virtual bool write_bytes(uint8_t a_register, uint8_t *data,
size_t len) = 0;
Oversampling temperature_oversampling_
void dump_config() override
float get_setup_priority() const override
struct esphome::bmp3xx_base::BMP3XXComponent::@25::@32 bit
union esphome::bmp3xx_base::BMP3XXComponent::@31 config_
Oversampling
Oversampling bit fields in the control and measurement register.
bool set_mode(OperationMode mode)
Set the barometer mode.
void set_pressure_sensor(sensor::Sensor *pressure_sensor)
union esphome::bmp3xx_base::BMP3XXComponent::@27 int_status_
virtual bool read_bytes(uint8_t a_register, uint8_t *data, size_t len)=0
union esphome::bmp3xx_base::BMP3XXComponent::@30 odr_
This class simplifies creating components that periodically check a state.
union esphome::bmp3xx_base::BMP3XXComponent::@25 chip_id_
bool data_ready()
Checks if a measurement is ready.
This class implements support for the BMP3XX Temperature+Pressure sensor.
void set_iir_filter_config(IIRFilter iir_filter)
Set the IIR Filter used to increase accuracy, defaults to no IIR Filter.
bool start_normal_conversion()
Start continuous measurement in NORMAL_MODE.
bool start_forced_conversion()
Start a one shot measurement in FORCED_MODE.
OperationMode operation_mode_
float bmp388_compensate_temperature_(float uncomp_temp)
bool set_iir_filter(IIRFilter iir_filter)
Set the IIR filter setting: OFF, 2, 3, 8, 16, 32.
struct esphome::bmp3xx_base::BMP3XXComponent::@24 __attribute__((packed)) compensation_params_
bool get_measurements(float &temperature, float &pressure)
Get a temperature and pressure measurement.
sensor::Sensor * pressure_sensor_
bool get_pressure(float &pressure)
Get a pressure measurement.
Oversampling pressure_oversampling_
virtual bool write_bytes(uint8_t a_register, uint8_t *data, size_t len)=0
bool stop_conversion()
Stop the conversion and return to SLEEP_MODE.
bool get_measurement()
Get a temperature and pressure measurement.
bool set_temperature_oversampling(Oversampling temperature_oversampling)
Set the temperature oversampling: OFF, X1, X2, X4, X8, X16, X32.
void set_temperature_oversampling_config(Oversampling temperature_oversampling)
Set the oversampling value for the temperature sensor. Default is 16x.
bool get_temperature(float &temperature)
Get a temperature measurement.
enum esphome::bmp3xx_base::BMP3XXComponent::ErrorCode NONE
uint8_t reset()
Soft reset the sensor.
union esphome::bmp3xx_base::BMP3XXComponent::@28 pwr_ctrl_
union esphome::bmp3xx_base::BMP3XXComponent::@29 osr_
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
IIRFilter
Infinite Impulse Response (IIR) filter bit field in the configuration register.
bool set_pressure_oversampling(Oversampling pressure_oversampling)
Set the pressure oversampling: OFF, X1, X2, X4, X8, X16, X32.
virtual bool write_byte(uint8_t a_register, uint8_t data)=0
sensor::Sensor * temperature_sensor_
void set_pressure_oversampling_config(Oversampling pressure_oversampling)
Set the oversampling value for the pressure sensor. Default is 16x.
Implementation of SPI Controller mode.
OperationMode
Device mode bitfield in the control and measurement register.
Base-class for all sensors.
float bmp388_compensate_pressure_(float uncomp_press, float t_lin)
bool set_oversampling_register(Oversampling pressure_oversampling, Oversampling temperature_oversampling)
Set the BMP388 oversampling register.
struct esphome::bmp3xx_base::BMP3XXComponent::FloatParams compensation_float_params_
union esphome::bmp3xx_base::BMP3XXComponent::@26 event_
virtual bool read_byte(uint8_t a_register, uint8_t *data)=0