temphum15 2.0.0.0
|
API for configuring and manipulating Temp&Hum 15 Click driver. More...
Topics | |
Temp&Hum 15 Registers List | |
List of commands of Temp&Hum 15 Click driver. | |
Temp&Hum 15 Registers Settings | |
Settings for registers of Temp&Hum 15 Click driver. | |
Temp&Hum 15 MikroBUS Map | |
MikroBUS pin mapping of Temp&Hum 15 Click driver. | |
Precision_mode | |
Status | |
Functions | |
void | temphum15_cfg_setup (temphum15_cfg_t *cfg) |
Temp&Hum 15 configuration object setup function. | |
err_t | temphum15_init (temphum15_t *ctx, temphum15_cfg_t *cfg) |
Temp&Hum 15 initialization function. | |
err_t | temphum15_default_cfg (temphum15_t *ctx) |
Temp&Hum 15 default configuration function. | |
err_t | temphum15_generic_write (temphum15_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Temp&Hum 15 I2C writing function. | |
err_t | temphum15_generic_read (temphum15_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Temp&Hum 15 I2C reading function. | |
err_t | temphum15_get_temp_and_hum (temphum15_t *ctx, uint8_t precision_mode, float *temp_val, float *hum_val) |
Temp&Hum 15 get temperature and humidity function. | |
err_t | temphum15_soft_reset (temphum15_t *ctx) |
Temp&Hum 15 soft reset function. | |
err_t | temphum15_read_serial (temphum15_t *ctx, uint32_t *serial_number) |
Temp&Hum 15 read serial number function. | |
API for configuring and manipulating Temp&Hum 15 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void temphum15_cfg_setup | ( | temphum15_cfg_t * | cfg | ) |
Temp&Hum 15 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See temphum15_cfg_t object definition for detailed explanation. |
err_t temphum15_default_cfg | ( | temphum15_t * | ctx | ) |
Temp&Hum 15 default configuration function.
This function executes a default configuration of Temp&Hum 15 click board.
[in] | ctx | : Click context object. See temphum15_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t temphum15_generic_read | ( | temphum15_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
Temp&Hum 15 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 temphum15_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 temphum15_generic_write | ( | temphum15_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
Temp&Hum 15 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 temphum15_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 temphum15_get_temp_and_hum | ( | temphum15_t * | ctx, |
uint8_t | precision_mode, | ||
float * | temp_val, | ||
float * | hum_val ) |
Temp&Hum 15 get temperature and humidity function.
This function reads temperature and humidity with the power consumption based on the precision mode selected.
[in] | ctx | : Click context object. See temphum15_t object definition for detailed explanation. |
[in] | precision_mode | : Precision mode setting. |
[out] | temp_val | : Output temperature value. |
[out] | hum_val | : Output humidity value. |
0
- Success, -1
- Error.err_t temphum15_init | ( | temphum15_t * | ctx, |
temphum15_cfg_t * | cfg ) |
Temp&Hum 15 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See temphum15_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See temphum15_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t temphum15_read_serial | ( | temphum15_t * | ctx, |
uint32_t * | serial_number ) |
Temp&Hum 15 read serial number function.
This function reads unique serial number of the sensor.
[in] | ctx | : Click context object. See temphum15_t object definition for detailed explanation. |
[out] | serial_number | : Output serial number. |
0
- Success, -1
- Error.err_t temphum15_soft_reset | ( | temphum15_t * | ctx | ) |
Temp&Hum 15 soft reset function.
This function sends soft reset command to the sensor.
[in] | ctx | : Click context object. See temphum15_t object definition for detailed explanation. |
0
- Success, -1
- Error.