temphum21
2.0.0.0
|
API for configuring and manipulating TempHum 21 Click driver. More...
Modules | |
TempHum 21 Registers Settings | |
Settings for registers of TempHum 21 Click driver. | |
TempHum 21 MikroBUS Map | |
MikroBUS pin mapping of TempHum 21 Click driver. | |
Functions | |
void | temphum21_cfg_setup (temphum21_cfg_t *cfg) |
TempHum 21 configuration object setup function. More... | |
err_t | temphum21_init (temphum21_t *ctx, temphum21_cfg_t *cfg) |
TempHum 21 initialization function. More... | |
err_t | temphum21_request_measurement (temphum21_t *ctx) |
TempHum 21 request measurement function. More... | |
err_t | temphum21_read_measurement (temphum21_t *ctx, float *temperature, float *humidity) |
TempHum 21 read measurement function. More... | |
uint8_t | temphum21_get_all_pin (temphum21_t *ctx) |
TempHum 21 get all pin function. More... | |
uint8_t | temphum21_get_alh_pin (temphum21_t *ctx) |
TempHum 21 get alh pin function. More... | |
API for configuring and manipulating TempHum 21 Click driver.
void temphum21_cfg_setup | ( | temphum21_cfg_t * | cfg | ) |
TempHum 21 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See temphum21_cfg_t object definition for detailed explanation. |
uint8_t temphum21_get_alh_pin | ( | temphum21_t * | ctx | ) |
TempHum 21 get alh pin function.
This function returns the alarm high (ALH) pin logic state.
[in] | ctx | : Click context object. See temphum21_t object definition for detailed explanation. |
uint8_t temphum21_get_all_pin | ( | temphum21_t * | ctx | ) |
TempHum 21 get all pin function.
This function returns the alarm low (ALL) pin logic state.
[in] | ctx | : Click context object. See temphum21_t object definition for detailed explanation. |
err_t temphum21_init | ( | temphum21_t * | ctx, |
temphum21_cfg_t * | cfg | ||
) |
TempHum 21 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See temphum21_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See temphum21_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation. err_t temphum21_read_measurement | ( | temphum21_t * | ctx, |
float * | temperature, | ||
float * | humidity | ||
) |
TempHum 21 read measurement function.
This function requests measurement and waits for a measurement to complete and after that reads temperature in Celsius and relative humidity in percents.
[in] | ctx | : Click context object. See temphum21_t object definition for detailed explanation. |
2
- Device in Command Mode - Command Mode is used for programming the sensor. 1
- Stale Data: Data that has already been fetched since the last measurement cycle, or data fetched before the first measurement has been completed. 0
- Normal Operation, Valid Data that has not been fetched since the last measurement cycle. -1
- Error. See #err_t definition for detailed explanation. err_t temphum21_request_measurement | ( | temphum21_t * | ctx | ) |
TempHum 21 request measurement function.
This function sends a request mesurement command.
[in] | ctx | : Click context object. See temphum21_t object definition for detailed explanation. |
0
- Success, -1
- Error. See #err_t definition for detailed explanation.