rmeter
2.0.0.0
|
Functions | |
void | rmeter_cfg_setup (rmeter_cfg_t *cfg) |
Config Object Initialization function. More... | |
RMETER_RETVAL | rmeter_init (rmeter_t *ctx, rmeter_cfg_t *cfg) |
Initialization function. More... | |
void | rmeter_range_s1 (rmeter_t *ctx, uint8_t state) |
S1 defined range function. More... | |
void | rmeter_range_s2 (rmeter_t *ctx, uint8_t state) |
S2 defined range function. More... | |
void | rmeter_range_s3 (rmeter_t *ctx, uint8_t state) |
S3 defined range function. More... | |
uint16_t | rmeter_read_data (rmeter_t *ctx) |
Data read function. More... | |
uint16_t | rmeter_get_volage (rmeter_t *ctx) |
Get voltage function. More... | |
float | rmeter_avg_volt (rmeter_t *ctx) |
Get average voltage function. More... | |
float | rmeter_calc (rmeter_t *ctx, uint32_t resFilt) |
Calculations function. More... | |
float | rmeter_get_ohms (rmeter_t *ctx) |
Get resistance in OHMs function. More... | |
float rmeter_avg_volt | ( | rmeter_t * | ctx | ) |
Get average voltage function.
ctx | Click object. |
Function is used to calculate average voltage.
float rmeter_calc | ( | rmeter_t * | ctx, |
uint32_t | resFilt | ||
) |
Calculations function.
ctx | Click object. |
resFilt | compensation needed to calculate resistance. |
Function is used to calculate raw resistance value based on constant current of 100mA and voltage that changes depending on resistance.
void rmeter_cfg_setup | ( | rmeter_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
float rmeter_get_ohms | ( | rmeter_t * | ctx | ) |
Get resistance in OHMs function.
ctx | Click object. |
Function is used to measure resistance of a resistor conected to the click board.
uint16_t rmeter_get_volage | ( | rmeter_t * | ctx | ) |
Get voltage function.
ctx | Click object. |
Function is used to read voltage.
RMETER_RETVAL rmeter_init | ( | rmeter_t * | ctx, |
rmeter_cfg_t * | cfg | ||
) |
Initialization function.
rmeter | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
void rmeter_range_s1 | ( | rmeter_t * | ctx, |
uint8_t | state | ||
) |
S1 defined range function.
ctx | Click object. |
state | Select or deselect value. |
Function is used to set or clear s1 pin in order to select or deselect apropriate range of readings.
void rmeter_range_s2 | ( | rmeter_t * | ctx, |
uint8_t | state | ||
) |
S2 defined range function.
ctx | Click object. |
state | Select or deselect value. |
Function is used to set or clear s2 pin in order to select or deselect apropriate range of readings.
void rmeter_range_s3 | ( | rmeter_t * | ctx, |
uint8_t | state | ||
) |
S3 defined range function.
ctx | Click object. |
state | Select or deselect value. |
Function is used to set or clear s3 pin in order to select or deselect apropriate range of readings.
uint16_t rmeter_read_data | ( | rmeter_t * | ctx | ) |
Data read function.
ctx | Click object. |
Function is used to read raw data from output register.