vcpmonitor 2.0.0.0
|
Functions | |
void | vcpmonitor_cfg_setup (vcpmonitor_cfg_t *cfg) |
Config Object Initialization function. | |
VCPMONITOR_RETVAL | vcpmonitor_init (vcpmonitor_t *ctx, vcpmonitor_cfg_t *cfg) |
Initialization function. | |
void | vcpmonitor_default_cfg (vcpmonitor_t *ctx) |
Click Default Configuration function. | |
void | vcpmonitor_generic_write (vcpmonitor_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic write function. | |
void | vcpmonitor_generic_read (vcpmonitor_t *ctx, uint8_t reg, uint8_t *data_buf, uint8_t len) |
Generic read function. | |
void | vcpmonitor_write_data (vcpmonitor_t *ctx, uint8_t reg, uint16_t tx_data) |
Writes data to register. | |
int16_t | vcpmonitor_read_data (vcpmonitor_t *ctx, uint8_t reg_addr) |
Reads data from register. | |
uint8_t | vcpmonitor_get_interrupt_state (vcpmonitor_t *ctx) |
Gets Interrupt pin state. | |
float | vcpmonitor_get_current (vcpmonitor_t *ctx) |
Reads current data in mA. | |
float | vcpmonitor_get_voltage (vcpmonitor_t *ctx) |
Reads voltage data in mV. | |
float | vcpmonitor_get_power (vcpmonitor_t *ctx) |
Reads power data in mW. | |
uint8_t | vcpmonitor_get_id_value (vcpmonitor_t *ctx, uint16_t *manufacture_id, uint16_t *did_id) |
Gets Manufacture ID and Device ID. | |
void vcpmonitor_cfg_setup | ( | vcpmonitor_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
@description This function initializes click configuration structure to init state.
void vcpmonitor_default_cfg | ( | vcpmonitor_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
@description This function executes default configuration for VCPmonitor click.
void vcpmonitor_generic_read | ( | vcpmonitor_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 vcpmonitor_generic_write | ( | vcpmonitor_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.
float vcpmonitor_get_current | ( | vcpmonitor_t * | ctx | ) |
Reads current data in mA.
ctx | Click object. |
@description This function reads current data in mA.
uint8_t vcpmonitor_get_id_value | ( | vcpmonitor_t * | ctx, |
uint16_t * | manufacture_id, | ||
uint16_t * | did_id ) |
Gets Manufacture ID and Device ID.
ctx | Click object. |
manufacture_id | Manufacture ID data |
did_id | Device ID data |
@description This function gets Manufacture ID and Device ID
uint8_t vcpmonitor_get_interrupt_state | ( | vcpmonitor_t * | ctx | ) |
Gets Interrupt pin state.
ctx | Click object. |
@description This function gets Interrupt pin state.
float vcpmonitor_get_power | ( | vcpmonitor_t * | ctx | ) |
Reads power data in mW.
ctx | Click object. |
@description This function reads power data in mW.
float vcpmonitor_get_voltage | ( | vcpmonitor_t * | ctx | ) |
Reads voltage data in mV.
ctx | Click object. |
@description This function reads voltage data in mV.
VCPMONITOR_RETVAL vcpmonitor_init | ( | vcpmonitor_t * | ctx, |
vcpmonitor_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.
int16_t vcpmonitor_read_data | ( | vcpmonitor_t * | ctx, |
uint8_t | reg_addr ) |
Reads data from register.
ctx | Click object. |
reg | Register address |
@description This function reads data from register.
void vcpmonitor_write_data | ( | vcpmonitor_t * | ctx, |
uint8_t | reg, | ||
uint16_t | tx_data ) |
Writes data to register.
ctx | Click object. |
reg | Register address |
tx_data | Data to be write in the register |
@description This function writes data to register.