15#ifndef ZEPHYR_INCLUDE_DRIVERS_USBC_VBUS_H_
16#define ZEPHYR_INCLUDE_DRIVERS_USBC_VBUS_H_
#define DEVICE_API_GET(_class, _dev)
Expands to the pointer of a device's API for a given class.
Definition device.h:1425
tc_vbus_level
VBUS level voltages.
Definition usbc_tc.h:342
static int usbc_vbus_measure(const struct device *dev, int *meas)
Reads and returns VBUS measured in mV.
Definition usbc_vbus.h:80
static bool usbc_vbus_check_level(const struct device *dev, enum tc_vbus_level level)
Checks if VBUS is at a particular level.
Definition usbc_vbus.h:66
static int usbc_vbus_enable(const struct device *dev, bool enable)
Controls a pin that enables VBUS measurements.
Definition usbc_vbus.h:110
static int usbc_vbus_discharge(const struct device *dev, bool enable)
Controls a pin that discharges VBUS.
Definition usbc_vbus.h:95
#define bool
Definition stdbool.h:13
Runtime device structure (in ROM) per driver instance.
Definition device.h:513
<span class="mlabel">Driver Operations</span> USB-C VBUS driver operations
Definition usbc_vbus.h:44
int(* discharge)(const struct device *dev, bool enable)
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition usbc_vbus.h:50
int(* measure)(const struct device *dev, int *vbus_meas)
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition usbc_vbus.h:48
int(* enable)(const struct device *dev, bool enable)
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition usbc_vbus.h:52
bool(* check_level)(const struct device *dev, enum tc_vbus_level level)
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition usbc_vbus.h:46
USB Type-C Cable and Connector API used for USB-C drivers.