Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

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.

Detailed Description

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.

See also
DEVICE_DT_INST_DEFINE()
DEVICE_DT_DEFINE()
DEVICE_API()

Field Documentation

◆ dump_regs

int(* usbc_ppc_driver_api::dump_regs) (const struct device *dev)

OPT Print the values or PPC registers.

◆ exit_dead_battery_mode

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.

◆ is_dead_battery_mode

int(* usbc_ppc_driver_api::is_dead_battery_mode) (const struct device *dev)

OPT Check if PPC is in the dead battery mode.

◆ is_vbus_present

int(* usbc_ppc_driver_api::is_vbus_present) (const struct device *dev)

OPT Check if VBUS is present.

◆ is_vbus_sink

int(* usbc_ppc_driver_api::is_vbus_sink) (const struct device *dev)

OPT Check if the PPC is sinking the VBUS.

◆ is_vbus_source

int(* usbc_ppc_driver_api::is_vbus_source) (const struct device *dev)

OPT Check if the PPC is sourcing the VBUS.

◆ set_event_handler

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.

◆ set_snk_ctrl

int(* usbc_ppc_driver_api::set_snk_ctrl) (const struct device *dev, bool enable)

OPT Set the state of VBUS sinking.

◆ set_src_ctrl

int(* usbc_ppc_driver_api::set_src_ctrl) (const struct device *dev, bool enable)

OPT Set the state of VBUS sourcing.

◆ set_vbus_discharge

int(* usbc_ppc_driver_api::set_vbus_discharge) (const struct device *dev, bool enable)

OPT Set the state of VBUS discharging.


The documentation for this struct was generated from the following file: