15#ifndef ZEPHYR_INCLUDE_DRIVERS_USBC_TCPCI_PRIV_H_
16#define ZEPHYR_INCLUDE_DRIVERS_USBC_TCPCI_PRIV_H_
35#define TCPCI_STD_REGS_SIZE 38
Public APIs for the I2C drivers.
tcpc_alert
TCPC Alert bits.
Definition usbc_tcpc.h:41
tc_cc_voltage_state
CC Voltage status.
Definition usbc_tc.h:308
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Complete I2C DT information.
Definition i2c.h:77
Structure used to bind the register address to name in registers dump.
Definition tcpci_priv.h:25
const char * name
Human readable name of register.
Definition tcpci_priv.h:29
uint8_t size
Size in bytes of the register.
Definition tcpci_priv.h:31
uint8_t addr
Address of I2C device register.
Definition tcpci_priv.h:27
int tcpci_read_reg16(const struct i2c_dt_spec *bus, uint8_t reg, uint16_t *value)
Function to read the 16-bit register of TCPCI device.
#define TCPCI_STD_REGS_SIZE
Size of the array containing the standard registers used by tcpci dump command.
Definition tcpci_priv.h:35
int tcpci_update_reg8(const struct i2c_dt_spec *bus, uint8_t reg, uint8_t mask, uint8_t value)
Function to read and update part of the 8-bit register of TCPCI device The function is NOT performing...
int tcpci_write_reg16(const struct i2c_dt_spec *bus, uint8_t reg, uint16_t value)
Function to write a value to the 16-bit register of TCPCI device.
int tcpci_read_reg8(const struct i2c_dt_spec *bus, uint8_t reg, uint8_t *value)
Function to read the 8-bit register of TCPCI device.
const struct tcpci_reg_dump_map tcpci_std_regs[38]
Array containing the standard TCPCI registers list.
enum tcpc_alert tcpci_alert_reg_to_enum(uint16_t reg)
Function that converts the TCPCI alert register to the tcpc_alert enum The hard reset value takes pri...
int tcpci_write_reg8(const struct i2c_dt_spec *bus, uint8_t reg, uint8_t value)
Function to write a value to the 8-bit register of TCPCI device.
int tcpci_tcpm_get_cc(const struct i2c_dt_spec *bus, enum tc_cc_voltage_state *cc1, enum tc_cc_voltage_state *cc2)
Function that reads the CC status registers and converts read values to enums representing voltages s...