Temperature can be negative, use signed integer.
authorNathael Pajani <nathael.pajani@ed3l.fr>
Thu, 3 Jan 2019 16:52:05 +0000 (17:52 +0100)
committerNathael Pajani <nathael.pajani@ed3l.fr>
Tue, 8 Nov 2022 16:03:05 +0000 (17:03 +0100)
extdrv/bme280_humidity_sensor.c

index 42044f0..656b569 100644 (file)
@@ -170,7 +170,7 @@ int bme280_configure(struct bme280_sensor_config* conf)
  *   glibc.
  */
 #define READ_CMD_SIZE   3
-int bme280_sensor_read(struct bme280_sensor_config* conf, uint32_t* pressure, uint32_t* temp, uint16_t* hum)
+int bme280_sensor_read(struct bme280_sensor_config* conf, uint32_t* pressure, int32_t* temp, uint16_t* hum)
 {
     int ret = 0;
     char cmd_buf[READ_CMD_SIZE] = { conf->addr, BME280_REGS(raw_data), (conf->addr | I2C_READ_BIT), };