temphum22
2.1.0.0
|
API for configuring and manipulating TempHum 22 Click driver. More...
Modules | |
TempHum 22 Registers List | |
List of registers of TempHum 22 Click driver. | |
TempHum 22 Registers Settings | |
Settings for registers of TempHum 22 Click driver. | |
TempHum 22 MikroBUS Map | |
MikroBUS pin mapping of TempHum 22 Click driver. | |
Functions | |
void | temphum22_cfg_setup (temphum22_cfg_t *cfg) |
TempHum 22 configuration object setup function. More... | |
err_t | temphum22_init (temphum22_t *ctx, temphum22_cfg_t *cfg) |
TempHum 22 initialization function. More... | |
err_t | temphum22_send_cmd (temphum22_t *ctx, uint8_t cmd) |
TempHum 22 send cmd function. More... | |
err_t | temphum22_read_response (temphum22_t *ctx, uint8_t *data_out) |
TempHum 22 read response function. More... | |
err_t | temphum22_soft_reset (temphum22_t *ctx) |
TempHum 22 soft reset function. More... | |
err_t | temphum22_read_serial_num (temphum22_t *ctx, uint32_t *serial_num) |
TempHum 22 read serial num function. More... | |
err_t | temphum22_read_measurement_high_precision (temphum22_t *ctx, float *temp, float *hum) |
TempHum 22 read measurement high precision function. More... | |
API for configuring and manipulating TempHum 22 Click driver.
void temphum22_cfg_setup | ( | temphum22_cfg_t * | cfg | ) |
TempHum 22 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See temphum22_cfg_t object definition for detailed explanation. |
err_t temphum22_init | ( | temphum22_t * | ctx, |
temphum22_cfg_t * | cfg | ||
) |
TempHum 22 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See temphum22_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See temphum22_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t temphum22_read_measurement_high_precision | ( | temphum22_t * | ctx, |
float * | temp, | ||
float * | hum | ||
) |
TempHum 22 read measurement high precision function.
This function reads the temperature and humidity measurements with high precision.
[in] | ctx | : Click context object. See temphum22_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 temphum22_read_response | ( | temphum22_t * | ctx, |
uint8_t * | data_out | ||
) |
TempHum 22 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 temphum22_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 temphum22_read_serial_num | ( | temphum22_t * | ctx, |
uint32_t * | serial_num | ||
) |
TempHum 22 read serial num function.
This function reads the 4-bytes unique serial number by using I2C serial interface.
[in] | ctx | : Click context object. See temphum22_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 temphum22_send_cmd | ( | temphum22_t * | ctx, |
uint8_t | cmd | ||
) |
TempHum 22 send cmd function.
This function sends the selected command byte by using I2C serial interface.
[in] | ctx | : Click context object. See temphum22_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 temphum22_soft_reset | ( | temphum22_t * | ctx | ) |
TempHum 22 soft reset function.
This function performs the software reset by sending the soft reset command.
[in] | ctx | : Click context object. See temphum22_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.