Capacitive digital sensor for relative humidity and temperature.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: HelloWorld_ST_Sensors MOTENV_Mbed mbed-os-mqtt-client HTS221_JS ... more
HTS221_Public_Functions
[HTS221_DRIVER]
Functions | |
HTS221_Error_et | HTS221_Get_DriverVersion (HTS221_DriverVersion_st *version) |
Get the version of this driver. | |
HTS221_Error_et | HTS221_Get_DeviceID (void *handle, uint8_t *deviceid) |
Get device type ID. | |
HTS221_Error_et | HTS221_Set_InitConfig (void *handle, HTS221_Init_st *pxInit) |
Initializes the HTS221 with the specified parameters in HTS221_Init_st struct. | |
HTS221_Error_et | HTS221_Get_InitConfig (void *handle, HTS221_Init_st *pxInit) |
Returns a HTS221_Init_st struct with the actual configuration. | |
HTS221_Error_et | HTS221_DeInit (void *handle) |
De initialization function for HTS221. | |
HTS221_Error_et | HTS221_Get_Measurement (void *handle, uint16_t *humidity, int16_t *temperature) |
Read HTS221 output registers, and calculate humidity and temperature. | |
HTS221_Error_et | HTS221_Get_RawMeasurement (void *handle, int16_t *humidity, int16_t *temperature) |
Read HTS221 output registers. | |
HTS221_Error_et | HTS221_Get_Humidity (void *handle, uint16_t *value) |
Read HTS221 Humidity output registers, and calculate humidity. | |
HTS221_Error_et | HTS221_Get_HumidityRaw (void *handle, int16_t *value) |
Read HTS221 humidity output registers. | |
HTS221_Error_et | HTS221_Get_Temperature (void *handle, int16_t *value) |
Read HTS221 temperature output registers, and calculate temperature. | |
HTS221_Error_et | HTS221_Get_TemperatureRaw (void *handle, int16_t *value) |
Read HTS221 temperature output registers. | |
HTS221_Error_et | HTS221_Get_DataStatus (void *handle, HTS221_BitStatus_et *humidity, HTS221_BitStatus_et *temperature) |
Get the availability of new data for humidity and temperature. | |
HTS221_Error_et | HTS221_Activate (void *handle) |
Exit from power down mode. | |
HTS221_Error_et | HTS221_DeActivate (void *handle) |
Put the sensor in power down mode. | |
HTS221_Error_et | HTS221_IsMeasurementCompleted (void *handle, HTS221_BitStatus_et *Is_Measurement_Completed) |
Check if the single measurement has completed. | |
HTS221_Error_et | HTS221_Set_AvgHT (void *handle, HTS221_Avgh_et avgh, HTS221_Avgt_et avgt) |
Set_ humidity and temperature average mode. | |
HTS221_Error_et | HTS221_Set_AvgH (void *handle, HTS221_Avgh_et avgh) |
Set humidity average mode. | |
HTS221_Error_et | HTS221_Set_AvgT (void *handle, HTS221_Avgt_et avgt) |
Set temperature average mode. | |
HTS221_Error_et | HTS221_Get_AvgHT (void *handle, HTS221_Avgh_et *avgh, HTS221_Avgt_et *avgt) |
Get humidity and temperature average mode. | |
HTS221_Error_et | HTS221_Set_BduMode (void *handle, HTS221_State_et status) |
Set block data update mode. | |
HTS221_Error_et | HTS221_Get_BduMode (void *handle, HTS221_State_et *status) |
Get block data update mode. | |
HTS221_Error_et | HTS221_Set_PowerDownMode (void *handle, HTS221_BitStatus_et status) |
Enter or exit from power down mode. | |
HTS221_Error_et | HTS221_Get_PowerDownMode (void *handle, HTS221_BitStatus_et *status) |
Get if HTS221 is in active mode or in power down mode. | |
HTS221_Error_et | HTS221_Set_Odr (void *handle, HTS221_Odr_et odr) |
Set the output data rate mode. | |
HTS221_Error_et | HTS221_Get_Odr (void *handle, HTS221_Odr_et *odr) |
Get the output data rate mode. | |
HTS221_Error_et | HTS221_MemoryBoot (void *handle) |
Reboot Memory Content. | |
HTS221_Error_et | HTS221_Set_HeaterState (void *handle, HTS221_State_et status) |
Configure the internal heater. | |
HTS221_Error_et | HTS221_Get_HeaterState (void *handle, HTS221_State_et *status) |
Get the internal heater. | |
HTS221_Error_et | HTS221_StartOneShotMeasurement (void *handle) |
Set ONE_SHOT bit to start a new conversion (ODR mode has to be 00). | |
HTS221_Error_et | HTS221_Set_IrqActiveLevel (void *handle, HTS221_DrdyLevel_et value) |
Set level configuration of the interrupt pin DRDY. | |
HTS221_Error_et | HTS221_Get_IrqActiveLevel (void *handle, HTS221_DrdyLevel_et *value) |
Get level configuration of the interrupt pin DRDY. | |
HTS221_Error_et | HTS221_Set_IrqOutputType (void *handle, HTS221_OutputType_et value) |
Set Push-pull/open drain configuration for the interrupt pin DRDY. | |
HTS221_Error_et | HTS221_Get_IrqOutputType (void *handle, HTS221_OutputType_et *value) |
Get the configuration for the interrupt pin DRDY. | |
HTS221_Error_et | HTS221_Set_IrqEnable (void *handle, HTS221_State_et status) |
Enable/disable the interrupt mode. | |
HTS221_Error_et | HTS221_Get_IrqEnable (void *handle, HTS221_State_et *status) |
Get the interrupt mode. | |
void | HTS221_assert_failed (uint8_t *file, uint32_t line) |
Reports the name of the source file and the source line number where the assert_param error has occurred. |
Function Documentation
HTS221_Error_et HTS221_Activate | ( | void * | handle ) |
Exit from power down mode.
- Parameters:
-
*handle Device handle. void.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 481 of file HTS221_driver.c.
void HTS221_assert_failed | ( | uint8_t * | file, |
uint32_t | line | ||
) |
Reports the name of the source file and the source line number where the assert_param error has occurred.
- Parameters:
-
file,: pointer to the source file name line,: assert_param error line source number
- Return values:
-
: None
Definition at line 1029 of file HTS221_driver.c.
HTS221_Error_et HTS221_DeActivate | ( | void * | handle ) |
Put the sensor in power down mode.
- Parameters:
-
*handle Device handle.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 503 of file HTS221_driver.c.
HTS221_Error_et HTS221_DeInit | ( | void * | handle ) |
De initialization function for HTS221.
This function put the HTS221 in power down, make a memory boot and clear the data output flags.
- Parameters:
-
*handle Device handle.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 259 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_AvgHT | ( | void * | handle, |
HTS221_Avgh_et * | avgh, | ||
HTS221_Avgt_et * | avgt | ||
) |
Get humidity and temperature average mode.
- Parameters:
-
*handle Device handle. avgh pointer to the returned value with the humidity average mode. avgt pointer to the returned value with the temperature average mode.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 634 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_BduMode | ( | void * | handle, |
HTS221_State_et * | status | ||
) |
Get block data update mode.
- Parameters:
-
*handle Device handle. Pointer to the returned value with block data update mode status.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 682 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_DataStatus | ( | void * | handle, |
HTS221_BitStatus_et * | humidity, | ||
HTS221_BitStatus_et * | temperature | ||
) |
Get the availability of new data for humidity and temperature.
- Parameters:
-
*handle Device handle. humidity pointer to the returned humidity data status [HTS221_SET/HTS221_RESET]. temperature pointer to the returned temperature data status [HTS221_SET/HTS221_RESET]. This parameter is a pointer to HTS221_BitStatus_et.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 461 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_DeviceID | ( | void * | handle, |
uint8_t * | deviceid | ||
) |
Get device type ID.
- Parameters:
-
*handle Device handle. deviceid pointer to the returned device type ID.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 155 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_DriverVersion | ( | HTS221_DriverVersion_st * | version ) |
Get the version of this driver.
- Parameters:
-
pxVersion pointer to a HTS221_DriverVersion_st structure that contains the version information. This parameter is a pointer to HTS221_DriverVersion_st.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 140 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_HeaterState | ( | void * | handle, |
HTS221_State_et * | status | ||
) |
Get the internal heater.
- Parameters:
-
*handle Device handle. Pointer to the returned status of the internal heater [HTS221_ENABLE/HTS221_DISABLE].
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 844 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_Humidity | ( | void * | handle, |
uint16_t * | value | ||
) |
Read HTS221 Humidity output registers, and calculate humidity.
- Parameters:
-
*handle Device handle. Pointer to the returned humidity value that must be divided by 10 to get the value in [%].
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 331 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_HumidityRaw | ( | void * | handle, |
int16_t * | value | ||
) |
Read HTS221 humidity output registers.
- Parameters:
-
*handle Device handle. Pointer to the returned humidity raw value.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 375 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_InitConfig | ( | void * | handle, |
HTS221_Init_st * | pxInit | ||
) |
Returns a HTS221_Init_st struct with the actual configuration.
- Parameters:
-
*handle Device handle. pxInit pointer to a HTS221_Init_st structure. This parameter is a pointer to HTS221_Init_st.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 227 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_IrqActiveLevel | ( | void * | handle, |
HTS221_DrdyLevel_et * | value | ||
) |
Get level configuration of the interrupt pin DRDY.
- Parameters:
-
*handle Device handle. Pointer to the returned status of the level configuration [HTS221_ENABLE/HTS221_DISABLE].
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 915 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_IrqEnable | ( | void * | handle, |
HTS221_State_et * | status | ||
) |
Get the interrupt mode.
- Parameters:
-
*handle Device handle. Pointer to the returned status of the interrupt mode configuration [HTS221_ENABLE/HTS221_DISABLE].
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 1007 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_IrqOutputType | ( | void * | handle, |
HTS221_OutputType_et * | value | ||
) |
Get the configuration for the interrupt pin DRDY.
- Parameters:
-
*handle Device handle. Pointer to the returned value with output type configuration.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 961 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_Measurement | ( | void * | handle, |
uint16_t * | humidity, | ||
int16_t * | temperature | ||
) |
Read HTS221 output registers, and calculate humidity and temperature.
- Parameters:
-
*handle Device handle. humidity pointer to the returned humidity value that must be divided by 10 to get the value in [%]. temperature pointer to the returned temperature value that must be divided by 10 to get the value in ['C].
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 292 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_Odr | ( | void * | handle, |
HTS221_Odr_et * | odr | ||
) |
Get the output data rate mode.
- Parameters:
-
*handle Device handle. Pointer to the returned value with output data rate mode.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 775 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_PowerDownMode | ( | void * | handle, |
HTS221_BitStatus_et * | status | ||
) |
Get if HTS221 is in active mode or in power down mode.
- Parameters:
-
*handle Device handle. Pointer to the returned value with HTS221 status.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 729 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_RawMeasurement | ( | void * | handle, |
int16_t * | humidity, | ||
int16_t * | temperature | ||
) |
Read HTS221 output registers.
Humidity and temperature.
- Parameters:
-
*handle Device handle. humidity pointer to the returned humidity raw value. temperature pointer to the returned temperature raw value.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 311 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_Temperature | ( | void * | handle, |
int16_t * | value | ||
) |
Read HTS221 temperature output registers, and calculate temperature.
- Parameters:
-
*handle Device handle. Pointer to the returned temperature value that must be divided by 10 to get the value in ['C].
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 394 of file HTS221_driver.c.
HTS221_Error_et HTS221_Get_TemperatureRaw | ( | void * | handle, |
int16_t * | value | ||
) |
Read HTS221 temperature output registers.
- Parameters:
-
*handle Device handle. Pointer to the returned temperature raw value.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 440 of file HTS221_driver.c.
HTS221_Error_et HTS221_IsMeasurementCompleted | ( | void * | handle, |
HTS221_BitStatus_et * | Is_Measurement_Completed | ||
) |
Check if the single measurement has completed.
- Parameters:
-
*handle Device handle. tmp is set to 1, when the measure is completed
- Return values:
-
Status [HTS221_ERROR, HTS221_OK]
Definition at line 528 of file HTS221_driver.c.
HTS221_Error_et HTS221_MemoryBoot | ( | void * | handle ) |
Reboot Memory Content.
- Parameters:
-
*handle Device handle.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 794 of file HTS221_driver.c.
HTS221_Error_et HTS221_Set_AvgH | ( | void * | handle, |
HTS221_Avgh_et | avgh | ||
) |
Set humidity average mode.
- Parameters:
-
*handle Device handle. avgh is the average mode for humidity, this parameter is HTS221_Avgh_et.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 581 of file HTS221_driver.c.
HTS221_Error_et HTS221_Set_AvgHT | ( | void * | handle, |
HTS221_Avgh_et | avgh, | ||
HTS221_Avgt_et | avgt | ||
) |
Set_ humidity and temperature average mode.
- Parameters:
-
*handle Device handle. avgh is the average mode for humidity, this parameter is HTS221_Avgh_et. avgt is the average mode for temperature, this parameter is HTS221_Avgt_et.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 553 of file HTS221_driver.c.
HTS221_Error_et HTS221_Set_AvgT | ( | void * | handle, |
HTS221_Avgt_et | avgt | ||
) |
Set temperature average mode.
- Parameters:
-
*handle Device handle. avgt is the average mode for temperature, this parameter is HTS221_Avgt_et.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 607 of file HTS221_driver.c.
HTS221_Error_et HTS221_Set_BduMode | ( | void * | handle, |
HTS221_State_et | status | ||
) |
Set block data update mode.
- Parameters:
-
*handle Device handle. status can be HTS221_ENABLE: enable the block data update, output data registers are updated once both MSB and LSB are read. status can be HTS221_DISABLE: output data registers are continuously updated. This parameter is a HTS221_BitStatus_et.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 656 of file HTS221_driver.c.
HTS221_Error_et HTS221_Set_HeaterState | ( | void * | handle, |
HTS221_State_et | status | ||
) |
Configure the internal heater.
- Parameters:
-
*handle Device handle. The status of the internal heater [HTS221_ENABLE/HTS221_DISABLE]. This parameter is a HTS221_State_et.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR]
Definition at line 818 of file HTS221_driver.c.
HTS221_Error_et HTS221_Set_InitConfig | ( | void * | handle, |
HTS221_Init_st * | pxInit | ||
) |
Initializes the HTS221 with the specified parameters in HTS221_Init_st struct.
- Parameters:
-
*handle Device handle. pxInit pointer to a HTS221_Init_st structure that contains the configuration. This parameter is a pointer to HTS221_Init_st.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 171 of file HTS221_driver.c.
HTS221_Error_et HTS221_Set_IrqActiveLevel | ( | void * | handle, |
HTS221_DrdyLevel_et | value | ||
) |
Set level configuration of the interrupt pin DRDY.
- Parameters:
-
*handle Device handle. status can be HTS221_LOW_LVL: active level is LOW. status can be HTS221_HIGH_LVL: active level is HIGH. This parameter is a HTS221_State_et.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 889 of file HTS221_driver.c.
HTS221_Error_et HTS221_Set_IrqEnable | ( | void * | handle, |
HTS221_State_et | status | ||
) |
Enable/disable the interrupt mode.
- Parameters:
-
*handle Device handle. status is the enable/disable for the interrupt mode. This parameter is a HTS221_State_et.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 981 of file HTS221_driver.c.
HTS221_Error_et HTS221_Set_IrqOutputType | ( | void * | handle, |
HTS221_OutputType_et | value | ||
) |
Set Push-pull/open drain configuration for the interrupt pin DRDY.
- Parameters:
-
*handle Device handle. value is the output type configuration. This parameter is a HTS221_OutputType_et.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 935 of file HTS221_driver.c.
HTS221_Error_et HTS221_Set_Odr | ( | void * | handle, |
HTS221_Odr_et | odr | ||
) |
Set the output data rate mode.
- Parameters:
-
*handle Device handle. odr is the output data rate mode. This parameter is a HTS221_Odr_et.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 749 of file HTS221_driver.c.
HTS221_Error_et HTS221_Set_PowerDownMode | ( | void * | handle, |
HTS221_BitStatus_et | status | ||
) |
Enter or exit from power down mode.
- Parameters:
-
*handle Device handle. status can be HTS221_SET: HTS221 in power down mode. status can be HTS221_REET: HTS221 in active mode. This parameter is a HTS221_BitStatus_et.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 703 of file HTS221_driver.c.
HTS221_Error_et HTS221_StartOneShotMeasurement | ( | void * | handle ) |
Set ONE_SHOT bit to start a new conversion (ODR mode has to be 00).
Once the measurement is done, ONE_SHOT bit is self-cleared.
- Parameters:
-
*handle Device handle.
- Return values:
-
Error code [HTS221_OK, HTS221_ERROR].
Definition at line 863 of file HTS221_driver.c.
Generated on Tue Jul 12 2022 20:43:31 by 1.7.2