ESPHome  2024.10.2
npi19.h
Go to the documentation of this file.
1 #pragma once
2 
6 
7 namespace esphome {
8 namespace npi19 {
9 
12  public:
13  void set_temperature_sensor(sensor::Sensor *temperature_sensor) { this->temperature_sensor_ = temperature_sensor; }
14  void set_raw_pressure_sensor(sensor::Sensor *raw_pressure_sensor) {
15  this->raw_pressure_sensor_ = raw_pressure_sensor;
16  }
17 
18  float get_setup_priority() const override;
19  void setup() override;
20  void dump_config() override;
21  void update() override;
22 
23  protected:
24  i2c::ErrorCode read_(uint16_t &raw_temperature, uint16_t &raw_pressure);
27 };
28 
29 } // namespace npi19
30 } // namespace esphome
void update() override
Definition: npi19.cpp:86
i2c::ErrorCode read_(uint16_t &raw_temperature, uint16_t &raw_pressure)
Definition: npi19.cpp:38
void dump_config() override
Definition: npi19.cpp:28
sensor::Sensor * temperature_sensor_
Definition: npi19.h:25
This class simplifies creating components that periodically check a state.
Definition: component.h:283
void setup() override
Definition: npi19.cpp:13
This class implements support for the npi19 pressure and temperature i2c sensors. ...
Definition: npi19.h:11
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
Definition: npi19.h:13
sensor::Sensor * raw_pressure_sensor_
Definition: npi19.h:26
void set_raw_pressure_sensor(sensor::Sensor *raw_pressure_sensor)
Definition: npi19.h:14
Implementation of SPI Controller mode.
Definition: a01nyub.cpp:7
ErrorCode
Error codes returned by I2CBus and I2CDevice methods.
Definition: i2c_bus.h:11
Base-class for all sensors.
Definition: sensor.h:57
float get_setup_priority() const override
Definition: npi19.cpp:36
This Class provides the methods to read/write bytes from/to an i2c device.
Definition: i2c.h:133