temphum16 2.0.0.0
|
API for configuring and manipulating Temp&Hum 16 Click driver. More...
Topics | |
Temp&Hum 16 Registers List | |
List of registers of Temp&Hum 16 Click driver. | |
Temp&Hum 16 Registers Settings | |
Settings for registers of Temp&Hum 16 Click driver. | |
Temp&Hum 16 MikroBUS Map | |
MikroBUS pin mapping of Temp&Hum 16 Click driver. | |
Functions | |
void | temphum16_cfg_setup (temphum16_cfg_t *cfg) |
Temp&Hum 16 configuration object setup function. | |
void | temphum16_drv_interface_selection (temphum16_cfg_t *cfg, temphum16_drv_t drv_sel) |
Temp&Hum 16 driver interface setup function. | |
err_t | temphum16_init (temphum16_t *ctx, temphum16_cfg_t *cfg) |
Temp&Hum 16 initialization function. | |
err_t | temphum16_default_cfg (temphum16_t *ctx) |
Temp&Hum 16 default configuration function. | |
err_t | temphum16_generic_write (temphum16_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
Temp&Hum 16 data writing function. | |
err_t | temphum16_generic_read (temphum16_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
Temp&Hum 16 data reading function. | |
err_t | temphum16_get_device_id (temphum16_t *ctx, uint8_t *device_id) |
Temp&Hum 16 get device ID function. | |
err_t | temphum16_power_mode (temphum16_t *ctx, uint8_t pwr_mode) |
Temp&Hum 16 set power mode function. | |
err_t | temphum16_bdu_mode (temphum16_t *ctx, uint8_t bdu_mode) |
Temp&Hum 16 set block data update mode function. | |
err_t | temphum16_set_odr (temphum16_t *ctx, uint8_t odr) |
Temp&Hum 16 set output data rate function. | |
err_t | temphum16_heater (temphum16_t *ctx, uint8_t heater_mode) |
Temp&Hum 16 heater function. | |
err_t | temphum16_enable_data_ready_interrupt (temphum16_t *ctx) |
Temp&Hum 16 enable data ready interrupt function. | |
err_t | temphum16_get_status (temphum16_t *ctx, uint8_t *status) |
Temp&Hum 16 get status function. | |
uint8_t | temphum16_check_ready (temphum16_t *ctx) |
Temp&Hum 16 check ready function. | |
err_t | temphum16_get_humidity (temphum16_t *ctx, float *humidity) |
Temp&Hum 16 get humidity function. | |
err_t | temphum16_get_temperature (temphum16_t *ctx, float *temperature) |
Temp&Hum 16 get temperature function. | |
API for configuring and manipulating Temp&Hum 16 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
err_t temphum16_bdu_mode | ( | temphum16_t * | ctx, |
uint8_t | bdu_mode ) |
Temp&Hum 16 set block data update mode function.
This function set block data update mode of the Humidity sensor with integrated Temperature sensor WSEN-HIDS on the Temp&Hum 16 Click board™.
[in] | ctx | : Click context object. See temphum16_t object definition for detailed explanation. |
[in] | bdu_mode | :
|
0
- Success, -1
- Error.void temphum16_cfg_setup | ( | temphum16_cfg_t * | cfg | ) |
Temp&Hum 16 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See temphum16_cfg_t object definition for detailed explanation. |
uint8_t temphum16_check_ready | ( | temphum16_t * | ctx | ) |
Temp&Hum 16 check ready function.
This function check output data ready of the Humidity sensor with integrated Temperature sensor WSEN-HIDS on the Temp&Hum 16 Click board™.
[in] | ctx | : Click context object. See temphum16_t object definition for detailed explanation. |
0x00
- Data not ready. 0x01
- Data is ready.err_t temphum16_default_cfg | ( | temphum16_t * | ctx | ) |
Temp&Hum 16 default configuration function.
This function executes a default configuration of Temp&Hum 16 click board.
[in] | ctx | : Click context object. See temphum16_t object definition for detailed explanation. |
0
- Success, -1
- Error.void temphum16_drv_interface_selection | ( | temphum16_cfg_t * | cfg, |
temphum16_drv_t | drv_sel ) |
Temp&Hum 16 driver interface setup function.
This function sets a serial driver interface which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See temphum16_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See temphum16_drv_t object definition for detailed explanation. |
err_t temphum16_enable_data_ready_interrupt | ( | temphum16_t * | ctx | ) |
Temp&Hum 16 enable data ready interrupt function.
This function performs enable or disable heater of the Humidity sensor with integrated Temperature sensor WSEN-HIDS on the Temp&Hum 16 Click board™.
[in] | ctx | : Click context object. See temphum16_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t temphum16_generic_read | ( | temphum16_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
Temp&Hum 16 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See temphum16_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t temphum16_generic_write | ( | temphum16_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
Temp&Hum 16 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See temphum16_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error.err_t temphum16_get_device_id | ( | temphum16_t * | ctx, |
uint8_t * | device_id ) |
Temp&Hum 16 get device ID function.
This function reads a device ID value of the Humidity sensor with integrated Temperature sensor WSEN-HIDS on the Temp&Hum 16 Click board™.
[in] | ctx | : Click context object. See temphum16_t object definition for detailed explanation. |
[out] | device_id | : Output read data. |
0
- Success, -1
- Error.err_t temphum16_get_humidity | ( | temphum16_t * | ctx, |
float * | humidity ) |
Temp&Hum 16 get humidity function.
This function read the Humidity data of the Humidity sensor with integrated Temperature sensor WSEN-HIDS on the Temp&Hum 16 Click board™.
[in] | ctx | : Click context object. See temphum16_t object definition for detailed explanation. |
[out] | humidity | : Humidity [ % ].
|
0
- Success, -1
- Error.err_t temphum16_get_status | ( | temphum16_t * | ctx, |
uint8_t * | status ) |
Temp&Hum 16 get status function.
This function get status output data of the Humidity sensor with integrated Temperature sensor WSEN-HIDS on the Temp&Hum 16 Click board™.
[in] | ctx | : Click context object. See temphum16_t object definition for detailed explanation. |
[out] | status | : Status output data. |
0
- Success, -1
- Error.err_t temphum16_get_temperature | ( | temphum16_t * | ctx, |
float * | temperature ) |
Temp&Hum 16 get temperature function.
This function read the Temperature data of the Humidity sensor with integrated Temperature sensor WSEN-HIDS on the Temp&Hum 16 Click board™.
[in] | ctx | : Click context object. See temphum16_t object definition for detailed explanation. |
[out] | humidity | : Temperature [ degree Celsius ].
|
0
- Success, -1
- Error.err_t temphum16_heater | ( | temphum16_t * | ctx, |
uint8_t | heater_mode ) |
Temp&Hum 16 heater function.
This function performs enable or disable heater of the Humidity sensor with integrated Temperature sensor WSEN-HIDS on the Temp&Hum 16 Click board™.
[in] | ctx | : Click context object. See temphum16_t object definition for detailed explanation. |
[in] | pwr_mode | :
|
0
- Success, -1
- Error.err_t temphum16_init | ( | temphum16_t * | ctx, |
temphum16_cfg_t * | cfg ) |
Temp&Hum 16 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See temphum16_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See temphum16_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t temphum16_power_mode | ( | temphum16_t * | ctx, |
uint8_t | pwr_mode ) |
Temp&Hum 16 set power mode function.
This function performs power mode of the Humidity sensor with integrated Temperature sensor WSEN-HIDS on the Temp&Hum 16 Click board™.
[in] | ctx | : Click context object. See temphum16_t object definition for detailed explanation. |
[in] | pwr_mode | :
|
0
- Success, -1
- Error.err_t temphum16_set_odr | ( | temphum16_t * | ctx, |
uint8_t | odr ) |
Temp&Hum 16 set output data rate function.
This function set output data rate of the humidity and temperature of the Humidity sensor with integrated Temperature sensor WSEN-HIDS on the Temp&Hum 16 Click board™.
[in] | ctx | : Click context object. See temphum16_t object definition for detailed explanation. |
[out] |
odr :
0x00
( TEMPHUM16_ODR_ONE_SHOT_MODE ) - One shot mode. 0x01
( TEMPHUM16_ODR_1_Hz ) - Output data rate 1 Hz. 0x02
( TEMPHUM16_ODR_7_Hz ) - Output data rate 7 Hz. 0x03
( TEMPHUM16_ODR_12_5_Hz ) - Output data rate 12.5 Hz. 0
- Success, -1
- Error.See #err_t definition for detailed explanation.