训练营PLSR题目
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 
 
 

537 rader
20 KiB

  1. /**
  2. ******************************************************************************
  3. * @file stm32f4xx_ll_usb.h
  4. * @author MCD Application Team
  5. * @brief Header file of USB Low Layer HAL module.
  6. ******************************************************************************
  7. * @attention
  8. *
  9. * Copyright (c) 2016 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. /* Define to prevent recursive inclusion -------------------------------------*/
  19. #ifndef STM32F4xx_LL_USB_H
  20. #define STM32F4xx_LL_USB_H
  21. #ifdef __cplusplus
  22. extern "C" {
  23. #endif /* __cplusplus */
  24. /* Includes ------------------------------------------------------------------*/
  25. #include "stm32f4xx_hal_def.h"
  26. #if defined (USB_OTG_FS) || defined (USB_OTG_HS)
  27. /** @addtogroup STM32F4xx_HAL_Driver
  28. * @{
  29. */
  30. /** @addtogroup USB_LL
  31. * @{
  32. */
  33. /* Exported types ------------------------------------------------------------*/
  34. /**
  35. * @brief USB Mode definition
  36. */
  37. #if defined (USB_OTG_FS) || defined (USB_OTG_HS)
  38. typedef enum
  39. {
  40. USB_DEVICE_MODE = 0,
  41. USB_HOST_MODE = 1,
  42. USB_DRD_MODE = 2
  43. } USB_OTG_ModeTypeDef;
  44. /**
  45. * @brief URB States definition
  46. */
  47. typedef enum
  48. {
  49. URB_IDLE = 0,
  50. URB_DONE,
  51. URB_NOTREADY,
  52. URB_NYET,
  53. URB_ERROR,
  54. URB_STALL
  55. } USB_OTG_URBStateTypeDef;
  56. /**
  57. * @brief Host channel States definition
  58. */
  59. typedef enum
  60. {
  61. HC_IDLE = 0,
  62. HC_XFRC,
  63. HC_HALTED,
  64. HC_NAK,
  65. HC_NYET,
  66. HC_STALL,
  67. HC_XACTERR,
  68. HC_BBLERR,
  69. HC_DATATGLERR
  70. } USB_OTG_HCStateTypeDef;
  71. /**
  72. * @brief USB Instance Initialization Structure definition
  73. */
  74. typedef struct
  75. {
  76. uint32_t dev_endpoints; /*!< Device Endpoints number.
  77. This parameter depends on the used USB core.
  78. This parameter must be a number between Min_Data = 1 and Max_Data = 15 */
  79. uint32_t Host_channels; /*!< Host Channels number.
  80. This parameter Depends on the used USB core.
  81. This parameter must be a number between Min_Data = 1 and Max_Data = 15 */
  82. uint32_t speed; /*!< USB Core speed.
  83. This parameter can be any value of @ref PCD_Speed/HCD_Speed
  84. (HCD_SPEED_xxx, HCD_SPEED_xxx) */
  85. uint32_t dma_enable; /*!< Enable or disable of the USB embedded DMA used only for OTG HS. */
  86. uint32_t ep0_mps; /*!< Set the Endpoint 0 Max Packet size. */
  87. uint32_t phy_itface; /*!< Select the used PHY interface.
  88. This parameter can be any value of @ref PCD_PHY_Module/HCD_PHY_Module */
  89. uint32_t Sof_enable; /*!< Enable or disable the output of the SOF signal. */
  90. uint32_t low_power_enable; /*!< Enable or disable the low power mode. */
  91. uint32_t lpm_enable; /*!< Enable or disable Link Power Management. */
  92. uint32_t battery_charging_enable; /*!< Enable or disable Battery charging. */
  93. uint32_t vbus_sensing_enable; /*!< Enable or disable the VBUS Sensing feature. */
  94. uint32_t use_dedicated_ep1; /*!< Enable or disable the use of the dedicated EP1 interrupt. */
  95. uint32_t use_external_vbus; /*!< Enable or disable the use of the external VBUS. */
  96. } USB_OTG_CfgTypeDef;
  97. typedef struct
  98. {
  99. uint8_t num; /*!< Endpoint number
  100. This parameter must be a number between Min_Data = 1 and Max_Data = 15 */
  101. uint8_t is_in; /*!< Endpoint direction
  102. This parameter must be a number between Min_Data = 0 and Max_Data = 1 */
  103. uint8_t is_stall; /*!< Endpoint stall condition
  104. This parameter must be a number between Min_Data = 0 and Max_Data = 1 */
  105. uint8_t is_iso_incomplete; /*!< Endpoint isoc condition
  106. This parameter must be a number between Min_Data = 0 and Max_Data = 1 */
  107. uint8_t type; /*!< Endpoint type
  108. This parameter can be any value of @ref USB_LL_EP_Type */
  109. uint8_t data_pid_start; /*!< Initial data PID
  110. This parameter must be a number between Min_Data = 0 and Max_Data = 1 */
  111. uint8_t even_odd_frame; /*!< IFrame parity
  112. This parameter must be a number between Min_Data = 0 and Max_Data = 1 */
  113. uint16_t tx_fifo_num; /*!< Transmission FIFO number
  114. This parameter must be a number between Min_Data = 1 and Max_Data = 15 */
  115. uint32_t maxpacket; /*!< Endpoint Max packet size
  116. This parameter must be a number between Min_Data = 0 and Max_Data = 64KB */
  117. uint8_t *xfer_buff; /*!< Pointer to transfer buffer */
  118. uint32_t dma_addr; /*!< 32 bits aligned transfer buffer address */
  119. uint32_t xfer_len; /*!< Current transfer length */
  120. uint32_t xfer_size; /*!< requested transfer size */
  121. uint32_t xfer_count; /*!< Partial transfer length in case of multi packet transfer */
  122. } USB_OTG_EPTypeDef;
  123. typedef struct
  124. {
  125. uint8_t dev_addr; /*!< USB device address.
  126. This parameter must be a number between Min_Data = 1 and Max_Data = 255 */
  127. uint8_t ch_num; /*!< Host channel number.
  128. This parameter must be a number between Min_Data = 1 and Max_Data = 15 */
  129. uint8_t ep_num; /*!< Endpoint number.
  130. This parameter must be a number between Min_Data = 1 and Max_Data = 15 */
  131. uint8_t ep_is_in; /*!< Endpoint direction
  132. This parameter must be a number between Min_Data = 0 and Max_Data = 1 */
  133. uint8_t speed; /*!< USB Host Channel speed.
  134. This parameter can be any value of @ref HCD_Device_Speed:
  135. (HCD_DEVICE_SPEED_xxx) */
  136. uint8_t do_ping; /*!< Enable or disable the use of the PING protocol for HS mode. */
  137. uint8_t process_ping; /*!< Execute the PING protocol for HS mode. */
  138. uint8_t ep_type; /*!< Endpoint Type.
  139. This parameter can be any value of @ref USB_LL_EP_Type */
  140. uint16_t max_packet; /*!< Endpoint Max packet size.
  141. This parameter must be a number between Min_Data = 0 and Max_Data = 64KB */
  142. uint8_t data_pid; /*!< Initial data PID.
  143. This parameter must be a number between Min_Data = 0 and Max_Data = 1 */
  144. uint8_t *xfer_buff; /*!< Pointer to transfer buffer. */
  145. uint32_t XferSize; /*!< OTG Channel transfer size. */
  146. uint32_t xfer_len; /*!< Current transfer length. */
  147. uint32_t xfer_count; /*!< Partial transfer length in case of multi packet transfer. */
  148. uint8_t toggle_in; /*!< IN transfer current toggle flag.
  149. This parameter must be a number between Min_Data = 0 and Max_Data = 1 */
  150. uint8_t toggle_out; /*!< OUT transfer current toggle flag
  151. This parameter must be a number between Min_Data = 0 and Max_Data = 1 */
  152. uint32_t dma_addr; /*!< 32 bits aligned transfer buffer address. */
  153. uint32_t ErrCnt; /*!< Host channel error count. */
  154. USB_OTG_URBStateTypeDef urb_state; /*!< URB state.
  155. This parameter can be any value of @ref USB_OTG_URBStateTypeDef */
  156. USB_OTG_HCStateTypeDef state; /*!< Host Channel state.
  157. This parameter can be any value of @ref USB_OTG_HCStateTypeDef */
  158. } USB_OTG_HCTypeDef;
  159. #endif /* defined (USB_OTG_FS) || defined (USB_OTG_HS) */
  160. /* Exported constants --------------------------------------------------------*/
  161. /** @defgroup PCD_Exported_Constants PCD Exported Constants
  162. * @{
  163. */
  164. #if defined (USB_OTG_FS) || defined (USB_OTG_HS)
  165. /** @defgroup USB_OTG_CORE VERSION ID
  166. * @{
  167. */
  168. #define USB_OTG_CORE_ID_300A 0x4F54300AU
  169. #define USB_OTG_CORE_ID_310A 0x4F54310AU
  170. /**
  171. * @}
  172. */
  173. /** @defgroup USB_Core_Mode_ USB Core Mode
  174. * @{
  175. */
  176. #define USB_OTG_MODE_DEVICE 0U
  177. #define USB_OTG_MODE_HOST 1U
  178. #define USB_OTG_MODE_DRD 2U
  179. /**
  180. * @}
  181. */
  182. /** @defgroup USB_LL Device Speed
  183. * @{
  184. */
  185. #define USBD_HS_SPEED 0U
  186. #define USBD_HSINFS_SPEED 1U
  187. #define USBH_HS_SPEED 0U
  188. #define USBD_FS_SPEED 2U
  189. #define USBH_FSLS_SPEED 1U
  190. /**
  191. * @}
  192. */
  193. /** @defgroup USB_LL_Core_Speed USB Low Layer Core Speed
  194. * @{
  195. */
  196. #define USB_OTG_SPEED_HIGH 0U
  197. #define USB_OTG_SPEED_HIGH_IN_FULL 1U
  198. #define USB_OTG_SPEED_FULL 3U
  199. /**
  200. * @}
  201. */
  202. /** @defgroup USB_LL_Core_PHY USB Low Layer Core PHY
  203. * @{
  204. */
  205. #define USB_OTG_ULPI_PHY 1U
  206. #define USB_OTG_EMBEDDED_PHY 2U
  207. /**
  208. * @}
  209. */
  210. /** @defgroup USB_LL_Turnaround_Timeout Turnaround Timeout Value
  211. * @{
  212. */
  213. #ifndef USBD_HS_TRDT_VALUE
  214. #define USBD_HS_TRDT_VALUE 9U
  215. #endif /* USBD_HS_TRDT_VALUE */
  216. #ifndef USBD_FS_TRDT_VALUE
  217. #define USBD_FS_TRDT_VALUE 5U
  218. #define USBD_DEFAULT_TRDT_VALUE 9U
  219. #endif /* USBD_HS_TRDT_VALUE */
  220. /**
  221. * @}
  222. */
  223. /** @defgroup USB_LL_Core_MPS USB Low Layer Core MPS
  224. * @{
  225. */
  226. #define USB_OTG_HS_MAX_PACKET_SIZE 512U
  227. #define USB_OTG_FS_MAX_PACKET_SIZE 64U
  228. #define USB_OTG_MAX_EP0_SIZE 64U
  229. /**
  230. * @}
  231. */
  232. /** @defgroup USB_LL_Core_PHY_Frequency USB Low Layer Core PHY Frequency
  233. * @{
  234. */
  235. #define DSTS_ENUMSPD_HS_PHY_30MHZ_OR_60MHZ (0U << 1)
  236. #define DSTS_ENUMSPD_FS_PHY_30MHZ_OR_60MHZ (1U << 1)
  237. #define DSTS_ENUMSPD_FS_PHY_48MHZ (3U << 1)
  238. /**
  239. * @}
  240. */
  241. /** @defgroup USB_LL_CORE_Frame_Interval USB Low Layer Core Frame Interval
  242. * @{
  243. */
  244. #define DCFG_FRAME_INTERVAL_80 0U
  245. #define DCFG_FRAME_INTERVAL_85 1U
  246. #define DCFG_FRAME_INTERVAL_90 2U
  247. #define DCFG_FRAME_INTERVAL_95 3U
  248. /**
  249. * @}
  250. */
  251. /** @defgroup USB_LL_EP0_MPS USB Low Layer EP0 MPS
  252. * @{
  253. */
  254. #define EP_MPS_64 0U
  255. #define EP_MPS_32 1U
  256. #define EP_MPS_16 2U
  257. #define EP_MPS_8 3U
  258. /**
  259. * @}
  260. */
  261. /** @defgroup USB_LL_EP_Speed USB Low Layer EP Speed
  262. * @{
  263. */
  264. #define EP_SPEED_LOW 0U
  265. #define EP_SPEED_FULL 1U
  266. #define EP_SPEED_HIGH 2U
  267. /**
  268. * @}
  269. */
  270. /** @defgroup USB_LL_EP_Type USB Low Layer EP Type
  271. * @{
  272. */
  273. #define EP_TYPE_CTRL 0U
  274. #define EP_TYPE_ISOC 1U
  275. #define EP_TYPE_BULK 2U
  276. #define EP_TYPE_INTR 3U
  277. #define EP_TYPE_MSK 3U
  278. /**
  279. * @}
  280. */
  281. /** @defgroup USB_LL_STS_Defines USB Low Layer STS Defines
  282. * @{
  283. */
  284. #define STS_GOUT_NAK 1U
  285. #define STS_DATA_UPDT 2U
  286. #define STS_XFER_COMP 3U
  287. #define STS_SETUP_COMP 4U
  288. #define STS_SETUP_UPDT 6U
  289. /**
  290. * @}
  291. */
  292. /** @defgroup USB_LL_HCFG_SPEED_Defines USB Low Layer HCFG Speed Defines
  293. * @{
  294. */
  295. #define HCFG_30_60_MHZ 0U
  296. #define HCFG_48_MHZ 1U
  297. #define HCFG_6_MHZ 2U
  298. /**
  299. * @}
  300. */
  301. /** @defgroup USB_LL_HPRT0_PRTSPD_SPEED_Defines USB Low Layer HPRT0 PRTSPD Speed Defines
  302. * @{
  303. */
  304. #define HPRT0_PRTSPD_HIGH_SPEED 0U
  305. #define HPRT0_PRTSPD_FULL_SPEED 1U
  306. #define HPRT0_PRTSPD_LOW_SPEED 2U
  307. /**
  308. * @}
  309. */
  310. #define HCCHAR_CTRL 0U
  311. #define HCCHAR_ISOC 1U
  312. #define HCCHAR_BULK 2U
  313. #define HCCHAR_INTR 3U
  314. #define HC_PID_DATA0 0U
  315. #define HC_PID_DATA2 1U
  316. #define HC_PID_DATA1 2U
  317. #define HC_PID_SETUP 3U
  318. #define GRXSTS_PKTSTS_IN 2U
  319. #define GRXSTS_PKTSTS_IN_XFER_COMP 3U
  320. #define GRXSTS_PKTSTS_DATA_TOGGLE_ERR 5U
  321. #define GRXSTS_PKTSTS_CH_HALTED 7U
  322. #define TEST_J 1U
  323. #define TEST_K 2U
  324. #define TEST_SE0_NAK 3U
  325. #define TEST_PACKET 4U
  326. #define TEST_FORCE_EN 5U
  327. #define USBx_PCGCCTL *(__IO uint32_t *)((uint32_t)USBx_BASE + USB_OTG_PCGCCTL_BASE)
  328. #define USBx_HPRT0 *(__IO uint32_t *)((uint32_t)USBx_BASE + USB_OTG_HOST_PORT_BASE)
  329. #define USBx_DEVICE ((USB_OTG_DeviceTypeDef *)(USBx_BASE + USB_OTG_DEVICE_BASE))
  330. #define USBx_INEP(i) ((USB_OTG_INEndpointTypeDef *)(USBx_BASE\
  331. + USB_OTG_IN_ENDPOINT_BASE + ((i) * USB_OTG_EP_REG_SIZE)))
  332. #define USBx_OUTEP(i) ((USB_OTG_OUTEndpointTypeDef *)(USBx_BASE\
  333. + USB_OTG_OUT_ENDPOINT_BASE + ((i) * USB_OTG_EP_REG_SIZE)))
  334. #define USBx_DFIFO(i) *(__IO uint32_t *)(USBx_BASE + USB_OTG_FIFO_BASE + ((i) * USB_OTG_FIFO_SIZE))
  335. #define USBx_HOST ((USB_OTG_HostTypeDef *)(USBx_BASE + USB_OTG_HOST_BASE))
  336. #define USBx_HC(i) ((USB_OTG_HostChannelTypeDef *)(USBx_BASE\
  337. + USB_OTG_HOST_CHANNEL_BASE\
  338. + ((i) * USB_OTG_HOST_CHANNEL_SIZE)))
  339. #endif /* defined (USB_OTG_FS) || defined (USB_OTG_HS) */
  340. #define EP_ADDR_MSK 0xFU
  341. #ifndef USE_USB_DOUBLE_BUFFER
  342. #define USE_USB_DOUBLE_BUFFER 1U
  343. #endif /* USE_USB_DOUBLE_BUFFER */
  344. /**
  345. * @}
  346. */
  347. /* Exported macro ------------------------------------------------------------*/
  348. /** @defgroup USB_LL_Exported_Macros USB Low Layer Exported Macros
  349. * @{
  350. */
  351. #if defined (USB_OTG_FS) || defined (USB_OTG_HS)
  352. #define USB_MASK_INTERRUPT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->GINTMSK &= ~(__INTERRUPT__))
  353. #define USB_UNMASK_INTERRUPT(__INSTANCE__, __INTERRUPT__) ((__INSTANCE__)->GINTMSK |= (__INTERRUPT__))
  354. #define CLEAR_IN_EP_INTR(__EPNUM__, __INTERRUPT__) (USBx_INEP(__EPNUM__)->DIEPINT = (__INTERRUPT__))
  355. #define CLEAR_OUT_EP_INTR(__EPNUM__, __INTERRUPT__) (USBx_OUTEP(__EPNUM__)->DOEPINT = (__INTERRUPT__))
  356. #endif /* defined (USB_OTG_FS) || defined (USB_OTG_HS) */
  357. /**
  358. * @}
  359. */
  360. /* Exported functions --------------------------------------------------------*/
  361. /** @addtogroup USB_LL_Exported_Functions USB Low Layer Exported Functions
  362. * @{
  363. */
  364. #if defined (USB_OTG_FS) || defined (USB_OTG_HS)
  365. HAL_StatusTypeDef USB_CoreInit(USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef cfg);
  366. HAL_StatusTypeDef USB_DevInit(USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef cfg);
  367. HAL_StatusTypeDef USB_EnableGlobalInt(USB_OTG_GlobalTypeDef *USBx);
  368. HAL_StatusTypeDef USB_DisableGlobalInt(USB_OTG_GlobalTypeDef *USBx);
  369. HAL_StatusTypeDef USB_SetTurnaroundTime(USB_OTG_GlobalTypeDef *USBx, uint32_t hclk, uint8_t speed);
  370. HAL_StatusTypeDef USB_SetCurrentMode(USB_OTG_GlobalTypeDef *USBx, USB_OTG_ModeTypeDef mode);
  371. HAL_StatusTypeDef USB_SetDevSpeed(USB_OTG_GlobalTypeDef *USBx, uint8_t speed);
  372. HAL_StatusTypeDef USB_FlushRxFifo(USB_OTG_GlobalTypeDef *USBx);
  373. HAL_StatusTypeDef USB_FlushTxFifo(USB_OTG_GlobalTypeDef *USBx, uint32_t num);
  374. HAL_StatusTypeDef USB_ActivateEndpoint(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep);
  375. HAL_StatusTypeDef USB_DeactivateEndpoint(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep);
  376. HAL_StatusTypeDef USB_ActivateDedicatedEndpoint(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep);
  377. HAL_StatusTypeDef USB_DeactivateDedicatedEndpoint(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep);
  378. HAL_StatusTypeDef USB_EPStartXfer(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep, uint8_t dma);
  379. HAL_StatusTypeDef USB_EP0StartXfer(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep, uint8_t dma);
  380. HAL_StatusTypeDef USB_WritePacket(USB_OTG_GlobalTypeDef *USBx, uint8_t *src,
  381. uint8_t ch_ep_num, uint16_t len, uint8_t dma);
  382. void *USB_ReadPacket(USB_OTG_GlobalTypeDef *USBx, uint8_t *dest, uint16_t len);
  383. HAL_StatusTypeDef USB_EPSetStall(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep);
  384. HAL_StatusTypeDef USB_EPClearStall(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep);
  385. HAL_StatusTypeDef USB_EPStopXfer(USB_OTG_GlobalTypeDef *USBx, USB_OTG_EPTypeDef *ep);
  386. HAL_StatusTypeDef USB_SetDevAddress(USB_OTG_GlobalTypeDef *USBx, uint8_t address);
  387. HAL_StatusTypeDef USB_DevConnect(USB_OTG_GlobalTypeDef *USBx);
  388. HAL_StatusTypeDef USB_DevDisconnect(USB_OTG_GlobalTypeDef *USBx);
  389. HAL_StatusTypeDef USB_StopDevice(USB_OTG_GlobalTypeDef *USBx);
  390. HAL_StatusTypeDef USB_ActivateSetup(USB_OTG_GlobalTypeDef *USBx);
  391. HAL_StatusTypeDef USB_EP0_OutStart(USB_OTG_GlobalTypeDef *USBx, uint8_t dma, uint8_t *psetup);
  392. uint8_t USB_GetDevSpeed(USB_OTG_GlobalTypeDef *USBx);
  393. uint32_t USB_GetMode(USB_OTG_GlobalTypeDef *USBx);
  394. uint32_t USB_ReadInterrupts(USB_OTG_GlobalTypeDef *USBx);
  395. uint32_t USB_ReadDevAllOutEpInterrupt(USB_OTG_GlobalTypeDef *USBx);
  396. uint32_t USB_ReadDevOutEPInterrupt(USB_OTG_GlobalTypeDef *USBx, uint8_t epnum);
  397. uint32_t USB_ReadDevAllInEpInterrupt(USB_OTG_GlobalTypeDef *USBx);
  398. uint32_t USB_ReadDevInEPInterrupt(USB_OTG_GlobalTypeDef *USBx, uint8_t epnum);
  399. void USB_ClearInterrupts(USB_OTG_GlobalTypeDef *USBx, uint32_t interrupt);
  400. HAL_StatusTypeDef USB_HostInit(USB_OTG_GlobalTypeDef *USBx, USB_OTG_CfgTypeDef cfg);
  401. HAL_StatusTypeDef USB_InitFSLSPClkSel(USB_OTG_GlobalTypeDef *USBx, uint8_t freq);
  402. HAL_StatusTypeDef USB_ResetPort(USB_OTG_GlobalTypeDef *USBx);
  403. HAL_StatusTypeDef USB_DriveVbus(USB_OTG_GlobalTypeDef *USBx, uint8_t state);
  404. uint32_t USB_GetHostSpeed(USB_OTG_GlobalTypeDef *USBx);
  405. uint32_t USB_GetCurrentFrame(USB_OTG_GlobalTypeDef *USBx);
  406. HAL_StatusTypeDef USB_HC_Init(USB_OTG_GlobalTypeDef *USBx, uint8_t ch_num,
  407. uint8_t epnum, uint8_t dev_address, uint8_t speed,
  408. uint8_t ep_type, uint16_t mps);
  409. HAL_StatusTypeDef USB_HC_StartXfer(USB_OTG_GlobalTypeDef *USBx,
  410. USB_OTG_HCTypeDef *hc, uint8_t dma);
  411. uint32_t USB_HC_ReadInterrupt(USB_OTG_GlobalTypeDef *USBx);
  412. HAL_StatusTypeDef USB_HC_Halt(USB_OTG_GlobalTypeDef *USBx, uint8_t hc_num);
  413. HAL_StatusTypeDef USB_DoPing(USB_OTG_GlobalTypeDef *USBx, uint8_t ch_num);
  414. HAL_StatusTypeDef USB_StopHost(USB_OTG_GlobalTypeDef *USBx);
  415. HAL_StatusTypeDef USB_ActivateRemoteWakeup(USB_OTG_GlobalTypeDef *USBx);
  416. HAL_StatusTypeDef USB_DeActivateRemoteWakeup(USB_OTG_GlobalTypeDef *USBx);
  417. #endif /* defined (USB_OTG_FS) || defined (USB_OTG_HS) */
  418. /**
  419. * @}
  420. */
  421. /**
  422. * @}
  423. */
  424. /**
  425. * @}
  426. */
  427. /**
  428. * @}
  429. */
  430. #endif /* defined (USB_OTG_FS) || defined (USB_OTG_HS) */
  431. #ifdef __cplusplus
  432. }
  433. #endif /* __cplusplus */
  434. #endif /* STM32F4xx_LL_USB_H */