Si70XX Sensor#
Enumerations#
Enum for Si70xx commands.
Enum for Temperature, Humidity measurement.
Enum for User, Heater control registers.
Typedefs#
Enum for Si70xx commands.
Enum for Temperature, Humidity measurement.
Enum for electronic ID.
Enum for User, Heater control registers.
Functions#
Initialize the Si70xx sensor.
Check whether an Si7006/13/20/21 is present on the I2C bus (or) not.
Measure relative humidity and temperature from Si7006/13/20/21 sensor.
Read Firmware Revision from Si7006/13/20/21 sensor.
Reads temperature value from previous relative humidity measurement from Si7006/13/20/21 sensor.
Start a no hold measurement of relative humidity (or) temperature from Si7006/13/20/21 sensor.
Measure relative humidity from Si7006/13/20/21 sensor.
Measure temperature from Si7006/13/20/21 sensor.
Initiates a si70xx software reset by the appropriate command.
Reads the user register 1 and heater control register data.
Writes data to user register 1 and heater control register.
Macros#
I2C device address for Si7006.
I2C device address for Si7013.
I2C device address for Si7020.
I2C device address for Si7021.
I2C2 base.
Read buffer length 2 bytes.
Write buffer length 2 bytes.
Read buffer length 6 bytes.
Write buffer length 1 byte.
Enumeration Documentation#
sl_si70xx_commands#
sl_si70xx_commands
Enum for Si70xx commands.
Enumerator | |
---|---|
SL_HUMIDITY_HM | Measure Relative Humidity, Hold Master Mode. |
SL_HUMIDITY_NHM | Measure Relative Humidity, No Hold Master Mode. |
SL_TEMPERATURE_HM | Measure Temperature, Hold Master Mode. |
SL_TEMPERATURE_NHM | Measure Temperature, No Hold Master Mode. |
SL_TEMPERATURE_AH | Read Temperature Value from Previous RH Measurement. |
SL_SI70XX_RESET | Si70XX Reset. |
SL_W_RHT_U_REG | Write RH/T User Register 1. |
SL_R_RHT_U_REG | Read RH/T User Register 1. |
SL_W_HEATER_C_REG | Write Heater Control Register. |
SL_R_HEATER_C_REG | Read Heater Control Register. |
SL_EID_BYTEL1 | Read Electronic ID 1st Byte, first part. |
SL_EID_BYTEL2 | Read Electronic ID 1st Byte, second part. |
SL_EID_BYTE21 | Read Electronic ID 2nd Byte, first part. |
SL_EID_BYTE22 | Read Electronic ID 2nd Byte, second part. |
SL_FIRMWARE_REV1 | Read Firmware Revision, first part. |
SL_FIRMWARE_REV2 | Read Firmware Revision, second part. |
64
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
sl_si70xx_measurement_type#
sl_si70xx_measurement_type
Enum for Temperature, Humidity measurement.
Enumerator | |
---|---|
SL_HUMIDITY | Enumerator for humidity selection. |
SL_TEMPERATURE | Enumerator for temperature selection. |
SL_LAST_MEASUREMENT | Last enum for validation. |
84
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
sl_si70xx_eid_type#
sl_si70xx_eid_type
Enum for electronic ID.
Enumerator | |
---|---|
SL_EID_FIRST_BYTE | Enumerator for sending electronic ID first byte. |
SL_EID_SECOND_BYTE | Enumerator for sending electronic ID second byte. |
SL_LAST_EID | Last enum for validation. |
91
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
sl_si70xx_registers#
sl_si70xx_registers
Enum for User, Heater control registers.
Enumerator | |
---|---|
SL_RH_T_USER_REG | Enumerator for write RH/T user register selection. |
SL_HEATER_CONTROL_REG | Enumerator for heater control register selection. |
SL_LAST_CONTROL_REG | Last enum for validation. |
98
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
Typedef Documentation#
sl_si70xx_commands_t#
typedef enum sl_si70xx_commands sl_si70xx_commands_t
Enum for Si70xx commands.
81
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
sl_si70xx_measurement_type_t#
typedef enum sl_si70xx_measurement_type sl_si70xx_measurement_type_t
Enum for Temperature, Humidity measurement.
88
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
sl_si70xx_eid_type_t#
typedef enum sl_si70xx_eid_type sl_si70xx_eid_type_t
Enum for electronic ID.
95
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
sl_si70xx_registers_t#
typedef enum sl_si70xx_registers sl_si70xx_registers_t
Enum for User, Heater control registers.
102
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
Function Documentation#
sl_si91x_si70xx_init#
sl_status_t sl_si91x_si70xx_init (sl_i2c_instance_t i2c_instance, uint8_t addr, sl_si70xx_eid_type_t eid)
Initialize the Si70xx sensor.
[in] | i2c_instance | : I2C peripheral to use. |
[in] | addr | : I2C address to probe. |
[in] | eid | : electronic ID of type sl_si70xx_eid_type_t. |
Pre-conditions:
Returns
The following values are returned:
SL_STATUS_OK on success
SL_STATUS_INITIALIZATION (0x0010) - no Si70xx device present
SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument
123
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
sl_si91x_si70xx_is_present#
sl_status_t sl_si91x_si70xx_is_present (sl_i2c_instance_t i2c_instance, uint8_t addr, sl_si70xx_eid_type_t eid)
Check whether an Si7006/13/20/21 is present on the I2C bus (or) not.
[in] | i2c_instance | : I2C peripheral to use. |
[in] | addr | : I2C address to probe. |
[in] | eid | : electronic ID of type sl_si70xx_eid_type_t. If SL_EID_FIRST_BYTE is selected, then EID 1st byte is considered. If SL_EID_SECOND_BYTE is selected, then EID 2nd byte is considered. For EID 1st byte, EID 2nd byte commands please look into datasheet. Write device ID from SNB_3 if device responds. Pass in NULL to discard. Should be 0x0D for Si7013, 0x14 for Si7020 or 0x15 for Si7021 |
Pre-conditions:
Returns
The following values are returned:
SL_STATUS_OK on success
SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument
144
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
sl_si91x_si70xx_measure_rh_and_temp#
sl_status_t sl_si91x_si70xx_measure_rh_and_temp (sl_i2c_instance_t i2c_instance, uint8_t addr, uint32_t * humid_data, int32_t * temp_data)
Measure relative humidity and temperature from Si7006/13/20/21 sensor.
[in] | i2c_instance | : I2C peripheral to use. |
[in] | addr | : I2C address to probe. |
[out] | humid_data | : The relative humidity in percentage obtained after doing conversion as per formula mentioned in datasheet. |
[out] | temp_data | : The temperature in milliCelsius. |
Pre-conditions:
Returns
The following values are returned:
SL_STATUS_OK on success
SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument
SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer
164
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
sl_si91x_si70xx_get_firmware_revision#
sl_status_t sl_si91x_si70xx_get_firmware_revision (sl_i2c_instance_t i2c_instance, uint8_t addr, uint8_t * firmware_revision)
Read Firmware Revision from Si7006/13/20/21 sensor.
[in] | i2c_instance | : I2C peripheral to use. |
[in] | addr | : I2C address to probe. |
[out] | firmware_revision | : Internal firmware revision. |
Pre-conditions:
Returns
The following values are returned:
SL_STATUS_OK on success
SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument
SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer
185
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
sl_si91x_si70xx_read_temp_from_rh#
sl_status_t sl_si91x_si70xx_read_temp_from_rh (sl_i2c_instance_t i2c_instance, uint8_t addr, uint32_t * humid_data, int32_t * temp_data)
Reads temperature value from previous relative humidity measurement from Si7006/13/20/21 sensor.
[in] | i2c_instance | : I2C peripheral to use. |
[in] | addr | : I2C address to probe. |
[out] | humid_data | : The relative humidity in percent (multiplied by 1000). |
[out] | temp_data | : The temperature in milliCelsius. |
Pre-conditions:
Returns
The following values are returned:
SL_STATUS_OK on success
SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument
SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer
206
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
sl_si91x_si70xx_start_no_hold_measure_rh_or_temp#
sl_status_t sl_si91x_si70xx_start_no_hold_measure_rh_or_temp (sl_i2c_instance_t i2c_instance, uint8_t addr, sl_si70xx_measurement_type_t type, uint32_t * data)
Start a no hold measurement of relative humidity (or) temperature from Si7006/13/20/21 sensor.
[in] | i2c_instance | : I2C peripheral to use. |
[in] | addr | : I2C address to probe. |
[in] | type | : measurement value of type sl_si70xx_measurement_type_t. |
[out] | data | : The data read from the sensor. |
Pre-conditions:
Returns
The following values are returned:
SL_STATUS_OK on success
SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument
226
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
sl_si91x_si70xx_measure_humidity#
sl_status_t sl_si91x_si70xx_measure_humidity (sl_i2c_instance_t i2c_instance, uint8_t addr, uint32_t * humid_data)
Measure relative humidity from Si7006/13/20/21 sensor.
[in] | i2c_instance | : I2C peripheral to use. |
[in] | addr | : I2C address to probe. |
[out] | humid_data | : The relative humidity measurement. |
Pre-conditions:
Returns
The following values are returned:
SL_STATUS_OK on success
SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument
SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer
247
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
sl_si91x_si70xx_measure_temperature#
sl_status_t sl_si91x_si70xx_measure_temperature (sl_i2c_instance_t i2c_instance, uint8_t addr, int32_t * temp_data)
Measure temperature from Si7006/13/20/21 sensor.
[in] | i2c_instance | : I2C peripheral to use. |
[in] | addr | : I2C address to probe. |
[out] | temp_data | : The temperature measurement. |
Pre-conditions:
Returns
The following values are returned:
SL_STATUS_OK on success
SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument
SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer
265
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
sl_si91x_si70xx_reset#
sl_status_t sl_si91x_si70xx_reset (sl_i2c_instance_t i2c_instance, uint8_t addr)
Initiates a si70xx software reset by the appropriate command.
[in] | i2c_instance | : I2C peripheral to use. |
[in] | addr | : I2C address to probe. |
Returns
The following values are returned:
SL_STATUS_OK on success
SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument
277
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
sl_si91x_si70xx_read_control_register#
sl_status_t sl_si91x_si70xx_read_control_register (sl_i2c_instance_t i2c_instance, uint8_t addr, sl_si70xx_registers_t reg, uint8_t * data)
Reads the user register 1 and heater control register data.
[in] | i2c_instance | : I2C peripheral to use. |
[in] | addr | : I2C address to probe. |
[in] | reg | : Register of type sl_si70xx_registers_t. |
[out] | data | : The data read from the sensor. |
Pre-conditions:
Returns
The following values are returned:
SL_STATUS_OK on success
SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument
SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer
296
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
sl_si91x_si70xx_write_control_register#
sl_status_t sl_si91x_si70xx_write_control_register (sl_i2c_instance_t i2c_instance, uint8_t addr, sl_si70xx_registers_t reg, uint8_t value)
Writes data to user register 1 and heater control register.
[in] | i2c_instance | : I2C peripheral to use. |
[in] | addr | : I2C address to probe. |
[in] | reg | : Register of type sl_si70xx_registers_t. |
[out] | value | : The value written into the register. |
Pre-conditions:
Returns
The following values are returned:
SL_STATUS_OK on success
SL_STATUS_INVALID_PARAMETER (0x0021) - The parameter is invalid argument
315
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
Macro Definition Documentation#
SI7006_ADDR#
#define SI7006_ADDRValue:
0X40
I2C device address for Si7006.
50
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
SI7013_ADDR#
#define SI7013_ADDRValue:
0x41
I2C device address for Si7013.
51
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
SI7020_ADDR#
#define SI7020_ADDRValue:
0X40
I2C device address for Si7020.
52
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
SI7021_ADDR#
#define SI7021_ADDRValue:
0x40
I2C device address for Si7021.
53
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
I2C_BASE#
#define I2C_BASEValue:
I2C2
I2C2 base.
54
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
RX_LEN#
#define RX_LENValue:
2
Read buffer length 2 bytes.
55
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
TX_LEN#
#define TX_LENValue:
2
Write buffer length 2 bytes.
56
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
RD_BUF#
#define RD_BUFValue:
6
Read buffer length 6 bytes.
57
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h
WR_BUF#
#define WR_BUFValue:
1
Write buffer length 1 byte.
58
of file components/device/silabs/si91x/mcu/drivers/hardware_drivers/si70xx_sensor/inc/sl_si91x_si70xx.h