hydroprobe 2.0.0.0
|
Functions | |
void | hydroprobe_cfg_setup (hydroprobe_cfg_t *cfg) |
Config Object Initialization function. | |
HYDROPROBE_RETVAL | hydroprobe_init (hydroprobe_t *ctx, hydroprobe_cfg_t *cfg) |
Initialization function. | |
void | hydroprobe_generic_write (hydroprobe_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | hydroprobe_generic_read (hydroprobe_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint16_t | hydroprobe_read_raw (hydroprobe_t *ctx) |
Read raw data function. | |
uint16_t | hydroprobe_avg_val (hydroprobe_t *ctx) |
Get average value function. | |
uint16_t | hydroprobe_max_val (hydroprobe_t *ctx) |
Get maximum value function. | |
uint16_t | hydroprobe_min_val (hydroprobe_t *ctx) |
Get minimum value function. | |
uint8_t | hydroprobe_rel_env_hum (hydroprobe_t *ctx, uint16_t dry_val, uint16_t wet_val) |
Get Relative humidity of the environment function. | |
uint16_t hydroprobe_avg_val | ( | hydroprobe_t * | ctx | ) |
Get average value function.
ctx | Click object. |
Function is used to read average value from 100 raw reads.
void hydroprobe_cfg_setup | ( | hydroprobe_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void hydroprobe_generic_read | ( | hydroprobe_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void hydroprobe_generic_write | ( | hydroprobe_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
HYDROPROBE_RETVAL hydroprobe_init | ( | hydroprobe_t * | ctx, |
hydroprobe_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
uint16_t hydroprobe_max_val | ( | hydroprobe_t * | ctx | ) |
Get maximum value function.
ctx | Click object. |
Function is used to read maximum value from 100 raw reads.
uint16_t hydroprobe_min_val | ( | hydroprobe_t * | ctx | ) |
Get minimum value function.
ctx | Click object. |
Function is used to read minimum value from 100 raw reads.
uint16_t hydroprobe_read_raw | ( | hydroprobe_t * | ctx | ) |
Read raw data function.
ctx | Click object. |
Function is used to read raw data from MCP3221.
uint8_t hydroprobe_rel_env_hum | ( | hydroprobe_t * | ctx, |
uint16_t | dry_val, | ||
uint16_t | wet_val ) |
Get Relative humidity of the environment function.
ctx | Click object. |
dry_val | 16-bit value that represents adc value when probe is completely dry |
wet_val | 16-bit value that represents adc value when probe is completely submerged in liquid |
Function is used to get environment moisture content in percents.