temphum19
2.0.0.0
|
API for configuring and manipulating TempHum 19 Click driver. More...
Modules | |
TempHum 19 Registers List | |
List of registers of TempHum 19 Click driver. | |
TempHum 19 Registers Settings | |
Settings for registers of TempHum 19 Click driver. | |
TempHum 19 MikroBUS Map | |
MikroBUS pin mapping of TempHum 19 Click driver. | |
Functions | |
void | temphum19_cfg_setup (temphum19_cfg_t *cfg) |
TempHum 19 configuration object setup function. More... | |
err_t | temphum19_init (temphum19_t *ctx, temphum19_cfg_t *cfg) |
TempHum 19 initialization function. More... | |
err_t | temphum19_default_cfg (temphum19_t *ctx) |
TempHum 19 default configuration function. More... | |
err_t | temphum19_generic_write (temphum19_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
TempHum 19 I2C writing function. More... | |
err_t | temphum19_generic_read (temphum19_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
TempHum 19 I2C reading function. More... | |
void | temphum19_enable_chip (temphum19_t *ctx) |
TempHum 19 enable chip function. More... | |
void | temphum19_disable_chip (temphum19_t *ctx) |
TempHum 19 disable chip function. More... | |
void | temphum19_restart_chip (temphum19_t *ctx) |
TempHum 19 restart chip function. More... | |
err_t | temphum19_set_mode_reg (temphum19_t *ctx, uint8_t mode) |
TempHum 19 set mode function. More... | |
err_t | temphum19_read_data (temphum19_t *ctx, float *temperature, float *humidity) |
TempHum 19 read data function. More... | |
API for configuring and manipulating TempHum 19 Click driver.
void temphum19_cfg_setup | ( | temphum19_cfg_t * | cfg | ) |
TempHum 19 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See temphum19_cfg_t object definition for detailed explanation. |
err_t temphum19_default_cfg | ( | temphum19_t * | ctx | ) |
TempHum 19 default configuration function.
This function executes a default configuration of TempHum 19 click board.
[in] | ctx | : Click context object. See temphum19_t object definition for detailed explanation. |
0
- Success, -1
- Error.void temphum19_disable_chip | ( | temphum19_t * | ctx | ) |
TempHum 19 disable chip function.
This function disables the chip by setting the EN pin to low logic state.
[in] | ctx | : Click context object. See temphum19_t object definition for detailed explanation. |
void temphum19_enable_chip | ( | temphum19_t * | ctx | ) |
TempHum 19 enable chip function.
This function enables the chip by setting the EN pin to high logic state.
[in] | ctx | : Click context object. See temphum19_t object definition for detailed explanation. |
err_t temphum19_generic_read | ( | temphum19_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len | ||
) |
TempHum 19 I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See temphum19_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_buf | : Output read data. |
[in] | rx_len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t temphum19_generic_write | ( | temphum19_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len | ||
) |
TempHum 19 I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See temphum19_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_buf | : Data to be written. |
[in] | tx_len | : Number of bytes to be written. |
0
- Success, -1
- Error.err_t temphum19_init | ( | temphum19_t * | ctx, |
temphum19_cfg_t * | cfg | ||
) |
TempHum 19 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See temphum19_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See temphum19_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t temphum19_read_data | ( | temphum19_t * | ctx, |
float * | temperature, | ||
float * | humidity | ||
) |
TempHum 19 read data function.
This function reads temperature and humidity raw data and converts them to Celsius and Percents respectfully.
[in] | ctx | : Click context object. See temphum19_t object definition for detailed explanation. |
[out] | temperature | : Temperature in Celsius. |
[out] | humidity | : Humidity in Percents. |
0
- Success, -1
- Error.void temphum19_restart_chip | ( | temphum19_t * | ctx | ) |
TempHum 19 restart chip function.
This function restarts the chip by toggling the EN pin state.
[in] | ctx | : Click context object. See temphum19_t object definition for detailed explanation. |
err_t temphum19_set_mode_reg | ( | temphum19_t * | ctx, |
uint8_t | mode | ||
) |
TempHum 19 set mode function.
This function programs the mode register with a desired mode value, and stores it to the ctx->detection_mode variable.
[in] | ctx | : Click context object. See temphum19_t object definition for detailed explanation. |
[in] | mode | : Detection mode value. |
0
- Success, -1
- Error.