Skip to content

Commit 2e024f5

Browse files
Gaspard RigolotMaureenHelm
authored andcommitted
drivers: sensor: dps310 fix pressure and temperature registers
The two registers were inverted. Signed-off-by: Gaspard Rigolot <[email protected]>
1 parent 03ad31b commit 2e024f5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/sensor/dps310/dps310.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ static bool dps310_measure_psr(struct dps310_data *data,
524524

525525
/* read pressure raw values in one continuous read */
526526
int res = i2c_write_read(data->i2c_master, config->i2c_addr,
527-
&REG_ADDR_TMP_B2, 1, &value_raw,
527+
&REG_ADDR_PSR_B2, 1, &value_raw,
528528
sizeof(value_raw));
529529
if (res < 0) {
530530
LOG_WRN("I2C error: %d", res);
@@ -553,7 +553,7 @@ static bool dps310_measure_tmp(struct dps310_data *data,
553553

554554
/* read temperature raw values in one continuous read */
555555
int res = i2c_write_read(data->i2c_master, config->i2c_addr,
556-
&REG_ADDR_PSR_B2, 1, &value_raw,
556+
&REG_ADDR_TMP_B2, 1, &value_raw,
557557
sizeof(value_raw));
558558
if (res < 0) {
559559
LOG_WRN("I2C error: %d", res);

0 commit comments

Comments
 (0)