vcpmonitor2 2.0.0.0
|
Functions | |
void | vcpmonitor2_cfg_setup (vcpmonitor2_cfg_t *cfg) |
Config Object Initialization function. | |
VCPMONITOR2_RETVAL | vcpmonitor2_init (vcpmonitor2_t *ctx, vcpmonitor2_cfg_t *cfg) |
Initialization function. | |
void | vcpmonitor2_default_cfg (vcpmonitor2_t *ctx) |
Click Default Configuration function. | |
void | vcpmonitor2_generic_write (vcpmonitor2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | vcpmonitor2_generic_read (vcpmonitor2_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
uint16_t | vcpmonitor2_get_manifacture_id (vcpmonitor2_t *ctx) |
Get Manufacture ID. | |
uint16_t | vcpmonitor2_get_die_id (vcpmonitor2_t *ctx) |
Get DIE ID. | |
float | vcpmonitor2_get_bus_voltage (vcpmonitor2_t *ctx, uint8_t channel) |
Get BUS voltage in mV. | |
float | vcpmonitor2_get_shunt_voltage (vcpmonitor2_t *ctx, uint8_t channel) |
Get Shunt voltage in mV. | |
float | vcpmonitor2_get_current (vcpmonitor2_t *ctx, uint8_t channel) |
Get Current data in mA. | |
float | vcpmonitor2_get_power (vcpmonitor2_t *ctx, uint8_t channel) |
Get Power in W. | |
void | vcpmonitor2_configuration (vcpmonitor2_t *ctx, uint16_t cfg) |
Configuration function. | |
uint8_t | vcpmonitor2_get_alert_status (vcpmonitor2_t *ctx) |
Get Alert status. | |
void | vcpmonitor2_reset_alert (vcpmonitor2_t *ctx) |
Alert reset. | |
void | vcpmonitor2_alert_config (vcpmonitor2_t *ctx, uint8_t cfg) |
Alert configuration ( Enable / Disable ) | |
void vcpmonitor2_alert_config | ( | vcpmonitor2_t * | ctx, |
uint8_t | cfg ) |
Alert configuration ( Enable / Disable )
ctx | Click object. |
cfg | Configuration data |
- PVALID ALERT - WRNG ALERT - CRTCL ALERT - TCTRL ALERT
void vcpmonitor2_cfg_setup | ( | vcpmonitor2_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void vcpmonitor2_configuration | ( | vcpmonitor2_t * | ctx, |
uint16_t | cfg ) |
Configuration function.
ctx | Click object. |
cfg | Config data for set |
-- VBUS ( 140us, 204us, 332us, 588us, 1100us 2116us, 4156us, 8244us ) -- VSH ( 140us, 204us, 332us, 588us, 1100us 2116us, 4156us, 8244us ) -- MODE ( POWER_DOWN, SS_SHUNT_VOLT, SS_BUS_VOLT, CONT_SHUNT_VOLT, CONT_BUS_VOLT, CONT_SHUNT_BUS_VOLT )
void vcpmonitor2_default_cfg | ( | vcpmonitor2_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for Vcpmonitor2 click.
void vcpmonitor2_generic_read | ( | vcpmonitor2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic read function.
ctx | Click object. |
reg | Register address. |
data_buf | Output data buf |
len | Number of the bytes to be read |
@description This function reads data from the desired register.
void vcpmonitor2_generic_write | ( | vcpmonitor2_t * | ctx, |
uint8_t | reg, | ||
uint8_t * | data_buf, | ||
uint8_t | len ) |
Generic write function.
ctx | Click object. |
reg | Register address. |
data_buf | Data buf to be written. |
len | Number of the bytes in data buf. |
@description This function writes data to the desired register.
uint8_t vcpmonitor2_get_alert_status | ( | vcpmonitor2_t * | ctx | ) |
Get Alert status.
ctx | Click object. |
float vcpmonitor2_get_bus_voltage | ( | vcpmonitor2_t * | ctx, |
uint8_t | channel ) |
Get BUS voltage in mV.
ctx | Click object. |
channel | Channel ( 1 / 2 / 3 ) |
float vcpmonitor2_get_current | ( | vcpmonitor2_t * | ctx, |
uint8_t | channel ) |
Get Current data in mA.
ctx | Click object. |
channel | Channel ( 1 / 2 / 3 ) |
uint16_t vcpmonitor2_get_die_id | ( | vcpmonitor2_t * | ctx | ) |
Get DIE ID.
ctx | Click object. |
uint16_t vcpmonitor2_get_manifacture_id | ( | vcpmonitor2_t * | ctx | ) |
Get Manufacture ID.
ctx | Click object. |
float vcpmonitor2_get_power | ( | vcpmonitor2_t * | ctx, |
uint8_t | channel ) |
Get Power in W.
ctx | Click object. |
channel | Channel ( 1 / 2 / 3 ) |
float vcpmonitor2_get_shunt_voltage | ( | vcpmonitor2_t * | ctx, |
uint8_t | channel ) |
Get Shunt voltage in mV.
ctx | Click object. |
channel | Channel ( 1 / 2 / 3 ) |
VCPMONITOR2_RETVAL vcpmonitor2_init | ( | vcpmonitor2_t * | ctx, |
vcpmonitor2_cfg_t * | cfg ) |
Initialization function.
ctx | Click object. |
cfg | Click configuration structure. |
@description This function initializes all necessary pins and peripherals used for this click.
void vcpmonitor2_reset_alert | ( | vcpmonitor2_t * | ctx | ) |
Alert reset.
ctx | Click object. |