1 /**
2   ******************************************************************************
3   * @file    stm32l4xx_hal_pcd_ex.h
4   * @author  MCD Application Team
5   * @brief   Header file of PCD HAL Extension module.
6   ******************************************************************************
7   * @attention
8   *
9   * Copyright (c) 2017 STMicroelectronics.
10   * All rights reserved.
11   *
12   * This software is licensed under terms that can be found in the LICENSE file
13   * in the root directory of this software component.
14   * If no LICENSE file comes with this software, it is provided AS-IS.
15   *
16   ******************************************************************************
17   */
18 
19 /* Define to prevent recursive inclusion -------------------------------------*/
20 #ifndef STM32L4xx_HAL_PCD_EX_H
21 #define STM32L4xx_HAL_PCD_EX_H
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
26 
27 /* Includes ------------------------------------------------------------------*/
28 #include "stm32l4xx_hal_def.h"
29 
30 #if defined (USB) || defined (USB_OTG_FS)
31 /** @addtogroup STM32L4xx_HAL_Driver
32   * @{
33   */
34 
35 /** @addtogroup PCDEx
36   * @{
37   */
38 /* Exported types ------------------------------------------------------------*/
39 /* Exported constants --------------------------------------------------------*/
40 /* Exported macros -----------------------------------------------------------*/
41 /* Exported functions --------------------------------------------------------*/
42 /** @addtogroup PCDEx_Exported_Functions PCDEx Exported Functions
43   * @{
44   */
45 /** @addtogroup PCDEx_Exported_Functions_Group1 Peripheral Control functions
46   * @{
47   */
48 
49 #if defined (USB_OTG_FS)
50 HAL_StatusTypeDef HAL_PCDEx_SetTxFiFo(PCD_HandleTypeDef *hpcd, uint8_t fifo, uint16_t size);
51 HAL_StatusTypeDef HAL_PCDEx_SetRxFiFo(PCD_HandleTypeDef *hpcd, uint16_t size);
52 #endif /* defined (USB_OTG_FS) */
53 
54 #if defined (USB)
55 HAL_StatusTypeDef  HAL_PCDEx_PMAConfig(PCD_HandleTypeDef *hpcd, uint16_t ep_addr,
56                                        uint16_t ep_kind, uint32_t pmaadress);
57 #endif /* defined (USB) */
58 
59 HAL_StatusTypeDef HAL_PCDEx_ActivateLPM(PCD_HandleTypeDef *hpcd);
60 HAL_StatusTypeDef HAL_PCDEx_DeActivateLPM(PCD_HandleTypeDef *hpcd);
61 
62 
63 HAL_StatusTypeDef HAL_PCDEx_ActivateBCD(PCD_HandleTypeDef *hpcd);
64 HAL_StatusTypeDef HAL_PCDEx_DeActivateBCD(PCD_HandleTypeDef *hpcd);
65 void HAL_PCDEx_BCD_VBUSDetect(PCD_HandleTypeDef *hpcd);
66 
67 void HAL_PCDEx_LPM_Callback(PCD_HandleTypeDef *hpcd, PCD_LPM_MsgTypeDef msg);
68 void HAL_PCDEx_BCD_Callback(PCD_HandleTypeDef *hpcd, PCD_BCD_MsgTypeDef msg);
69 
70 /**
71   * @}
72   */
73 
74 /**
75   * @}
76   */
77 
78 /**
79   * @}
80   */
81 
82 /**
83   * @}
84   */
85 #endif /* defined (USB) || defined (USB_OTG_FS) */
86 
87 #ifdef __cplusplus
88 }
89 #endif /* __cplusplus */
90 
91 
92 #endif /* STM32L4xx_HAL_PCD_EX_H */
93