vctmonitor 2.0.0.0
|
API for configuring and manipulating VCT Monitor Click driver. More...
Topics | |
VCT Monitor Registers List | |
List of registers of VCT Monitor Click driver. | |
VCT Monitor Registers Settings | |
Settings for registers of VCT Monitor Click driver. | |
VCT Monitor MikroBUS Map | |
MikroBUS pin mapping of VCT Monitor Click driver. | |
Functions | |
void | vctmonitor_cfg_setup (vctmonitor_cfg_t *cfg) |
VCT Monitor configuration object setup function. | |
err_t | vctmonitor_init (vctmonitor_t *ctx, vctmonitor_cfg_t *cfg) |
VCT Monitor initialization function. | |
err_t | vctmonitor_default_cfg (vctmonitor_t *ctx) |
VCT Monitor default configuration function. | |
err_t | vctmonitor_generic_write (vctmonitor_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
VCT Monitor I2C writing function. | |
err_t | vctmonitor_generic_read (vctmonitor_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
VCT Monitor I2C reading function. | |
uint8_t | vctmonitor_get_status (vctmonitor_t *ctx) |
Gets status value. | |
void | vctmonitor_configuration (vctmonitor_t *ctx, uint8_t cfg) |
Configuration function. | |
float | vctmonitor_read_temperature (vctmonitor_t *ctx) |
Get temperature function. | |
float | vctmonitor_read_voltage_differential (vctmonitor_t *ctx) |
Differential voltage function. | |
float | vctmonitor_read_voltage_single (vctmonitor_t *ctx, uint8_t channel) |
Single voltage function. | |
float | vctmonitor_read_current (vctmonitor_t *ctx) |
Current function. | |
API for configuring and manipulating VCT Monitor Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void vctmonitor_cfg_setup | ( | vctmonitor_cfg_t * | cfg | ) |
VCT Monitor configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See vctmonitor_cfg_t object definition for detailed explanation. |
void vctmonitor_configuration | ( | vctmonitor_t * | ctx, |
uint8_t | cfg ) |
Configuration function.
This function is used for configuration paramethers of VCT Monitor click board.
[in] | ctx | : Click context object. See vctmonitor_t object definition for detailed explanation. |
[in] | cfg | : Config data |
err_t vctmonitor_default_cfg | ( | vctmonitor_t * | ctx | ) |
VCT Monitor default configuration function.
This function executes a default configuration of VCT Monitor click board.
[in] | ctx | : Click context object. See vctmonitor_t object definition for detailed explanation. |
0
- Success, -1
- Error.err_t vctmonitor_generic_read | ( | vctmonitor_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rx_buf, | ||
uint8_t | rx_len ) |
VCT Monitor I2C reading function.
This function reads a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See vctmonitor_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | rx_buf | : Output read data. |
[in] | rx_len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t vctmonitor_generic_write | ( | vctmonitor_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | tx_buf, | ||
uint8_t | tx_len ) |
VCT Monitor I2C writing function.
This function writes a desired number of data bytes starting from the selected register by using I2C serial interface.
[in] | ctx | : Click context object. See vctmonitor_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | tx_buf | : Data to be written. |
[in] | tx_len | : Number of bytes to be written. |
0
- Success, -1
- Error.uint8_t vctmonitor_get_status | ( | vctmonitor_t * | ctx | ) |
Gets status value.
This function reads status register value by using I2C serial interface.
[in] | ctx | : Click context object. See vctmonitor_t object definition for detailed explanation. |
err_t vctmonitor_init | ( | vctmonitor_t * | ctx, |
vctmonitor_cfg_t * | cfg ) |
VCT Monitor initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See vctmonitor_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See vctmonitor_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.float vctmonitor_read_current | ( | vctmonitor_t * | ctx | ) |
Current function.
This function reads current value by using I2C serial interface.
[in] | ctx | : Click context object. See vctmonitor_t object definition for detailed explanation. |
float vctmonitor_read_temperature | ( | vctmonitor_t * | ctx | ) |
Get temperature function.
This function reads temperature value by using I2C serial interface.
[in] | ctx | : Click context object. See vctmonitor_t object definition for detailed explanation. |
float vctmonitor_read_voltage_differential | ( | vctmonitor_t * | ctx | ) |
Differential voltage function.
This function reads differential voltage value by using I2C serial interface.
[in] | ctx | : Click context object. See vctmonitor_t object definition for detailed explanation. |
float vctmonitor_read_voltage_single | ( | vctmonitor_t * | ctx, |
uint8_t | channel ) |
Single voltage function.
This function reads single voltage value by using I2C serial interface.
[in] | ctx | : Click context object. See vctmonitor_t object definition for detailed explanation. |
[in] | channel | : Channel V1 or V2 for a single measurement |