temphum18 2.0.0.0
|
API for configuring and manipulating Temp&Hum 18 Click driver. More...
Topics | |
Temp&Hum 18 Registers List | |
List of registers of Temp&Hum 18 Click driver. | |
Temp&Hum 18 Command List | |
List of commands of Temp&Hum 18 Click driver. | |
Temp&Hum 18 status bits | |
List of status bits of Temp&Hum 18 Click driver. | |
Temp&Hum 18 Registers Settings | |
Settings for registers of Temp&Hum 18 Click driver. | |
Temp&Hum 18 MikroBUS Map | |
MikroBUS pin mapping of Temp&Hum 18 Click driver. | |
Functions | |
void | temphum18_cfg_setup (temphum18_cfg_t *cfg) |
Temp&Hum 18 configuration object setup function. | |
err_t | temphum18_init (temphum18_t *ctx, temphum18_cfg_t *cfg) |
Temp&Hum 18 initialization function. | |
err_t | temphum18_default_cfg (temphum18_t *ctx) |
Temp&Hum 18 default configuration function. | |
err_t | temphum18_generic_write (temphum18_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
Temp&Hum 18 I2C writing function. | |
err_t | temphum18_generic_read (temphum18_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
Temp&Hum 18 I2C reading function. | |
err_t | temphum18_wake_up (temphum18_t *ctx) |
Temp&Hum 18 wake up function. | |
err_t | temphum18_get_raw_data (temphum18_t *ctx, uint8_t resolution, int16_t *temp, uint16_t *hum, uint8_t *status) |
Temp&Hum 18 get raw data function. | |
err_t | temphum18_get_temp_hum (temphum18_t *ctx, uint8_t resolution, float *temperature, float *humidity) |
Temp&Hum 18 get temperature and humidity function. | |
err_t | temphum18_enter_programming_mode (temphum18_t *ctx) |
Temp&Hum 18 enter programming mode function. | |
err_t | temphum18_enter_measurements_mode (temphum18_t *ctx) |
Temp&Hum 18 enter measurements mode function. | |
err_t | temphum18_set_relative_humidity_resolution (temphum18_t *ctx, uint8_t resolution) |
Temp&Hum 18 set relative humidity resolution function. | |
err_t | temphum18_set_temperature_resolution (temphum18_t *ctx, uint8_t resolution) |
Temp&Hum 18 set relative temperature resolution function. | |
API for configuring and manipulating Temp&Hum 18 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void temphum18_cfg_setup | ( | temphum18_cfg_t * | cfg | ) |
Temp&Hum 18 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See temphum18_cfg_t object definition for detailed explanation. |
err_t temphum18_default_cfg | ( | temphum18_t * | ctx | ) |
Temp&Hum 18 default configuration function.
This function executes a default configuration of Temp&Hum 18 click board.
[in] | ctx | : Click context object. See temphum18_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t temphum18_enter_measurements_mode | ( | temphum18_t * | ctx | ) |
Temp&Hum 18 enter measurements mode function.
This function enter measurements mode, exit programming mode of the HS3003 High Performance Relative Humidity and Temperature Sensor on the Temp&Hum 18 click board™.
[in] | ctx | : Click context object. See temphum18_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t temphum18_enter_programming_mode | ( | temphum18_t * | ctx | ) |
Temp&Hum 18 enter programming mode function.
This function enter programming mode, accessing the non-volatile memory of the HS3003 High Performance Relative Humidity and Temperature Sensor on the Temp&Hum 18 click board™.
[in] | ctx | : Click context object. See temphum18_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t temphum18_generic_read | ( | temphum18_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
Temp&Hum 18 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 temphum18_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 temphum18_generic_write | ( | temphum18_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
Temp&Hum 18 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 temphum18_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 temphum18_get_raw_data | ( | temphum18_t * | ctx, |
uint8_t | resolution, | ||
int16_t * | temp, | ||
uint16_t * | hum, | ||
uint8_t * | status ) |
Temp&Hum 18 get raw data function.
This function get raw data of the HS3003 High Performance Relative Humidity and Temperature Sensor on the Temp&Hum 18 click board™.
[in] | ctx | : Click context object. |
[in] | resolution | :
|
[out] | temp | : Output read Temperature ( RAW ) data. |
[out] | hum | : Output read Humidity ( RAW ) data. |
[out] | status | :
|
0
- Success, -1
- Error.14-bit
resolution it is 33.90 milliseconds, 12-bit
resolution it is 9.10 milliseconds, 10-bit
resolution it is 2.72 milliseconds, 8-bit
resolution it is 1.20 milliseconds. err_t temphum18_get_temp_hum | ( | temphum18_t * | ctx, |
uint8_t | resolution, | ||
float * | temperature, | ||
float * | humidity ) |
Temp&Hum 18 get temperature and humidity function.
This function get temperature ( degree Celsius ) and humidity ( % ) of the HS3003 High Performance Relative Humidity and Temperature Sensor on the Temp&Hum 18 click board™.
[in] | ctx | : Click context object. |
[in] | resolution | :
|
[out] | temperature | : Temperature data ( degree Celsius ). |
[out] | humidity | : Humidity data ( % ). |
0
( TEMPHUM18_STATUS_VALID_DATA ) - Data that has not been fetched since the last measurement cycle, 1
( TEMPHUM18_STATUS_STALE_DATA ) - Data that has already been fetched since the last measurement cycle. -1
- Communication Error.14-bit
resolution it is 33.90 milliseconds, 12-bit
resolution it is 9.10 milliseconds, 10-bit
resolution it is 2.72 milliseconds, 8-bit
resolution it is 1.20 milliseconds. err_t temphum18_init | ( | temphum18_t * | ctx, |
temphum18_cfg_t * | cfg ) |
Temp&Hum 18 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See temphum18_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See temphum18_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t temphum18_set_relative_humidity_resolution | ( | temphum18_t * | ctx, |
uint8_t | resolution ) |
Temp&Hum 18 set relative humidity resolution function.
This function sets desired relative humidity resolution of the HS3003 High Performance Relative Humidity and Temperature Sensor on the Temp&Hum 18 click board™.
[in] | ctx | : Click context object. |
[in] | resolution | :
|
0
- Success, -1
- Error.err_t temphum18_set_temperature_resolution | ( | temphum18_t * | ctx, |
uint8_t | resolution ) |
Temp&Hum 18 set relative temperature resolution function.
This function sets desired relative temperature resolution of the HS3003 High Performance Relative Humidity and Temperature Sensor on the Temp&Hum 18 click board™.
[in] | ctx | : Click context object. |
[in] | resolution | :
|
0
- Success, -1
- Error.err_t temphum18_wake_up | ( | temphum18_t * | ctx | ) |
Temp&Hum 18 wake up function.
This function wake up the HS3003 High Performance Relative Humidity and Temperature Sensor from its Sleep Mode.
[in] | ctx | : Click context object. See temphum18_t object definition for detailed explanation. |
0
- Success, -1
- Error.