11 uint8_t coef_data_raw[DPS310_NUM_COEF_REGS];
12 auto timer = DPS310_INIT_TIMEOUT;
15 ESP_LOGCONFIG(TAG,
"Setting up DPS310...");
17 if (!this->
write_byte(DPS310_REG_RESET, DPS310_CMD_RESET)) {
23 while (timer-- && (!(
reg & DPS310_BIT_SENSOR_RDY) || !(
reg & DPS310_BIT_COEF_RDY))) {
28 if (!(
reg & DPS310_BIT_SENSOR_RDY) || !(
reg & DPS310_BIT_COEF_RDY)) {
38 if (!this->
read_bytes(DPS310_REG_COEF, coef_data_raw, DPS310_NUM_COEF_REGS)) {
48 if (!this->
write_byte(DPS310_REG_PRS_CFG, DPS310_VAL_PRS_CFG)) {
52 if (!this->
write_byte(DPS310_REG_TMP_CFG, DPS310_VAL_TMP_CFG | (
reg & DPS310_BIT_TMP_COEF_SRC))) {
56 if (!this->
write_byte(DPS310_REG_CFG, DPS310_VAL_REG_CFG)) {
60 if (!this->
write_byte(DPS310_REG_MEAS_CFG, 0x07)) {
67 int16_t(((uint16_t) coef_data_raw[0] << 4) | (((uint16_t) coef_data_raw[1] >> 4) & 0x0F)), 12) /
73 this->
c00_ = ((uint32_t) coef_data_raw[3] << 12) | ((uint32_t) coef_data_raw[4] << 4) |
74 (((uint32_t) coef_data_raw[5] >> 4) & 0x0F);
78 (((uint32_t) coef_data_raw[5] & 0x0F) << 16) | ((uint32_t) coef_data_raw[6] << 8) | (uint32_t) coef_data_raw[7];
81 this->
c01_ = int16_t(((uint16_t) coef_data_raw[8] << 8) | (uint16_t) coef_data_raw[9]);
82 this->
c11_ = int16_t(((uint16_t) coef_data_raw[10] << 8) | (uint16_t) coef_data_raw[11]);
83 this->
c20_ = int16_t(((uint16_t) coef_data_raw[12] << 8) | (uint16_t) coef_data_raw[13]);
84 this->
c21_ = int16_t(((uint16_t) coef_data_raw[14] << 8) | (uint16_t) coef_data_raw[15]);
85 this->
c30_ = int16_t(((uint16_t) coef_data_raw[16] << 8) | (uint16_t) coef_data_raw[17]);