usbcsink 2.0.0.0
|
This file contains API for USB-C Sink Click Driver. More...
#include "drv_digital_out.h"
#include "drv_digital_in.h"
#include "drv_i2c_master.h"
Go to the source code of this file.
Data Structures | |
struct | usbcsink_t |
USB-C Sink Click context object. More... | |
struct | usbcsink_cfg_t |
USB-C Sink Click configuration object. More... | |
Enumerations | |
enum | usbcsink_return_value_t { USBCSINK_OK = 0 , USBCSINK_ERROR = -1 } |
USB-C Sink Click return value data. More... | |
Functions | |
void | usbcsink_cfg_setup (usbcsink_cfg_t *cfg) |
USB-C Sink configuration object setup function. | |
err_t | usbcsink_init (usbcsink_t *ctx, usbcsink_cfg_t *cfg) |
USB-C Sink initialization function. | |
err_t | usbcsink_generic_write (usbcsink_t *ctx, uint8_t reg, uint8_t *tx_buf, uint8_t tx_len) |
USB-C Sink I2C writing function. | |
err_t | usbcsink_generic_read (usbcsink_t *ctx, uint8_t reg, uint8_t *rx_buf, uint8_t rx_len) |
USB-C Sink I2C reading function. | |
void | usbcsink_hw_reset (usbcsink_t *ctx) |
HW reset function. | |
uint8_t | usbcsink_get_pdo2 (usbcsink_t *ctx) |
Get PO2 pin state function. | |
uint8_t | usbcsink_get_pdo3 (usbcsink_t *ctx) |
Get PO3 pin state function. | |
uint8_t | usbcsink_get_interrupt (usbcsink_t *ctx) |
Get INT pin state function. | |
void | usbcsink_write_byte (usbcsink_t *ctx, uint8_t reg, uint8_t tx_data) |
Write byte function. | |
uint8_t | usbcsink_read_byte (usbcsink_t *ctx, uint8_t reg) |
Read byte function. | |
uint8_t | usbcsink_dev_chk (usbcsink_t *ctx) |
Check device communication function. | |
err_t | usbcsink_cust_wr_sec (usbcsink_t *ctx, uint8_t sec_num, uint8_t *sec_data) |
Write sector function. | |
err_t | usbcsink_cust_ent_wr_mode (usbcsink_t *ctx, uint8_t er_sec) |
Enter the write mode function. | |
err_t | usbcsink_cust_ext_test_mode (usbcsink_t *ctx) |
Exit write mode function. | |
void | usbcsink_load_data (usbcsink_t *ctx) |
Load data function. | |
void | usbcsink_upload_new_data (usbcsink_t *ctx, uint8_t def_vals) |
Upload data function. | |
void | usbcsink_set_voltage (uint8_t pdo_numb, float volt) |
Set the voltage function. | |
float | usbcsink_get_voltage (uint8_t pdo_numb) |
Get the voltage function. | |
void | usbcsink_set_current (uint8_t pdo_numb, float curr) |
Set the current function. | |
float | usbcsink_get_current (uint8_t pdo_numb) |
Get the current function. | |
void | usbcsink_set_lo_volt_limit (uint8_t pdo_numb, uint8_t value) |
Set the lower voltage limit function. | |
uint8_t | usbcsink_get_lo_volt_limit (uint8_t pdo_numb) |
Get the lower voltage limit function. | |
void | usbcsink_set_up_volt_limit (uint8_t pdo_numb, uint8_t value) |
Set the upper voltage limit function. | |
uint8_t | usbcsink_get_up_volt_limit (uint8_t pdo_numb) |
Get the over voltage limit function. | |
void | usbcsink_set_flx_curr (float value) |
Set the flexible current function. | |
float | usbcsink_get_flx_curr (void) |
Get the flexible current function. | |
void | usbcsink_set_pdo_num (uint8_t pdo_numb) |
Set the number of sink function. | |
uint8_t | usbcsink_get_pdo_num (void) |
Get the number of sink function. | |
void | usbcsink_set_ext_pow (uint8_t value) |
Set the external source of power function. | |
uint8_t | usbcsink_get_ext_pow (void) |
Get the external source of power function. | |
void | usbcsink_set_usb_com_capa (uint8_t value) |
Set the USB capable function. | |
uint8_t | usbcsink_get_usb_com_cap (void) |
Get the USB capable function. | |
void | usbcsink_set_cfg_ok_gpio (uint8_t value) |
Set the config OK GPIO function. | |
uint8_t | usbcsink_get_cfg_ok_gpio (void) |
Get the config OK GPIO function. | |
void | usbcsink_set_gpio_ctl (uint8_t value) |
Set the config CTRL GPIO function. | |
uint8_t | usbcsink_get_gpio_ctl (void) |
Get the config CTRL GPIO function. | |
void | usbcsink_set_pow_above_5v_only (uint8_t value) |
Set the power only above 5V function. | |
uint8_t | usbcsink_get_pow_above_5v_only (void) |
Get the power only above 5V function. | |
void | usbcsink_set_req_src_current (uint8_t value) |
Set the request operating current function. | |
uint8_t | usbcsink_get_req_src_curr (void) |
Get the request operating current function. | |
This file contains API for USB-C Sink Click Driver.