temphum23
2.1.0.0
|
API for configuring and manipulating TempHum 23 Click driver. More...
Modules | |
TempHum 23 Registers List | |
List of registers of TempHum 23 Click driver. | |
TempHum 23 Registers Settings | |
Settings for registers of TempHum 23 Click driver. | |
TempHum 23 MikroBUS Map | |
MikroBUS pin mapping of TempHum 23 Click driver. | |
Functions | |
void | temphum23_cfg_setup (temphum23_cfg_t *cfg) |
TempHum 23 configuration object setup function. More... | |
err_t | temphum23_init (temphum23_t *ctx, temphum23_cfg_t *cfg) |
TempHum 23 initialization function. More... | |
err_t | temphum23_send_cmd (temphum23_t *ctx, uint8_t cmd) |
TempHum 23 send cmd function. More... | |
err_t | temphum23_read_response (temphum23_t *ctx, uint8_t *data_out) |
TempHum 23 read response function. More... | |
err_t | temphum23_soft_reset (temphum23_t *ctx) |
TempHum 23 soft reset function. More... | |
err_t | temphum23_read_serial_num (temphum23_t *ctx, uint32_t *serial_num) |
TempHum 23 read serial num function. More... | |
err_t | temphum23_read_measurement_high_precision (temphum23_t *ctx, float *temp, float *hum) |
TempHum 23 read measurement high precision function. More... | |
API for configuring and manipulating TempHum 23 Click driver.
void temphum23_cfg_setup | ( | temphum23_cfg_t * | cfg | ) |
TempHum 23 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See temphum23_cfg_t object definition for detailed explanation. |
err_t temphum23_init | ( | temphum23_t * | ctx, |
temphum23_cfg_t * | cfg | ||
) |
TempHum 23 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See temphum23_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See temphum23_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t temphum23_read_measurement_high_precision | ( | temphum23_t * | ctx, |
float * | temp, | ||
float * | hum | ||
) |
TempHum 23 read measurement high precision function.
This function reads the temperature and humidity measurements with high precision.
[in] | ctx | : Click context object. See temphum23_t object definition for detailed explanation. |
[out] | temp | : Temperature in degrees Celsius. |
[out] | hum | : Relative humidity in percents. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t temphum23_read_response | ( | temphum23_t * | ctx, |
uint8_t * | data_out | ||
) |
TempHum 23 read response function.
This function reads 6 response bytes to the previously sent command by using I2C serial interface.
[in] | ctx | : Click context object. See temphum23_t object definition for detailed explanation. |
[out] | data_out | : 6 response bytes. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t temphum23_read_serial_num | ( | temphum23_t * | ctx, |
uint32_t * | serial_num | ||
) |
TempHum 23 read serial num function.
This function reads the 4-bytes unique serial number by using I2C serial interface.
[in] | ctx | : Click context object. See temphum23_t object definition for detailed explanation. |
[out] | serial_num | : 4-bytes unique serial number. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t temphum23_send_cmd | ( | temphum23_t * | ctx, |
uint8_t | cmd | ||
) |
TempHum 23 send cmd function.
This function sends the selected command byte by using I2C serial interface.
[in] | ctx | : Click context object. See temphum23_t object definition for detailed explanation. |
[in] | cmd | : Command byte to be written. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t temphum23_soft_reset | ( | temphum23_t * | ctx | ) |
TempHum 23 soft reset function.
This function performs the software reset by sending the soft reset command.
[in] | ctx | : Click context object. See temphum23_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.