Crate ap33772s_driver

Crate ap33772s_driver 

Source
Expand description

§AP33772S USB-PD Sink Controller Driver

This crate provides a platform-agnostic driver for the AP33772S USB Power Delivery (USB-PD) Sink Controller. The driver is built on top of the [embedded-hal] traits to ensure compatibility with various microcontroller platforms.

§Features

  • Platform-agnostic implementation using embedded-hal traits
  • Support for both Standard Power Range (SPR) and Extended Power Range (EPR) modes
  • Power Data Object (PDO) enumeration and negotiation
  • Voltage and current monitoring
  • Protection features (UVP, OVP, OCP, OTP)
  • Programmable Power Supply (PPS) and Adjustable Voltage Supply (AVS) support

Structs§

AP33772S
AP33772S USB-PD Sink Controller Driver
PDOInfo
Source Power Data Object information
PDStatus
Current status of the PD controller

Enums§

Error
Error types for AP33772S operations
PDFault
Fault types
PDVoltage
PD Voltage options

Constants§

AP33772S_ADDR
AP33772S I2C slave address
CC_STATUS_MASK
CMDMSG_HRST
CONFIG_DR_EN
CONFIG_OCP_EN
CONFIG_OTP_EN
CONFIG_OVP_EN
CONFIG_UVP_EN
MAX_PDO_COUNT
Maximum number of PDOs supported by AP33772S
MSGRLT_BUSY
MSGRLT_FAILED
MSGRLT_INVALID
MSGRLT_MASK
MSGRLT_SUCCESS
MSGRLT_UNSUPPORTED
REG_CONFIG
REG_CURRENT
REG_IREQ
REG_MASK
REG_OPMODE
REG_PD_CMDMSG
REG_PD_MSGRLT
REG_PD_REQMSG
REG_SRCPDO
REG_STATUS
REG_SYSTEM
REG_TEMP
REG_VOLTAGE
REG_VREQ
REQMSG_MAX_CURRENT
REQMSG_MAX_VOLTAGE
REQMSG_VOLTAGE_SEL_MASK
SRCPDO_CURRENT_MAX_MASK
SRCPDO_CURRENT_MAX_SHIFT
SRCPDO_CURRENT_VALUES
SRCPDO_DETECT
SRCPDO_TYPE
SRCPDO_VOLTAGE_MAX_MASK
STATUS_NEWPDO
STATUS_OCP
STATUS_OTP
STATUS_OVP
STATUS_READY
STATUS_STARTED
STATUS_UVP
SYSTEM_VOUTCTL_AUTO
SYSTEM_VOUTCTL_OFF
SYSTEM_VOUTCTL_ON