10 static const uint8_t DPS310_REG_PRS_B2 = 0x00;
11 static const uint8_t DPS310_REG_TMP_B2 = 0x03;
12 static const uint8_t DPS310_REG_PRS_CFG = 0x06;
13 static const uint8_t DPS310_REG_TMP_CFG = 0x07;
14 static const uint8_t DPS310_REG_MEAS_CFG = 0x08;
15 static const uint8_t DPS310_REG_CFG = 0x09;
16 static const uint8_t DPS310_REG_RESET = 0x0C;
17 static const uint8_t DPS310_REG_PROD_REV_ID = 0x0D;
18 static const uint8_t DPS310_REG_COEF = 0x10;
19 static const uint8_t DPS310_REG_TMP_COEF_SRC = 0x28;
21 static const uint8_t DPS310_BIT_PRS_RDY = 0x10;
22 static const uint8_t DPS310_BIT_TMP_RDY = 0x20;
23 static const uint8_t DPS310_BIT_SENSOR_RDY = 0x40;
24 static const uint8_t DPS310_BIT_COEF_RDY = 0x80;
25 static const uint8_t DPS310_BIT_TMP_COEF_SRC = 0x80;
26 static const uint8_t DPS310_BIT_REQ_PRES = 0x01;
27 static const uint8_t DPS310_BIT_REQ_TEMP = 0x02;
29 static const uint8_t DPS310_CMD_RESET = 0x89;
31 static const uint8_t DPS310_VAL_PRS_CFG = 0x01;
32 static const uint8_t DPS310_VAL_TMP_CFG = 0x01;
33 static const uint8_t DPS310_VAL_REG_CFG = 0x00;
35 static const uint8_t DPS310_INIT_TIMEOUT = 20;
36 static const uint8_t DPS310_NUM_COEF_REGS = 18;
37 static const int32_t DPS310_SCALE_FACTOR = 1572864;
41 void setup()
override;
void dump_config() override
sensor::Sensor * temperature_sensor_
This class simplifies creating components that periodically check a state.
void calculate_values_(int32_t raw_temperature, int32_t raw_pressure)
sensor::Sensor * pressure_sensor_
void set_pressure_sensor(sensor::Sensor *pressure_sensor)
float get_setup_priority() const override
Implementation of SPI Controller mode.
Base-class for all sensors.
void set_temperature_sensor(sensor::Sensor *temperature_sensor)
This Class provides the methods to read/write bytes from/to an i2c device.
static int32_t twos_complement(int32_t val, uint8_t bits)