|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Driver Operations USB Type-C Power Path Controller driver operations More...
#include <zephyr/drivers/usb_c/usbc_ppc.h>
Data Fields | |
| int(* | is_dead_battery_mode )(const struct device *dev) |
| OPT Check if PPC is in the dead battery mode. | |
| int(* | exit_dead_battery_mode )(const struct device *dev) |
| OPT 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. | |
| int(* | is_vbus_source )(const struct device *dev) |
| OPT Check if the PPC is sourcing the VBUS. | |
| int(* | is_vbus_sink )(const struct device *dev) |
| OPT Check if the PPC is sinking the VBUS. | |
| int(* | set_snk_ctrl )(const struct device *dev, bool enable) |
| OPT Set the state of VBUS sinking. | |
| int(* | set_src_ctrl )(const struct device *dev, bool enable) |
| OPT Set the state of VBUS sourcing. | |
| int(* | set_vbus_discharge )(const struct device *dev, bool enable) |
| OPT Set the state of VBUS discharging. | |
| int(* | is_vbus_present )(const struct device *dev) |
| OPT Check if VBUS is present. | |
| int(* | set_event_handler )(const struct device *dev, usbc_ppc_event_cb_t handler, void *data) |
| OPT Set the callback used to notify about PPC events. | |
| int(* | dump_regs )(const struct device *dev) |
| OPT Print the values or PPC registers. | |
Driver Operations USB Type-C Power Path Controller driver operations
This is the driver API structure any USB Type-C Power Path Controller driver needs to define. It contains function pointers to the operations the driver implements, as well as any other driver-specific constant data.
Members marked with REQ MUST be set by the driver, whereas those marked with OPT are optional.
| int(* usbc_ppc_driver_api::dump_regs) (const struct device *dev) |
OPT Print the values or PPC registers.
| int(* usbc_ppc_driver_api::exit_dead_battery_mode) (const struct device *dev) |
OPT 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.
| int(* usbc_ppc_driver_api::is_dead_battery_mode) (const struct device *dev) |
OPT Check if PPC is in the dead battery mode.
| int(* usbc_ppc_driver_api::is_vbus_present) (const struct device *dev) |
OPT Check if VBUS is present.
| int(* usbc_ppc_driver_api::is_vbus_sink) (const struct device *dev) |
OPT Check if the PPC is sinking the VBUS.
| int(* usbc_ppc_driver_api::is_vbus_source) (const struct device *dev) |
OPT Check if the PPC is sourcing the VBUS.
| int(* usbc_ppc_driver_api::set_event_handler) (const struct device *dev, usbc_ppc_event_cb_t handler, void *data) |
OPT Set the callback used to notify about PPC events.
OPT Set the state of VBUS sinking.
OPT Set the state of VBUS sourcing.
OPT Set the state of VBUS discharging.