|
Zephyr API Documentation 4.4.99
A Scalable Open Source RTOS
|
Macros for building USB Power Delivery Power Data Objects (PDOs). More...
Macros | |
| #define | PDO_FIXED(mv, ma, flags) |
| Build a Fixed Supply PDO. | |
| #define | VSAFE5V 5000 |
| vSafe5V, the default 5V supply, in millivolts | |
| #define | PDO_BATT(min_mv, max_mv, max_mw) |
| Build a Battery Supply PDO. | |
| #define | PDO_VAR(min_mv, max_mv, max_ma) |
| Build a Variable Supply (non-Battery) PDO. | |
| #define | PDO_PPS_APDO(min_mv, max_mv, max_ma) |
| Build a Programmable Power Supply (PPS) Augmented PDO. | |
Fixed Supply PDO capability flags | |
| #define | PDO_FIXED_DUAL_ROLE (1 << 29) |
| Power role swap supported. | |
| #define | PDO_FIXED_SUSPEND (1 << 28) |
| USB Suspend supported (Source). | |
| #define | PDO_FIXED_HIGHER_CAP (1 << 28) |
| Requires more than vSafe5V (Sink). | |
| #define | PDO_FIXED_EXTPOWER (1 << 27) |
| Externally powered. | |
| #define | PDO_FIXED_USB_COMM (1 << 26) |
| USB communications capable. | |
| #define | PDO_FIXED_DATA_SWAP (1 << 25) |
| Data role swap supported. | |
Macros for building USB Power Delivery Power Data Objects (PDOs).
Helper macros used to build the 32-bit Power Data Objects (PDOs) exchanged during USB Power Delivery Source/Sink capability negotiation, as defined by the USB Power Delivery specification. They are primarily intended to be used from devicetree to describe the capabilities of a USB-C port, for example:
| #define PDO_BATT | ( | min_mv, | |
| max_mv, | |||
| max_mw ) |
#include <zephyr/dt-bindings/usb-c/pd.h>
Build a Battery Supply PDO.
| min_mv | Minimum voltage in millivolts |
| max_mv | Maximum voltage in millivolts |
| max_mw | Maximum power in milliwatts |
| #define PDO_FIXED | ( | mv, | |
| ma, | |||
| flags ) |
#include <zephyr/dt-bindings/usb-c/pd.h>
Build a Fixed Supply PDO.
| mv | Output voltage in millivolts |
| ma | Maximum output current in milliamps |
| flags | Bitwise OR of the PDO_FIXED_* capability flags |
| #define PDO_FIXED_DATA_SWAP (1 << 25) |
#include <zephyr/dt-bindings/usb-c/pd.h>
Data role swap supported.
| #define PDO_FIXED_DUAL_ROLE (1 << 29) |
#include <zephyr/dt-bindings/usb-c/pd.h>
Power role swap supported.
| #define PDO_FIXED_EXTPOWER (1 << 27) |
#include <zephyr/dt-bindings/usb-c/pd.h>
Externally powered.
| #define PDO_FIXED_HIGHER_CAP (1 << 28) |
#include <zephyr/dt-bindings/usb-c/pd.h>
Requires more than vSafe5V (Sink).
| #define PDO_FIXED_SUSPEND (1 << 28) |
#include <zephyr/dt-bindings/usb-c/pd.h>
USB Suspend supported (Source).
| #define PDO_FIXED_USB_COMM (1 << 26) |
#include <zephyr/dt-bindings/usb-c/pd.h>
USB communications capable.
| #define PDO_PPS_APDO | ( | min_mv, | |
| max_mv, | |||
| max_ma ) |
#include <zephyr/dt-bindings/usb-c/pd.h>
Build a Programmable Power Supply (PPS) Augmented PDO.
| min_mv | Minimum voltage in millivolts |
| max_mv | Maximum voltage in millivolts |
| max_ma | Maximum current in milliamps |
| #define PDO_VAR | ( | min_mv, | |
| max_mv, | |||
| max_ma ) |
#include <zephyr/dt-bindings/usb-c/pd.h>
Build a Variable Supply (non-Battery) PDO.
| min_mv | Minimum voltage in millivolts |
| max_mv | Maximum voltage in millivolts |
| max_ma | Maximum current in milliamps |
| #define VSAFE5V 5000 |
#include <zephyr/dt-bindings/usb-c/pd.h>
vSafe5V, the default 5V supply, in millivolts