voltmeter
2.0.0.0
|
Functions | |
void | voltmeter_cfg_setup (voltmeter_cfg_t *cfg) |
Config Object Initialization function. More... | |
VOLTMETER_RETVAL | voltmeter_init (voltmeter_t *ctx, voltmeter_cfg_t *cfg) |
Initialization function. More... | |
void | voltmeter_write_data (voltmeter_t *ctx, uint16_t write_data) |
Generic write the byte of the data function. More... | |
uint8_t | voltmeter_read_byte (voltmeter_t *ctx) |
Generic read the byte of the data function. More... | |
uint16_t | voltmeter_read_data (voltmeter_t *ctx) |
Generic reading 16-bit data function. More... | |
void | voltmeter_calibration (voltmeter_t *ctx) |
Calibration reading function. More... | |
float | voltmeter_get_voltage (voltmeter_t *ctx, float coefficient) |
Voltage reading function. More... | |
void voltmeter_calibration | ( | voltmeter_t * | ctx | ) |
Calibration reading function.
ctx | Click object. |
Function reading calibration parameter from the register of MCP3201 chip on Voltmeter click board.
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.
float voltmeter_get_voltage | ( | voltmeter_t * | ctx, |
float | coefficient | ||
) |
Voltage reading function.
ctx | Click object. |
coefficient | Value depends on the selected development system. |
Generic SPI transfer, for sending and receiving packages
VOLTMETER_RETVAL 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.
uint8_t voltmeter_read_byte | ( | voltmeter_t * | ctx | ) |
Generic read the byte of the data function.
ctx | Click object. |
Function read the byte of the data from the register of MCP3201 chip on Voltmeter click board.
uint16_t voltmeter_read_data | ( | voltmeter_t * | ctx | ) |
Generic reading 16-bit data function.
ctx | Click object. |
block | Transfer block structure. |
Function reading 16-bit data from the register of MCP3201 chip on Voltmeter click board.
void voltmeter_write_data | ( | voltmeter_t * | ctx, |
uint16_t | write_data | ||
) |
Generic write the byte of the data function.
ctx | Click object. |
write_data | Byte of data to write. |
Function write the 8-bit of data to the register of MCP3201 chip on Voltmeter click board.