Nordic Thingy:52
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Humidity sensor

Humidity sensor API. More...

Modules

 HTS221 humidity sensor
 HTS221 humidity sensor API.
 

Data Structures

struct  drv_humidity_init_t
 Initialization struct for humidity driver. More...
 

Typedefs

typedef void(* drv_humidity_evt_handler_t )(drv_humidity_evt_t evt)
 Humidity driver event handler callback type.
 

Enumerations

enum  drv_humidity_evt_t { DRV_HUMIDITY_EVT_DATA, DRV_HUMIDITY_EVT_ERROR }
 Humidity driver event types. More...
 

Functions

uint32_t drv_humidity_disable (void)
 Function for disabling the humidity sensor. More...
 
uint32_t drv_humidity_enable (void)
 Function for enabling the humidity sensor. More...
 
int16_t drv_humidity_get (void)
 Function for getting the humidity data. More...
 
uint32_t drv_humidity_init (drv_humidity_init_t *p_params)
 Function for initializing the humidity driver. More...
 
uint32_t drv_humidity_reset (void)
 Function for resetting the chip to all default register values. More...
 
uint32_t drv_humidity_sample (void)
 Function to start sampling. More...
 
float drv_humidity_temp_get (void)
 Function for getting the temperature data. More...
 

Detailed Description

Humidity sensor API.

Enumeration Type Documentation

Humidity driver event types.

Enumerator
DRV_HUMIDITY_EVT_DATA 

Converted value ready to be read.

DRV_HUMIDITY_EVT_ERROR 

HW error on the communication bus.

Function Documentation

uint32_t drv_humidity_disable ( void  )

Function for disabling the humidity sensor.

Return values
NRF_SUCCESSIf initialization was successful.
uint32_t drv_humidity_enable ( void  )

Function for enabling the humidity sensor.

Return values
NRF_SUCCESSIf initialization was successful.
int16_t drv_humidity_get ( void  )

Function for getting the humidity data.

Return values
Humiditydata.
uint32_t drv_humidity_init ( drv_humidity_init_t p_params)

Function for initializing the humidity driver.

Parameters
[in]p_paramsPointer to init parameters.
Return values
NRF_SUCCESSIf initialization was successful.
NRF_ERROR_INVALID_STATEIf the driver is in invalid state.
uint32_t drv_humidity_reset ( void  )

Function for resetting the chip to all default register values.

Return values
NRF_SUCCESSIf operation was successful
NRF_ERROR_BUSYIf TWI bus was busy
uint32_t drv_humidity_sample ( void  )

Function to start sampling.

Return values
NRF_SUCCESSIf start sampling was successful.
float drv_humidity_temp_get ( void  )

Function for getting the temperature data.

Return values
Temperaturedata.