pollution 2.0.0.0
|
Functions | |
void | pollution_cfg_setup (pollution_cfg_t *cfg) |
Config Object Initialization function. | |
POLLUTION_RETVAL | pollution_init (pollution_t *ctx, pollution_cfg_t *cfg) |
Initialization function. | |
void | pollution_default_cfg (pollution_t *ctx) |
Click Default Configuration function. | |
pollution_data_t | pollution_generic_read (pollution_t *ctx) |
Generic read function. | |
void | pollution_enable (pollution_t *ctx) |
Enable sensor function. | |
void | pollution_disable (pollution_t *ctx) |
Disable sensor function. | |
void | pollution_reset (pollution_t *ctx) |
Reset sensor function. | |
float | pollution_measure_load_voltage (pollution_t *ctx) |
Measure load voltage form ADC function. | |
float | pollution_get_resistance (pollution_t *ctx) |
Get the resistance of the sensor function. | |
float | pollution_get_corrected_resistance (pollution_t *ctx) |
Get the corrected resistance of the sensor function. | |
void pollution_cfg_setup | ( | pollution_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void pollution_default_cfg | ( | pollution_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Pollution click.
Enable the WSP2110 sensor on Pollution Click Board.
Reset the WSP2110 sensor on Pollution Click Board.
void pollution_disable | ( | pollution_t * | ctx | ) |
Disable sensor function.
ctx | Click object. |
@description This function disable the WSP2110 sensor by set ENA pin on Pollution Click Board.
void pollution_enable | ( | pollution_t * | ctx | ) |
Enable sensor function.
ctx | Click object. |
@description This function enable the WSP2110 sensor by set ENA pin on Pollution Click Board.
pollution_data_t pollution_generic_read | ( | pollution_t * | ctx | ) |
Generic read function.
ctx | Click object. |
@description This function read ADC data.
float pollution_get_corrected_resistance | ( | pollution_t * | ctx | ) |
Get the corrected resistance of the sensor function.
ctx | Click object. |
@description This function get the corrected resistance of the sensor, ie. measurement adc value of the WSP2110 sensor on Pollution Click Board.
float pollution_get_resistance | ( | pollution_t * | ctx | ) |
Get the resistance of the sensor function.
ctx | Click object. |
@description This function get the resistance of the sensor, ie. measurement ADC value of the WSP2110 sensor on Pollution Click Board.
POLLUTION_RETVAL pollution_init | ( | pollution_t * | ctx, |
pollution_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.
float pollution_measure_load_voltage | ( | pollution_t * | ctx | ) |
Measure load voltage form ADC function.
ctx | Click object. |
@description This function get load voltage from read ADC value of the WSP2110 sensor on Pollution Click Board.
void pollution_reset | ( | pollution_t * | ctx | ) |
Reset sensor function.
ctx | Click object. |
@description Function reset the WSP2110 sensor by set ENA pin, wait and clear ENA pin on Pollution Click Board.
Inside Reset function exists two delays of 100ms.