vcpmonitor3 2.0.0.0
|
API for configuring and manipulating VCP Monitor 3 Click driver. More...
Topics | |
VCP Monitor 3 Registers List | |
List of registers of VCP Monitor 3 Click driver. | |
VCP Monitor 3 Registers Settings | |
Settings for registers of VCP Monitor 3 Click driver. | |
VCP Monitor 3 MikroBUS Map | |
MikroBUS pin mapping of VCP Monitor 3 Click driver. | |
Functions | |
void | vcpmonitor3_cfg_setup (vcpmonitor3_cfg_t *cfg) |
VCP Monitor 3 configuration object setup function. | |
void | vcpmonitor3_drv_interface_selection (vcpmonitor3_cfg_t *cfg, vcpmonitor3_drv_t drv_sel) |
VCP Monitor 3 driver interface setup function. | |
err_t | vcpmonitor3_init (vcpmonitor3_t *ctx, vcpmonitor3_cfg_t *cfg) |
VCP Monitor 3 initialization function. | |
err_t | vcpmonitor3_default_cfg (vcpmonitor3_t *ctx) |
VCP Monitor 3 default configuration function. | |
err_t | vcpmonitor3_generic_write (vcpmonitor3_t *ctx, uint8_t reg, uint8_t *data_in, uint8_t len) |
VCP Monitor 3 data writing function. | |
err_t | vcpmonitor3_generic_read (vcpmonitor3_t *ctx, uint8_t reg, uint8_t *data_out, uint8_t len) |
VCP Monitor 3 data reading function. | |
void | vcpmonitor3_wr_page_0 (vcpmonitor3_t *ctx, uint8_t reg, uint8_t *wr_data, uint8_t n_bytes) |
Write Data To Page 0 function. | |
void | vcpmonitor3_rd_page_0 (vcpmonitor3_t *ctx, uint8_t reg, uint8_t *rd_data, uint8_t n_bytes) |
Read Data From Page 0 function. | |
void | vcpmonitor3_wr_page_1 (vcpmonitor3_t *ctx, uint8_t reg, uint8_t *wr_data, uint8_t n_bytes) |
Write Data To Page 1 function. | |
void | vcpmonitor3_rd_page_1 (vcpmonitor3_t *ctx, uint8_t reg, uint8_t *rd_data, uint8_t n_bytes) |
Read Data From Page 1 function. | |
void | vcpmonitor3_set_op_mode (vcpmonitor3_t *ctx, uint8_t op_mode) |
Set Operation Mode function. | |
float | vcpmonitor3_read_i (vcpmonitor3_t *ctx) |
Read Current in Amps function. | |
float | vcpmonitor3_read_p (vcpmonitor3_t *ctx) |
Read Power in Watts function. | |
float | vcpmonitor3_read_v (vcpmonitor3_t *ctx) |
Read Voltage in Volts function. | |
float | vcpmonitor3_read_temp (vcpmonitor3_t *ctx) |
Read Die Temperature in degrees Centigrade function. | |
float | vcpmonitor3_read_vcc (vcpmonitor3_t *ctx) |
Read Voltage at DVCC in Volts function. | |
float | vcpmonitor3_read_c (vcpmonitor3_t *ctx, uint8_t accu_set1) |
Read Charge in Coulombs function. | |
float | vcpmonitor3_read_e (vcpmonitor3_t *ctx, uint8_t accu_set1) |
Read Energy in Joules function. | |
float | vcpmonitor3_read_tb (vcpmonitor3_t *ctx, uint8_t accu_set1) |
Read Time in Seconds function. | |
uint8_t | vcpmonitor3_get_int (vcpmonitor3_t *ctx) |
Get Interrupt state function. | |
API for configuring and manipulating VCP Monitor 3 Click driver.
Any initialization code needed for MCU to function properly. Do not remove this line or clock might not be set correctly.
void vcpmonitor3_cfg_setup | ( | vcpmonitor3_cfg_t * | cfg | ) |
VCP Monitor 3 configuration object setup function.
This function initializes click configuration structure to initial values.
[out] | cfg | : Click configuration structure. See vcpmonitor3_cfg_t object definition for detailed explanation. |
err_t vcpmonitor3_default_cfg | ( | vcpmonitor3_t * | ctx | ) |
VCP Monitor 3 default configuration function.
This function executes a default configuration of VCP Monitor 3 click board.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
0
- Success, -1
- Error.void vcpmonitor3_drv_interface_selection | ( | vcpmonitor3_cfg_t * | cfg, |
vcpmonitor3_drv_t | drv_sel ) |
VCP Monitor 3 driver interface setup function.
This function sets a serial driver interface which will be used further in the click driver.
[out] | cfg | : Click configuration structure. See vcpmonitor3_cfg_t object definition for detailed explanation. |
[in] | drv_sel | : Driver interface selection. See vcpmonitor3_drv_t object definition for detailed explanation. |
err_t vcpmonitor3_generic_read | ( | vcpmonitor3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_out, | ||
uint8_t | len ) |
VCP Monitor 3 data reading function.
This function reads a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[out] | data_out | : Output read data. |
[in] | len | : Number of bytes to be read. |
0
- Success, -1
- Error.err_t vcpmonitor3_generic_write | ( | vcpmonitor3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_in, | ||
uint8_t | len ) |
VCP Monitor 3 data writing function.
This function writes a desired number of data bytes starting from the selected register.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
[in] | reg | : Start register address. |
[in] | data_in | : Data to be written. |
[in] | len | : Number of bytes to be written. |
0
- Success, -1
- Error.uint8_t vcpmonitor3_get_int | ( | vcpmonitor3_t * | ctx | ) |
Get Interrupt state function.
Function is used to check if an interrupt has occured.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
err_t vcpmonitor3_init | ( | vcpmonitor3_t * | ctx, |
vcpmonitor3_cfg_t * | cfg ) |
VCP Monitor 3 initialization function.
This function initializes all necessary pins and peripherals used for this click board.
[out] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
[in] | cfg | : Click configuration structure. See vcpmonitor3_cfg_t object definition for detailed explanation. |
0
- Success, -1
- Error.void vcpmonitor3_rd_page_0 | ( | vcpmonitor3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rd_data, | ||
uint8_t | n_bytes ) |
Read Data From Page 0 function.
Reads user defined number of bytes from page 0 registers defined by 8-bit register address.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
[in] | reg | : 8-bit register address. |
[out] | rd_data | : 8-bit read data. |
[in] | n_bytes | : 16-bit number of bytes. |
void vcpmonitor3_rd_page_1 | ( | vcpmonitor3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | rd_data, | ||
uint8_t | n_bytes ) |
Read Data From Page 1 function.
Reads user defined number of bytes from page 1 registers defined by 8-bit register address.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
[in] | reg | : 8-bit register address |
[out] | rd_data | : 8-bit read data. |
[in] | n_bytes | : 16-bit number of bytes. |
float vcpmonitor3_read_c | ( | vcpmonitor3_t * | ctx, |
uint8_t | accu_set1 ) |
Read Charge in Coulombs function.
Function is used to get charge in Coulombs.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
[in] | accu_set1 | : Read accumulated quantities set. |
float vcpmonitor3_read_e | ( | vcpmonitor3_t * | ctx, |
uint8_t | accu_set1 ) |
Read Energy in Joules function.
Function is used to get energy in Joules.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
[in] | accu_set1 | : Read accumulated quantities set. |
float vcpmonitor3_read_i | ( | vcpmonitor3_t * | ctx | ) |
Read Current in Amps function.
Function is used to get current in Amperes.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
float vcpmonitor3_read_p | ( | vcpmonitor3_t * | ctx | ) |
Read Power in Watts function.
Function is used to get power in Watts.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
float vcpmonitor3_read_tb | ( | vcpmonitor3_t * | ctx, |
uint8_t | accu_set1 ) |
Read Time in Seconds function.
Function is used to get time in Seconds.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
[in] | accu_set1 | : Read accumulated quantities set. |
float vcpmonitor3_read_temp | ( | vcpmonitor3_t * | ctx | ) |
Read Die Temperature in degrees Centigrade function.
Function is used to get die temperature in degrees Centigrade.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
float vcpmonitor3_read_v | ( | vcpmonitor3_t * | ctx | ) |
Read Voltage in Volts function.
Function is used to get voltage in Volts.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
float vcpmonitor3_read_vcc | ( | vcpmonitor3_t * | ctx | ) |
Read Voltage at DVCC in Volts function.
Function is used to get die voltage at DVCC in Volts.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
void vcpmonitor3_set_op_mode | ( | vcpmonitor3_t * | ctx, |
uint8_t | op_mode ) |
Set Operation Mode function.
Function is used to select operation mode.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
[in] | op_mode | : Value that defines operation mode. |
void vcpmonitor3_wr_page_0 | ( | vcpmonitor3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | wr_data, | ||
uint8_t | n_bytes ) |
Write Data To Page 0 function.
Writes user defined number of bytes into page 0 registers defined by 8-bit register address.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
[in] | reg | : 8-bit register address. |
[in] | wr_data | : 8-bit write data. |
[in] | n_bytes | : 16-bit number of bytes. |
void vcpmonitor3_wr_page_1 | ( | vcpmonitor3_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | wr_data, | ||
uint8_t | n_bytes ) |
Write Data To Page 1 function.
Writes user defined number of bytes into page 1 registers defined by 8-bit register address.
[in] | ctx | : Click context object. See vcpmonitor3_t object definition for detailed explanation. |
[in] | reg | : 8-bit register address. |
[in] | wr_data | : 8-bit write data. |
[in] | n_bytes | : 16-bit number of bytes. |