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

Embed: (wiki syntax)

« Back to documentation index

HTS221_driver.c File Reference

HTS221_driver.c File Reference

HTS221 driver file. More...

Go to the source code of this file.

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.

Detailed Description

HTS221 driver file.

Author:
HESA Application Team
Version:
V1.1
Date:
10-August-2016
Attention:

© COPYRIGHT(c) 2016 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file HTS221_driver.c.