|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
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. | |
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.
| 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.
REQ Controls a pin that discharges VBUS.
REQ Controls a pin that enables VBUS measurements.
| int(* usbc_vbus_driver_api::measure) (const struct device *dev, int *vbus_meas) |
REQ Reads and returns VBUS measured in mV.