BME280: Added RESET register macro.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
Signed-off-by: Yilin Sun <imi415@imi.moe>
This commit is contained in:
parent
60df7deccb
commit
d1c07c0446
|
@ -40,6 +40,7 @@
|
|||
#define IMS_BME280_REG_DIG_H5_H (0xE6U)
|
||||
#define IMS_BME280_REG_DIG_H6 (0xE7U)
|
||||
|
||||
#define IMS_BME280_REG_RESET (0xE0U)
|
||||
#define IMS_BME280_REG_CTRL_HUM (0xF2U)
|
||||
#define IMS_BME280_REG_STATUS (0xF3U)
|
||||
#define IMS_BME280_REG_CTRL_MEAS (0xF4U)
|
||||
|
@ -52,6 +53,8 @@
|
|||
#define IMS_BME280_REG_CTRL_MEAS_MODE_Pos (0U)
|
||||
#define IMS_BME280_REG_CTRL_MEAS_MODE_Msk (3U << IMS_BME280_REG_CTRL_MEAS_MODE_Pos)
|
||||
|
||||
#define IMS_BME280_CONST_RESET_MAGIC (0xB6U)
|
||||
|
||||
#define IMS_BME280_FORCED_TIMEOUT_MS 100
|
||||
|
||||
#define IMS_BME280_CONCAT_BYTES(msb, lsb) (((uint16_t)msb << 8) | (uint16_t)lsb)
|
||||
|
@ -111,7 +114,7 @@ static uint32_t ims_bme280_compensate_H_int32(ims_bme280_t *bme, int32_t adc_H);
|
|||
#endif
|
||||
|
||||
static ims_ret_t ims_bme280_reset(ims_bme280_t *bme) {
|
||||
return ims_bme280_write_register(bme, 0xE0, 0xB6);
|
||||
return ims_bme280_write_register(bme, IMS_BME280_REG_RESET, IMS_BME280_CONST_RESET_MAGIC);
|
||||
}
|
||||
|
||||
static ims_ret_t ims_bme280_read_trim_data(ims_bme280_t *bme) {
|
||||
|
|
Loading…
Reference in New Issue