source: trunk/fw_g473rct/USBPD/Target/usbpd_dpm_conf.h@ 64

Last change on this file since 64 was 59, checked in by f.jahn, 5 weeks ago

Added more USBPD-stack files.

File size: 9.9 KB
Line 
1/* USER CODE BEGIN Header */
2/**
3 ******************************************************************************
4 * @file usbpd_dpm_conf.h
5 * @author MCD Application Team
6 * @brief Header file for stack/application settings file
7 ******************************************************************************
8 * @attention
9 *
10 * Copyright (c) 2026 STMicroelectronics.
11 * All rights reserved.
12 *
13 * This software is licensed under terms that can be found in the LICENSE file
14 * in the root directory of this software component.
15 * If no LICENSE file comes with this software, it is provided AS-IS.
16 *
17 ******************************************************************************
18 */
19/* USER CODE END Header */
20
21#ifndef __USBPD_DPM_CONF_H_
22#define __USBPD_DPM_CONF_H_
23
24#ifdef __cplusplus
25 extern "C" {
26#endif
27
28/* Includes ------------------------------------------------------------------*/
29#include "usbpd_pdo_defs.h"
30#include "usbpd_dpm_user.h"
31#include "usbpd_vdm_user.h"
32
33/* USER CODE BEGIN Includes */
34/* Section where include file can be added */
35
36/* USER CODE END Includes */
37
38/* Define ------------------------------------------------------------------*/
39/* Define VID, PID,... manufacturer parameters */
40#define USBPD_VID (0x0483u) /*!< Vendor ID (assigned by the USB-IF) */
41#define USBPD_PID (0x0002u) /*!< Product ID (assigned by the manufacturer) */
42#define USBPD_XID (0xF0000003u) /*!< Value provided by the USB-IF assigned to the product */
43
44/* USER CODE BEGIN Define */
45/* Section where Define can be added */
46
47/* USER CODE END Define */
48
49/* Exported typedef ----------------------------------------------------------*/
50/* USER CODE BEGIN Typedef */
51/* Section where Typedef can be added */
52
53/* USER CODE END Typedef */
54
55/* Private variables ---------------------------------------------------------*/
56#ifndef __USBPD_DPM_CORE_C
57extern USBPD_SettingsTypeDef DPM_Settings[USBPD_PORT_COUNT];
58extern USBPD_IdSettingsTypeDef DPM_ID_Settings[USBPD_PORT_COUNT];
59extern USBPD_USER_SettingsTypeDef DPM_USER_Settings[USBPD_PORT_COUNT];
60#else /* __USBPD_DPM_CORE_C */
61USBPD_SettingsTypeDef DPM_Settings[USBPD_PORT_COUNT] =
62{
63 {
64 .PE_SupportedSOP = USBPD_SUPPORTED_SOP_SOP , /* Supported SOP : SOP, SOP' SOP" SOP'Debug SOP"Debug */
65 .PE_SpecRevision = USBPD_SPECIFICATION_REV3,/* spec revision value */
66 .PE_DefaultRole = USBPD_PORTPOWERROLE_SNK, /* Default port role */
67 .PE_RoleSwap = USBPD_FALSE, /* support port role swap */
68 .PE_VDMSupport = USBPD_FALSE,
69 .PE_RespondsToDiscovSOP = USBPD_FALSE, /*!< Can respond successfully to a Discover Identity */
70 .PE_AttemptsDiscovSOP = USBPD_FALSE, /*!< Can send a Discover Identity */
71 .PE_PingSupport = USBPD_FALSE, /* support Ping (only for PD3.0) */
72 .PE_CapscounterSupport = USBPD_FALSE, /* support caps counter */
73 .CAD_RoleToggle = USBPD_FALSE, /* CAD role toggle */
74 .CAD_TryFeature = 0, /* CAD try feature */
75 .CAD_AccesorySupport = USBPD_FALSE, /* CAD accessory support */
76 .PE_PD3_Support.d = /*!< PD3 SUPPORT FEATURE */
77 {
78 .PE_UnchunkSupport = USBPD_FALSE, /* support Unchunked mode (valid only spec revision 3.0) */
79 .PE_FastRoleSwapSupport = USBPD_FALSE, /* support fast role swap only spec revision 3.0 */
80 .Is_GetPPSStatus_Supported = USBPD_FALSE, /*!< PPS message NOT supported by PE stack */
81 .Is_SrcCapaExt_Supported = USBPD_FALSE, /*!< Source_Capabilities_Extended message supported or not by DPM */
82 .Is_Alert_Supported = USBPD_FALSE, /*!< Alert message supported or not by DPM */
83 .Is_GetStatus_Supported = USBPD_FALSE, /*!< Status message supported or not by DPM (Is_Alert_Supported should be enabled) */
84 .Is_GetManufacturerInfo_Supported = USBPD_FALSE, /*!< Manufacturer_Info message supported or not by DPM */
85 .Is_GetCountryCodes_Supported = USBPD_FALSE, /*!< Country_Codes message supported or not by DPM */
86 .Is_GetCountryInfo_Supported = USBPD_FALSE, /*!< Country_Info message supported or not by DPM */
87 .Is_SecurityRequest_Supported = USBPD_FALSE, /*!< Security_Response message supported or not by DPM */
88 .Is_FirmUpdateRequest_Supported = USBPD_FALSE, /*!< Firmware update response message supported by PE */
89 .Is_GetBattery_Supported = USBPD_FALSE, /*!< Get Battery Capabitity and Status messages supported by PE */
90 },
91
92 .CAD_SRCToggleTime = 0, /* uint8_t CAD_SRCToggleTime; */
93 .CAD_SNKToggleTime = 0, /* uint8_t CAD_SNKToggleTime; */
94 }
95};
96
97USBPD_IdSettingsTypeDef DPM_ID_Settings[USBPD_PORT_COUNT] =
98{
99 {
100 .XID = USBPD_XID, /*!< Value provided by the USB-IF assigned to the product */
101 .VID = USBPD_VID, /*!< Vendor ID (assigned by the USB-IF) */
102 .PID = USBPD_PID, /*!< Product ID (assigned by the manufacturer) */
103 },
104};
105
106USBPD_USER_SettingsTypeDef DPM_USER_Settings[USBPD_PORT_COUNT] =
107{
108 {
109 .PE_DataSwap = USBPD_FALSE, /* support data swap */
110 .PE_VconnSwap = USBPD_FALSE, /* support VCONN swap */
111 .PE_DR_Swap_To_DFP = USBPD_FALSE, /* Support of DR Swap to DFP */
112 .PE_DR_Swap_To_UFP = USBPD_FALSE, /* Support of DR Swap to UFP */
113 .DPM_SNKExtendedCapa = /*!< SNK Extended Capability */
114 {
115 .VID = USBPD_VID, /*!< Vendor ID (assigned by the USB-IF) */
116 .PID = USBPD_PID, /*!< Product ID (assigned by the manufacturer) */
117 .XID = USBPD_XID, /*!< Value provided by the USB-IF assigned to the product */
118 .FW_revision = 1, /*!< Firmware version number */
119 .HW_revision = 2, /*!< Hardware version number */
120 .SKEDB_Version = USBPD_SKEDB_VERSION_1P0, /*!<SKEDV Version (not the specification Version)
121 based on @ref USBPD_SKEDB_VERSION */
122 .LoadStep = USBPD_SKEDB_LOADSTEP_150MA,/*!< Load Step based on @ref USBPD_SKEDB_LOADSTEP */
123 .SinkLoadCharac.b = /*!< Sink Load Characteristics */
124 {
125 .PercentOverload = 0, /*!< Percent overload in 10% increments Values higher than 25
126 (11001b) are clipped to 250%. 00000b is the default. */
127 .OverloadPeriod = 0, /*!< Overload period in 20ms when bits 0-4 non-zero */
128 .DutyCycle = 0, /*!< Duty Cycle in 5% increments when bits 0-4 are non-zero */
129 .VBusVoltageDrop = 0, /*!< Can tolerate VBUS Voltage drop */
130 },
131 .Compliance = 0, /*!< Compliance based on combination of @ref USBPD_SKEDB_COMPLIANCE */
132 .Touchtemp = USBPD_SKEDB_TOUCHTEMP_NA, /*< Touch Temp based on @ref USBPD_SKEDB_TOUCHTEMP */
133 .BatteryInfo = 0, /*!< Battery info */
134 .SinkModes = 0, /*!< Sink Modes based on combination of @ref USBPD_SKEDB_SINKMODES */
135 .SinkMinimumPDP = 0, /*!< The Minimum PDP required by the Sink to operate without
136 consuming any power from its Battery(s) should it have one */
137 .SinkOperationalPDP = 0, /*!< The PDP the Sink requires to operate normally. For Sinks with
138 a Battery, it is the PDP rating of the charger supplied with
139 it or recommended for it. */
140 .SinkMaximumPDP = 0, /*!< The Maximum PDP the Sink can consume to operate and
141 charge its Battery(s) should it have one */
142 },
143#if defined(USBPD_REV30_SUPPORT)
144#if _MANU_INFO
145 .DPM_ManuInfoPort = /*!< Manufacturer information used for the port */
146 {
147 .VID = USBPD_VID, /*!< Vendor ID (assigned by the USB-IF) */
148 .PID = USBPD_PID, /*!< Product ID (assigned by the manufacturer) */
149 .ManuString = "STMicroelectronics", /*!< Vendor defined byte array */
150 },
151#endif /* _MANU_INFO */
152#endif /* USBPD_REV30_SUPPORT */
153 },
154};
155
156#endif /* !__USBPD_DPM_CORE_C */
157
158/* USER CODE BEGIN Variable */
159/* Section where Variable can be added */
160
161/* USER CODE END Variable */
162
163/* Exported constants --------------------------------------------------------*/
164/* USER CODE BEGIN Constant */
165/* Section where Constant can be added */
166
167/* USER CODE END Constant */
168
169/* Exported macro ------------------------------------------------------------*/
170/* USER CODE BEGIN Macro */
171/* Section where Macro can be added */
172
173/* USER CODE END Macro */
174
175#ifdef __cplusplus
176}
177#endif
178
179#endif /* __USBPD_DPM_CONF_H_ */
Note: See TracBrowser for help on using the repository browser.