| 
    Zephyr Project API
    3.2.0
    
   A Scalable Open Source RTOS 
   | 
 
USB Power Delivery. More...
Data Structures | |
| union | pd_header | 
| Build a PD message header See Table 6-1 Message Header.  More... | |
| union | pd_ext_header | 
| Build an extended message header See Table 6-3 Extended Message Header.  More... | |
| union | pd_fixed_supply_pdo_source | 
| Create a Fixed Supply PDO Source value See Table 6-9 Fixed Supply PDO - Source.  More... | |
| union | pd_fixed_supply_pdo_sink | 
| Create a Fixed Supply PDO Sink value See Table 6-14 Fixed Supply PDO - Sink.  More... | |
| union | pd_variable_supply_pdo_source | 
| Create a Variable Supply PDO Source value See Table 6-11 Variable Supply (non-Battery) PDO - Source.  More... | |
| union | pd_variable_supply_pdo_sink | 
| Create a Variable Supply PDO Sink value See Table 6-15 Variable Supply (non-Battery) PDO - Sink.  More... | |
| union | pd_battery_supply_pdo_source | 
| Create a Battery Supply PDO Source value See Table 6-12 Battery Supply PDO - Source.  More... | |
| union | pd_battery_supply_pdo_sink | 
| Create a Battery Supply PDO Sink value See Table 6-16 Battery Supply PDO - Sink.  More... | |
| union | pd_augmented_supply_pdo_source | 
| Create Augmented Supply PDO Source value See Table 6-13 Programmable Power Supply APDO - Source.  More... | |
| union | pd_augmented_supply_pdo_sink | 
| Create Augmented Supply PDO Sink value See Table 6-17 Programmable Power Supply APDO - Sink.  More... | |
| union | pd_rdo | 
| The Request Data Object (RDO) Shall be returned by the Sink making a request for power. See Section 6.4.2 Request Message.  More... | |
| struct | pd_msg | 
| Power Delivery message.  More... | |
Macros | |
| #define | PD_MAX_EXTENDED_MSG_LEGACY_LEN 26 | 
| Maximum length of a non-Extended Message in bytes. See Table 6-75 Value Parameters Parameter Name: MaxExtendedMsgLegacyLen.  More... | |
| #define | PD_MAX_EXTENDED_MSG_LEN 260 | 
| Maximum length of an Extended Message in bytes. See Table 6-75 Value Parameters Parameter Name: MaxExtendedMsgLen.  More... | |
| #define | PD_MAX_EXTENDED_MSG_CHUNK_LEN 26 | 
| Maximum length of a Chunked Message in bytes. When one of both Port Partners do not support Extended Messages of Data Size greater than PD_MAX_EXTENDED_MSG_LEGACY_LEN then the Protocol Layer supports a Chunking mechanism to break larger Messages into smaller Chunks of size PD_MAX_EXTENDED_MSG_CHUNK_LEN. See Table 6-75 Value Parameters Parameter Name: MaxExtendedMsgChunkLen.  More... | |
| #define | PD_T_TYPEC_SINK_WAIT_CAP_MIN_MS 310 | 
| Minimum time a sink shall wait for a Source_Capabilities message before sending a Hard Reset See Table 6-61 Time Values Parameter Name: tTypeCSinkWaitCap.  More... | |
| #define | PD_T_TYPEC_SINK_WAIT_CAP_MAX_MS 620 | 
| Minimum time a sink shall wait for a Source_Capabilities message before sending a Hard Reset See Table 6-61 Time Values Parameter Name: tTypeCSinkWaitCap.  More... | |
| #define | PD_V_SAFE_0V_MAX_MV 800 | 
| VBUS maximum safe operating voltage at "zero volts". See Table 7-24 Common Source/Sink Electrical Parameters Parameter Name: vSafe0V.  More... | |
| #define | PD_V_SAFE_5V_MIN_MV 4750 | 
| VBUS minimum safe operating voltage at 5V. See Table 7-24 Common Source/Sink Electrical Parameters Parameter Name: vSafe5V.  More... | |
| #define | PD_T_SAFE_0V_MAX_MS 650 | 
| Time to reach PD_V_SAFE_0V_MV max in milliseconds. See Table 7-24 Common Source/Sink Electrical Parameters Parameter Name: tSafe0V.  More... | |
| #define | PD_T_SAFE_5V_MAX_MS 275 | 
| Time to reach PD_V_SAFE_5V_MV max in milliseconds. See Table 7-24 Common Source/Sink Electrical Parameters Parameter Name: tSafe5V.  More... | |
| #define | PD_CONVERT_BYTES_TO_PD_HEADER_COUNT(c) ((c) >> 2) | 
| Convert bytes to PD Header data object count, where a data object is 4-bytes.  More... | |
| #define | PD_CONVERT_PD_HEADER_COUNT_TO_BYTES(c) ((c) << 2) | 
| Convert PD Header data object count to bytes.  More... | |
| #define | PD_CONVERT_MA_TO_FIXED_PDO_CURRENT(c) ((c) / 10) | 
| Convert milliamps to Fixed PDO Current in 10mA units.  More... | |
| #define | PD_CONVERT_MV_TO_FIXED_PDO_VOLTAGE(v) ((v) / 50) | 
| Convert millivolts to Fixed PDO Voltage in 50mV units.  More... | |
| #define | PD_CONVERT_FIXED_PDO_CURRENT_TO_MA(c) ((c) * 10) | 
| Convert a Fixed PDO Current from 10mA units to milliamps.  More... | |
| #define | PD_CONVERT_FIXED_PDO_VOLTAGE_TO_MV(v) ((v) * 50) | 
| Convert a Fixed PDO Voltage from 50mV units to millivolts. Used for converting pd_fixed_supply_pdo_source.voltage and pd_fixed_supply_pdo_sink.voltage.  More... | |
| #define | PD_CONVERT_MA_TO_VARIABLE_PDO_CURRENT(c) ((c) / 10) | 
| Convert milliamps to Variable PDO Current in 10ma units.  More... | |
| #define | PD_CONVERT_MV_TO_VARIABLE_PDO_VOLTAGE(v) ((v) / 50) | 
| Convert millivolts to Variable PDO Voltage in 50mV units.  More... | |
| #define | PD_CONVERT_VARIABLE_PDO_CURRENT_TO_MA(c) ((c) * 10) | 
| Convert a Variable PDO Current from 10mA units to milliamps.  More... | |
| #define | PD_CONVERT_VARIABLE_PDO_VOLTAGE_TO_MV(v) ((v) * 50) | 
| Convert a Variable PDO Voltage from 50mV units to millivolts.  More... | |
| #define | PD_CONVERT_MW_TO_BATTERY_PDO_POWER(c) ((c) / 250) | 
| Convert milliwatts to Battery PDO Power in 250mW units.  More... | |
| #define | PD_CONVERT_MV_TO_BATTERY_PDO_VOLTAGE(v) ((v) / 50) | 
| Convert milliwatts to Battery PDO Voltage in 50mV units.  More... | |
| #define | PD_CONVERT_BATTERY_PDO_POWER_TO_MW(c) ((c) * 250) | 
| Convert a Battery PDO Power from 250mW units to milliwatts.  More... | |
| #define | PD_CONVERT_BATTERY_PDO_VOLTAGE_TO_MV(v) ((v) * 50) | 
| Convert a Battery PDO Voltage from 50mV units to millivolts.  More... | |
| #define | PD_CONVERT_MA_TO_AUGMENTED_PDO_CURRENT(c) ((c) / 50) | 
| Convert milliamps to Augmented PDO Current in 50mA units.  More... | |
| #define | PD_CONVERT_MV_TO_AUGMENTED_PDO_VOLTAGE(v) ((v) / 100) | 
| Convert millivolts to Augmented PDO Voltage in 100mV units.  More... | |
| #define | PD_CONVERT_AUGMENTED_PDO_CURRENT_TO_MA(c) ((c) * 50) | 
| Convert an Augmented PDO Current from 50mA units to milliamps.  More... | |
| #define | PD_CONVERT_AUGMENTED_PDO_VOLTAGE_TO_MV(v) ((v) * 100) | 
| Convert an Augmented PDO Voltage from 100mV units to millivolts.  More... | |
USB Power Delivery.
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert an Augmented PDO Current from 50mA units to milliamps.
| c | Augmented PDO current in 50mA units. | 
| #define PD_CONVERT_AUGMENTED_PDO_VOLTAGE_TO_MV | ( | v | ) | ((v) * 100) | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert an Augmented PDO Voltage from 100mV units to millivolts.
| v | Augmented PDO voltage in 100mV units. | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert a Battery PDO Power from 250mW units to milliwatts.
| c | Power in 250mW units. | 
| #define PD_CONVERT_BATTERY_PDO_VOLTAGE_TO_MV | ( | v | ) | ((v) * 50) | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert a Battery PDO Voltage from 50mV units to millivolts.
| v | Voltage in 50mV units. | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert bytes to PD Header data object count, where a data object is 4-bytes.
| c | number of bytes to convert | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert a Fixed PDO Current from 10mA units to milliamps.
| c | Fixed PDO current in 10mA units. | 
| #define PD_CONVERT_FIXED_PDO_VOLTAGE_TO_MV | ( | v | ) | ((v) * 50) | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert a Fixed PDO Voltage from 50mV units to millivolts. Used for converting pd_fixed_supply_pdo_source.voltage and pd_fixed_supply_pdo_sink.voltage.
| v | Fixed PDO voltage in 50mV units. | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert milliamps to Augmented PDO Current in 50mA units.
| c | Current in milliamps | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert milliamps to Fixed PDO Current in 10mA units.
| c | Current in milliamps | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert milliamps to Variable PDO Current in 10ma units.
| c | Current in milliamps | 
| #define PD_CONVERT_MV_TO_AUGMENTED_PDO_VOLTAGE | ( | v | ) | ((v) / 100) | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert millivolts to Augmented PDO Voltage in 100mV units.
| v | Voltage in millivolts | 
| #define PD_CONVERT_MV_TO_BATTERY_PDO_VOLTAGE | ( | v | ) | ((v) / 50) | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert milliwatts to Battery PDO Voltage in 50mV units.
| v | Voltage in millivolts | 
| #define PD_CONVERT_MV_TO_FIXED_PDO_VOLTAGE | ( | v | ) | ((v) / 50) | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert millivolts to Fixed PDO Voltage in 50mV units.
| v | Voltage in millivolts | 
| #define PD_CONVERT_MV_TO_VARIABLE_PDO_VOLTAGE | ( | v | ) | ((v) / 50) | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert millivolts to Variable PDO Voltage in 50mV units.
| v | Voltage in millivolts | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert milliwatts to Battery PDO Power in 250mW units.
| c | Power in milliwatts | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert PD Header data object count to bytes.
| c | number of PD Header data objects | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert a Variable PDO Current from 10mA units to milliamps.
| c | Variable PDO current in 10mA units. | 
| #define PD_CONVERT_VARIABLE_PDO_VOLTAGE_TO_MV | ( | v | ) | ((v) * 50) | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Convert a Variable PDO Voltage from 50mV units to millivolts.
| v | Variable PDO voltage in 50mV units. | 
| #define PD_MAX_EXTENDED_MSG_CHUNK_LEN 26 | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Maximum length of a Chunked Message in bytes. When one of both Port Partners do not support Extended Messages of Data Size greater than PD_MAX_EXTENDED_MSG_LEGACY_LEN then the Protocol Layer supports a Chunking mechanism to break larger Messages into smaller Chunks of size PD_MAX_EXTENDED_MSG_CHUNK_LEN. See Table 6-75 Value Parameters Parameter Name: MaxExtendedMsgChunkLen.
| #define PD_MAX_EXTENDED_MSG_LEGACY_LEN 26 | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Maximum length of a non-Extended Message in bytes. See Table 6-75 Value Parameters Parameter Name: MaxExtendedMsgLegacyLen.
| #define PD_MAX_EXTENDED_MSG_LEN 260 | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Maximum length of an Extended Message in bytes. See Table 6-75 Value Parameters Parameter Name: MaxExtendedMsgLen.
| #define PD_T_SAFE_0V_MAX_MS 650 | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Time to reach PD_V_SAFE_0V_MV max in milliseconds. See Table 7-24 Common Source/Sink Electrical Parameters Parameter Name: tSafe0V.
| #define PD_T_SAFE_5V_MAX_MS 275 | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Time to reach PD_V_SAFE_5V_MV max in milliseconds. See Table 7-24 Common Source/Sink Electrical Parameters Parameter Name: tSafe5V.
| #define PD_T_TYPEC_SINK_WAIT_CAP_MAX_MS 620 | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Minimum time a sink shall wait for a Source_Capabilities message before sending a Hard Reset See Table 6-61 Time Values Parameter Name: tTypeCSinkWaitCap.
| #define PD_T_TYPEC_SINK_WAIT_CAP_MIN_MS 310 | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Minimum time a sink shall wait for a Source_Capabilities message before sending a Hard Reset See Table 6-61 Time Values Parameter Name: tTypeCSinkWaitCap.
| #define PD_V_SAFE_0V_MAX_MV 800 | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
VBUS maximum safe operating voltage at "zero volts". See Table 7-24 Common Source/Sink Electrical Parameters Parameter Name: vSafe0V.
| #define PD_V_SAFE_5V_MIN_MV 4750 | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
VBUS minimum safe operating voltage at 5V. See Table 7-24 Common Source/Sink Electrical Parameters Parameter Name: vSafe5V.
| enum pd_ctrl_msg_type | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Control Message type See Table 6-5 Control Message Types.
| enum pd_data_msg_type | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Data message type See Table 6-6 Data Message Types.
| enum pd_ext_msg_type | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Extended message type for REV 3.0 See Table 6-48 Extended Message Types.
| enum pd_frs_type | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Fast Role Swap Required for USB Type-C current.
| Enumerator | |
|---|---|
| FRS_NOT_SUPPORTED | Fast Swap not supported  | 
| FRS_DEFAULT_USB_POWER | Default USB Power  | 
| FRS_1P5A_5V | 1.5A @ 5V  | 
| FRS_3P0A_5V | 3.0A @ 5V  | 
| enum pd_packet_type | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Power Delivery packet type See USB Type-C Port Controller Interface Specification, Revision 2.0, Version 1.2, Table 4-38 TRANSMIT Register Definition.
| enum pd_rev_type | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Protocol revision.
| Enumerator | |
|---|---|
| PD_REV10 | PD revision 1.0  | 
| PD_REV20 | PD revision 2.0  | 
| PD_REV30 | PD revision 3.0  | 
| enum pdo_src_type | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Power Data Object Source Type Table 6-7 Power Data Object.
PDO - Power Data Object RDO - Request Data Object
| Enumerator | |
|---|---|
| PDO_FIXED | Fixed supply (Vmin = Vmax)  | 
| PDO_BATTERY | Battery  | 
| PDO_VARIABLE | Variable Supply (non-Battery)  | 
| PDO_AUGMENTED | Augmented Power Data Object (APDO)  | 
| enum usbpd_cc_pin | 
#include <include/zephyr/drivers/usbc/usbc_pd.h>
Active PD CC pin.
| Enumerator | |
|---|---|
| USBPD_CC_PIN_1 | PD is active on CC1  | 
| USBPD_CC_PIN_2 | PD is active on CC2  |