Relative Humidity and Temperature sensor#
Relative Humidity and Temperature sensor driver abstraction designed for Thunderboard.
Functions#
Macros#
Function Documentation#
sl_sensor_rht_init#
sl_status_t sl_sensor_rht_init (void )
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Initialize Relative Humidity and Temperature sensor.
Note
With certain boards (e.g. 4166A, 4184A, 4184B), using this initialization function enables other sensors, because they're on the same enable pin. Please take that into account when using this function.
Returns
Status of the operation.
sl_sensor_rht_deinit#
void sl_sensor_rht_deinit (void )
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| void | N/A |
Deinitialize Relative Humidity and Temperature sensor.
Warnings
With certain boards (e.g. 4166A, 4184A, 4184B), using this deinitialization function disables other sensors, because they're on the same enable pin. Please use with caution.
sl_sensor_rht_get#
sl_status_t sl_sensor_rht_get (uint32_t * rh, int32_t * t)
| Type | Direction | Argument Name | Description |
|---|---|---|---|
| uint32_t * | [out] | rh | Relative humidity (in 0.001 percent). |
| int32_t * | [out] | t | Temperature (in 0.001 Celsius). |
Getter for Relative Humidity and Temperature sensor measurement data. Returns
Status of the operation.
Macro Definition Documentation#
SENSOR_THERMOMETER_STATUS_TRIGGER_TYPE_DISCRETE_VALUE#
#define SENSOR_THERMOMETER_STATUS_TRIGGER_TYPE_DISCRETE_VALUEValue:
0
SENSOR_THERMOMETER_STATUS_TRIGGER_TYPE_PERCENTAGE#
#define SENSOR_THERMOMETER_STATUS_TRIGGER_TYPE_PERCENTAGEValue:
1
SENSOR_THERMOMETER_MIN_PERCENTAGE_DELTA_VALUE#
#define SENSOR_THERMOMETER_MIN_PERCENTAGE_DELTA_VALUEValue:
0
SENSOR_THERMOMETER_MAX_PERCENTAGE_DELTA_VALUE#
#define SENSOR_THERMOMETER_MAX_PERCENTAGE_DELTA_VALUEValue:
65535
SENSOR_THERMOMETER_MIN_DISCRETE_DELTA_VALUE#
#define SENSOR_THERMOMETER_MIN_DISCRETE_DELTA_VALUEValue:
-128
SENSOR_THERMOMETER_MAX_DISCRETE_DELTA_VALUE#
#define SENSOR_THERMOMETER_MAX_DISCRETE_DELTA_VALUEValue:
127
SENSOR_THERMOMETER_SAMPLING_FUNCTION#
#define SENSOR_THERMOMETER_SAMPLING_FUNCTIONValue:
SAMPLING_UNSPECIFIED
SENSOR_THERMOMETER_FAST_CADENCE_PERIOD_DIVISOR#
#define SENSOR_THERMOMETER_FAST_CADENCE_PERIOD_DIVISORValue:
0
SENSOR_THERMOMETER_STATUS_TRIGGER_TYPE#
#define SENSOR_THERMOMETER_STATUS_TRIGGER_TYPEValue:
SENSOR_THERMOMETER_STATUS_TRIGGER_TYPE_DISCRETE_VALUE
SENSOR_THERMOMETER_STATUS_TRIGGER_DELTA_DOWN#
#define SENSOR_THERMOMETER_STATUS_TRIGGER_DELTA_DOWNValue:
0
SENSOR_THERMOMETER_STATUS_TRIGGER_DELTA_UP#
#define SENSOR_THERMOMETER_STATUS_TRIGGER_DELTA_UPValue:
0