humidity 2.0.0.0
|
API for configuring and manipulating Humidity Click driver. More...
Topics | |
Humidity Settings | |
Settings for Humidity Click driver. | |
Humidity MikroBUS Map | |
MikroBUS pin mapping of Humidity Click driver. | |
Functions | |
void | humidity_cfg_setup (humidity_cfg_t *cfg) |
Humidity configuration object setup function. | |
void | humidity_drv_interface_selection (humidity_cfg_t *cfg, humidity_drv_t drv_sel) |
Humidity driver interface setup function. | |
err_t | humidity_init (humidity_t *ctx, humidity_cfg_t *cfg) |
Humidity initialization function. | |
err_t | humidity_read_raw_adc (humidity_t *ctx, uint16_t *raw_adc) |
Humidity read raw ADC value function. | |
err_t | humidity_read_voltage (humidity_t *ctx, float *voltage) |
Humidity read voltage level function. | |
err_t | humidity_set_vref (humidity_t *ctx, float vref) |
Humidity set vref function. | |
float | humidity_voltage_to_rh (humidity_t *ctx, float voltage) |
Humidity voltage to relative humidity function. | |
API for configuring and manipulating Humidity Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void humidity_cfg_setup | ( | humidity_cfg_t * | cfg | ) |
Humidity configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See humidity_cfg_t object definition for detailed explanation. |
void humidity_drv_interface_selection | ( | humidity_cfg_t * | cfg, |
humidity_drv_t | drv_sel ) |
Humidity driver interface setup function.
This function sets a serial driver interface which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See humidity_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See humidity_drv_t object definition for detailed explanation. |
err_t humidity_init | ( | humidity_t * | ctx, |
humidity_cfg_t * | cfg ) |
Humidity initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See humidity_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See humidity_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t humidity_read_raw_adc | ( | humidity_t * | ctx, |
uint16_t * | raw_adc ) |
Humidity read raw ADC value function.
This function reads raw ADC value.
[in] | ctx | : Click context object. See humidity_t object definition for detailed explanation. |
[out] | raw_adc | : Output ADC result. |
0
- Success, -1
- Error.err_t humidity_read_voltage | ( | humidity_t * | ctx, |
float * | voltage ) |
Humidity read voltage level function.
This function reads raw ADC value and converts it to proportional voltage level.
[in] | ctx | : Click context object. See humidity_t object definition for detailed explanation. |
[out] | voltage | : Output voltage level [V]. |
0
- Success, -1
- Error.err_t humidity_set_vref | ( | humidity_t * | ctx, |
float | vref ) |
Humidity set vref function.
This function sets the voltage reference for Humidity click driver.
[in] | ctx | : Click context object. See humidity_t object definition for detailed explanation. |
[in] | vref | : Reference voltage (volts). |
0
- Success, -1
- Error.float humidity_voltage_to_rh | ( | humidity_t * | ctx, |
float | voltage ) |
Humidity voltage to relative humidity function.
This function calculates relative humidity percents based on the voltage input.
[in] | ctx | : Click context object. See humidity_t object definition for detailed explanation. |
[in] | voltage | : Voltage from OUT (volts). |