Zephyr Project API 4.2.99
A Scalable Open Source RTOS
|
USB Type-C Power Path Controller device API. More...
Go to the source code of this file.
Data Structures | |
struct | usbc_ppc_driver_api |
Structure with pointers to the functions implemented by driver. More... | |
Typedefs | |
typedef void(* | usbc_ppc_event_cb_t) (const struct device *dev, void *data, enum usbc_ppc_event ev) |
Enumerations | |
enum | usbc_ppc_event { USBC_PPC_EVENT_DEAD_BATTERY_ERROR = 0 , USBC_PPC_EVENT_SRC_OVERVOLTAGE , USBC_PPC_EVENT_SRC_REVERSE_CURRENT , USBC_PPC_EVENT_SRC_OVERCURRENT , USBC_PPC_EVENT_SRC_SHORT , USBC_PPC_EVENT_OVER_TEMPERATURE , USBC_PPC_EVENT_BOTH_SNKSRC_ENABLED , USBC_PPC_EVENT_SNK_REVERSE_CURRENT , USBC_PPC_EVENT_SNK_SHORT , USBC_PPC_EVENT_SNK_OVERVOLTAGE } |
Type of event being notified by Power Path Controller. More... | |
Functions | |
static int | ppc_is_dead_battery_mode (const struct device *dev) |
Check if PPC is in the dead battery mode. | |
static int | ppc_exit_dead_battery_mode (const struct device *dev) |
Request the PPC to exit from the dead battery mode Return from this call doesn't mean that the PPC is not in the dead battery anymore. | |
static int | ppc_is_vbus_source (const struct device *dev) |
Check if the PPC is sourcing the VBUS. | |
static int | ppc_is_vbus_sink (const struct device *dev) |
Check if the PPC is sinking the VBUS. | |
static int | ppc_set_snk_ctrl (const struct device *dev, bool enable) |
Set the state of VBUS sinking. | |
static int | ppc_set_src_ctrl (const struct device *dev, bool enable) |
Set the state of VBUS sourcing. | |
static int | ppc_set_vbus_discharge (const struct device *dev, bool enable) |
Set the state of VBUS discharging. | |
static int | ppc_is_vbus_present (const struct device *dev) |
Check if VBUS is present. | |
static int | ppc_set_event_handler (const struct device *dev, usbc_ppc_event_cb_t handler, void *data) |
Set the callback used to notify about PPC events. | |
static int | ppc_dump_regs (const struct device *dev) |
Print the values or PPC registers. | |
USB Type-C Power Path Controller device API.