source: trunk/fw_g473rct/USBPD/App/usbpd_pdo_defs.h@ 68

Last change on this file since 68 was 65, checked in by f.jahn, 5 weeks ago
  • USB-PD function was implemented;
  • HW parity check on RAM was activated;
  • USB Device CDC mode was activated.
File size: 4.4 KB
Line 
1/* USER CODE BEGIN Header */
2/**
3 ******************************************************************************
4 * @file usbpd_pdo_defs.h
5 * @author MCD Application Team
6 * @brief Header file for definition of PDO/APDO values for 2 ports(DRP/SNK) configuration
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_PDO_DEF_H_
22#define __USBPD_PDO_DEF_H_
23
24#ifdef __cplusplus
25 extern "C" {
26#endif
27
28/* Includes ------------------------------------------------------------------*/
29#include "usbpd_def.h"
30
31/* USER CODE BEGIN Includes */
32
33/* USER CODE END Includes */
34
35/* Define ------------------------------------------------------------------*/
36#define PORT0_NB_SOURCEPDO 1U /* Number of Source PDOs (applicable for port 0) */
37#define PORT0_NB_SINKPDO 0U /* Number of Sink PDOs (applicable for port 0) */
38#define PORT1_NB_SOURCEPDO 0U /* Number of Source PDOs (applicable for port 1) */
39#define PORT1_NB_SINKPDO 0U /* Number of Sink PDOs (applicable for port 1) */
40
41/* USER CODE BEGIN Define */
42
43/* USER CODE END Define */
44
45/* Exported typedef ----------------------------------------------------------*/
46
47/* USER CODE BEGIN typedef */
48/**
49 * @brief USBPD Port PDO Structure definition
50 *
51 */
52/* USER CODE END typedef */
53
54/* Exported define -----------------------------------------------------------*/
55
56/* USER CODE BEGIN Exported_Define */
57
58#define USBPD_CORE_PDO_SRC_FIXED_MAX_CURRENT 3
59#define USBPD_CORE_PDO_SNK_FIXED_MAX_CURRENT 1500
60
61/* USER CODE END Exported_Define */
62
63/* Exported constants --------------------------------------------------------*/
64
65/* USER CODE BEGIN constants */
66
67/* USER CODE END constants */
68
69/* Exported macro ------------------------------------------------------------*/
70
71/* USER CODE BEGIN macro */
72
73/* USER CODE END macro */
74
75/* Exported variables --------------------------------------------------------*/
76
77/* USER CODE BEGIN variables */
78/* USER CODE END variables */
79
80#ifndef __USBPD_PWR_IF_C
81extern uint32_t PORT0_PDO_ListSRC[USBPD_MAX_NB_PDO];
82extern uint32_t PORT0_PDO_ListSNK[USBPD_MAX_NB_PDO];
83#else
84/* Definition of Source PDO for Port 0 */
85uint32_t PORT0_PDO_ListSRC[USBPD_MAX_NB_PDO] =
86{
87 /* PDO 1 */
88 (
89 USBPD_PDO_TYPE_FIXED | /* Fixed supply PDO */
90
91 USBPD_PDO_SRC_FIXED_SET_VOLTAGE(5000U) | /* Voltage in mV */
92 USBPD_PDO_SRC_FIXED_SET_MAX_CURRENT(3000U) | /* Max current in mA */
93 USBPD_PDO_SRC_FIXED_PEAKCURRENT_EQUAL | /* Peak Current info */
94
95 /* Common definitions applicable to all PDOs, defined only in PDO 1 */
96 USBPD_PDO_SRC_FIXED_UNCHUNK_NOT_SUPPORTED | /* Unchunked Extended Messages */
97 USBPD_PDO_SRC_FIXED_DRD_SUPPORTED | /* Dual-Role Data */
98 USBPD_PDO_SRC_FIXED_USBCOMM_SUPPORTED | /* USB Communications */
99 USBPD_PDO_SRC_FIXED_EXT_POWER_NOT_AVAILABLE | /* External Power */
100 USBPD_PDO_SRC_FIXED_USBSUSPEND_NOT_SUPPORTED | /* USB Suspend Supported */
101 USBPD_PDO_SRC_FIXED_DRP_NOT_SUPPORTED /* Dual-Role Power */
102 ),
103
104 /* PDO 2 */ (0x00000000U),
105
106 /* PDO 3 */ (0x00000000U),
107
108 /* PDO 4 */ (0x00000000U),
109
110 /* PDO 5 */ (0x00000000U),
111
112 /* PDO 6 */ (0x00000000U),
113
114 /* PDO 7 */ (0x00000000U),
115
116};
117
118/* Definition of Sink PDO for Port 0 */
119uint32_t PORT0_PDO_ListSNK[USBPD_MAX_NB_PDO] =
120{
121
122 /* PDO 1 */ (0x00000000U),
123
124 /* PDO 2 */ (0x00000000U),
125
126 /* PDO 3 */ (0x00000000U),
127
128 /* PDO 4 */ (0x00000000U),
129
130 /* PDO 5 */ (0x00000000U),
131
132 /* PDO 6 */ (0x00000000U),
133
134 /* PDO 7 */ (0x00000000U),
135};
136
137#endif
138
139/* Exported functions --------------------------------------------------------*/
140
141/* USER CODE BEGIN functions */
142
143/* USER CODE END functions */
144
145#ifdef __cplusplus
146}
147#endif
148
149#endif /* __USBPD_PDO_DEF_H_ */
Note: See TracBrowser for help on using the repository browser.