voltmeter 2.0.0.0
|
Functions | |
void | voltmeter_cfg_setup (voltmeter_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | voltmeter_init (voltmeter_t *ctx, voltmeter_cfg_t *cfg) |
Initialization function. | |
int16_t | voltmeter_read_raw_data (voltmeter_t *ctx) |
Read raw ADC value function. | |
float | voltmeter_calculate_voltage (voltmeter_t *ctx, int16_t raw_adc, uint8_t iso_gnd) |
Voltage calculation function. | |
float voltmeter_calculate_voltage | ( | voltmeter_t * | ctx, |
int16_t | raw_adc, | ||
uint8_t | iso_gnd ) |
Voltage calculation function.
ctx | Click object. |
raw_adc | Raw ADC value. |
iso_gnd | 1 - Isolated GND (+-17.05V), 0 - Shared GND (+-8.525V). |
This function converts the raw ADC value to proportional voltage level.
void voltmeter_cfg_setup | ( | voltmeter_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
err_t voltmeter_init | ( | voltmeter_t * | ctx, |
voltmeter_cfg_t * | cfg ) |
Initialization function.
voltmeter | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
int16_t voltmeter_read_raw_data | ( | voltmeter_t * | ctx | ) |
Read raw ADC value function.
ctx | Click object. |
This function reads raw ADC value.