| [59] | 1 | /* USER CODE BEGIN Header */
|
|---|
| 2 | /**
|
|---|
| 3 | ******************************************************************************
|
|---|
| 4 | * @file app/usbpd.c
|
|---|
| 5 | * @author MCD Application Team
|
|---|
| 6 | * @brief This file contains the device define.
|
|---|
| 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 | /* Includes ------------------------------------------------------------------*/
|
|---|
| 22 | #include "usbpd.h"
|
|---|
| 23 |
|
|---|
| 24 | /* USER CODE BEGIN 0 */
|
|---|
| 25 | /* USER CODE END 0 */
|
|---|
| 26 |
|
|---|
| 27 | /* USER CODE BEGIN 1 */
|
|---|
| 28 | /* USER CODE END 1 */
|
|---|
| 29 |
|
|---|
| 30 | /* Private variables ---------------------------------------------------------*/
|
|---|
| 31 |
|
|---|
| 32 | /* Private functions ---------------------------------------------------------*/
|
|---|
| 33 |
|
|---|
| 34 | /* USER CODE BEGIN 2 */
|
|---|
| 35 | /* USER CODE END 2 */
|
|---|
| 36 | /* USBPD init function */
|
|---|
| 37 | void MX_USBPD_Init(void)
|
|---|
| 38 | {
|
|---|
| 39 |
|
|---|
| 40 | /* Global Init of USBPD HW */
|
|---|
| 41 | USBPD_HW_IF_GlobalHwInit();
|
|---|
| 42 |
|
|---|
| 43 | /* Initialize the Device Policy Manager */
|
|---|
| 44 | if (USBPD_OK != USBPD_DPM_InitCore())
|
|---|
| 45 | {
|
|---|
| 46 | while(1);
|
|---|
| 47 | }
|
|---|
| 48 |
|
|---|
| 49 | /* Initialise the DPM application */
|
|---|
| 50 | if (USBPD_OK != USBPD_DPM_UserInit())
|
|---|
| 51 | {
|
|---|
| 52 | while(1);
|
|---|
| 53 | }
|
|---|
| 54 |
|
|---|
| 55 | /* USER CODE BEGIN 3 */
|
|---|
| 56 | /* USER CODE END 3 */
|
|---|
| 57 |
|
|---|
| 58 | if (USBPD_OK != USBPD_DPM_InitOS())
|
|---|
| 59 | {
|
|---|
| 60 | while(1);
|
|---|
| 61 | }
|
|---|
| 62 |
|
|---|
| 63 | /* USER CODE BEGIN EnableIRQ */
|
|---|
| 64 | /* Enable IRQ which has been disabled by FreeRTOS services */
|
|---|
| 65 | __enable_irq();
|
|---|
| 66 | /* USER CODE END EnableIRQ */
|
|---|
| 67 |
|
|---|
| 68 | }
|
|---|
| 69 |
|
|---|
| 70 | /* USER CODE BEGIN 4 */
|
|---|
| 71 | /* USER CODE END 4 */
|
|---|
| 72 |
|
|---|
| 73 | /**
|
|---|
| 74 | * @}
|
|---|
| 75 | */
|
|---|
| 76 |
|
|---|
| 77 | /**
|
|---|
| 78 | * @}
|
|---|
| 79 | */
|
|---|