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

Driver Operations USB-C VBUS driver operations More...

#include <zephyr/drivers/usb_c/usbc_vbus.h>

Data Fields

bool(* check_level )(const struct device *dev, enum tc_vbus_level level)
  REQ Checks if VBUS is at a particular level.
int(* measure )(const struct device *dev, int *vbus_meas)
  REQ Reads and returns VBUS measured in mV.
int(* discharge )(const struct device *dev, bool enable)
  REQ Controls a pin that discharges VBUS.
int(* enable )(const struct device *dev, bool enable)
  REQ Controls a pin that enables VBUS measurements.

Detailed Description

Driver Operations USB-C VBUS driver operations

This is the driver API structure any USB-C VBUS 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

◆ check_level

bool(* usbc_vbus_driver_api::check_level) (const struct device *dev, enum tc_vbus_level level)

REQ Checks if VBUS is at a particular level.

◆ discharge

int(* usbc_vbus_driver_api::discharge) (const struct device *dev, bool enable)

REQ Controls a pin that discharges VBUS.

◆ enable

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

REQ Controls a pin that enables VBUS measurements.

◆ measure

int(* usbc_vbus_driver_api::measure) (const struct device *dev, int *vbus_meas)

REQ Reads and returns VBUS measured in mV.


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