@@ -108,8 +108,8 @@ typedef struct
108108/** @defgroup HCD_Speed HCD Speed
109109 * @{
110110 */
111- #define HCD_SPEED_FULL USBH_FS_SPEED
112- #define HCD_SPEED_LOW USBH_LS_SPEED
111+ #define HCD_SPEED_FULL USBH_FSLS_SPEED
112+ #define HCD_SPEED_LOW USBH_FSLS_SPEED
113113
114114/**
115115 * @}
@@ -142,9 +142,9 @@ typedef struct
142142
143143/* Exported macro ------------------------------------------------------------*/
144144/** @defgroup HCD_Exported_Macros HCD Exported Macros
145- * @brief macros to handle interrupts and specific clock configurations
146- * @{
147- */
145+ * @brief macros to handle interrupts and specific clock configurations
146+ * @{
147+ */
148148#define __HAL_HCD_ENABLE (__HANDLE__ ) (void)USB_EnableGlobalInt ((__HANDLE__)->Instance)
149149#define __HAL_HCD_DISABLE (__HANDLE__ ) (void)USB_DisableGlobalInt ((__HANDLE__)->Instance)
150150
@@ -169,19 +169,15 @@ typedef struct
169169/** @defgroup HCD_Exported_Functions_Group1 Initialization and de-initialization functions
170170 * @{
171171 */
172- HAL_StatusTypeDef HAL_HCD_Init (HCD_HandleTypeDef * hhcd );
173- HAL_StatusTypeDef HAL_HCD_DeInit (HCD_HandleTypeDef * hhcd );
174- HAL_StatusTypeDef HAL_HCD_HC_Init (HCD_HandleTypeDef * hhcd ,
175- uint8_t ch_num ,
176- uint8_t epnum ,
177- uint8_t dev_address ,
178- uint8_t speed ,
179- uint8_t ep_type ,
180- uint16_t mps );
172+ HAL_StatusTypeDef HAL_HCD_Init (HCD_HandleTypeDef * hhcd );
173+ HAL_StatusTypeDef HAL_HCD_DeInit (HCD_HandleTypeDef * hhcd );
174+ HAL_StatusTypeDef HAL_HCD_HC_Init (HCD_HandleTypeDef * hhcd , uint8_t ch_num ,
175+ uint8_t epnum , uint8_t dev_address ,
176+ uint8_t speed , uint8_t ep_type , uint16_t mps );
181177
182- HAL_StatusTypeDef HAL_HCD_HC_Halt (HCD_HandleTypeDef * hhcd , uint8_t ch_num );
183- void HAL_HCD_MspInit (HCD_HandleTypeDef * hhcd );
184- void HAL_HCD_MspDeInit (HCD_HandleTypeDef * hhcd );
178+ HAL_StatusTypeDef HAL_HCD_HC_Halt (HCD_HandleTypeDef * hhcd , uint8_t ch_num );
179+ void HAL_HCD_MspInit (HCD_HandleTypeDef * hhcd );
180+ void HAL_HCD_MspDeInit (HCD_HandleTypeDef * hhcd );
185181
186182#if (USE_HAL_HCD_REGISTER_CALLBACKS == 1U )
187183/** @defgroup HAL_HCD_Callback_ID_enumeration_definition HAL USB OTG HCD Callback ID enumeration definition
@@ -190,14 +186,14 @@ void HAL_HCD_MspDeInit(HCD_HandleTypeDef *hhcd);
190186 */
191187typedef enum
192188{
193- HAL_HCD_SOF_CB_ID = 0x01 , /*!< USB HCD SOF callback ID */
194- HAL_HCD_CONNECT_CB_ID = 0x02 , /*!< USB HCD Connect callback ID */
195- HAL_HCD_DISCONNECT_CB_ID = 0x03 , /*!< USB HCD Disconnect callback ID */
196- HAL_HCD_PORT_ENABLED_CB_ID = 0x04 , /*!< USB HCD Port Enable callback ID */
197- HAL_HCD_PORT_DISABLED_CB_ID = 0x05 , /*!< USB HCD Port Disable callback ID */
189+ HAL_HCD_SOF_CB_ID = 0x01 , /*!< USB HCD SOF callback ID */
190+ HAL_HCD_CONNECT_CB_ID = 0x02 , /*!< USB HCD Connect callback ID */
191+ HAL_HCD_DISCONNECT_CB_ID = 0x03 , /*!< USB HCD Disconnect callback ID */
192+ HAL_HCD_PORT_ENABLED_CB_ID = 0x04 , /*!< USB HCD Port Enable callback ID */
193+ HAL_HCD_PORT_DISABLED_CB_ID = 0x05 , /*!< USB HCD Port Disable callback ID */
198194
199- HAL_HCD_MSPINIT_CB_ID = 0x06 , /*!< USB HCD MspInit callback ID */
200- HAL_HCD_MSPDEINIT_CB_ID = 0x07 /*!< USB HCD MspDeInit callback ID */
195+ HAL_HCD_MSPINIT_CB_ID = 0x06 , /*!< USB HCD MspInit callback ID */
196+ HAL_HCD_MSPDEINIT_CB_ID = 0x07 /*!< USB HCD MspDeInit callback ID */
201197
202198} HAL_HCD_CallbackIDTypeDef ;
203199/**
@@ -217,10 +213,16 @@ typedef void (*pHCD_HC_NotifyURBChangeCallbackTypeDef)(HCD_HandleTypeDef *hhcd,
217213 * @}
218214 */
219215
220- HAL_StatusTypeDef HAL_HCD_RegisterCallback (HCD_HandleTypeDef * hhcd , HAL_HCD_CallbackIDTypeDef CallbackID , pHCD_CallbackTypeDef pCallback );
221- HAL_StatusTypeDef HAL_HCD_UnRegisterCallback (HCD_HandleTypeDef * hhcd , HAL_HCD_CallbackIDTypeDef CallbackID );
216+ HAL_StatusTypeDef HAL_HCD_RegisterCallback (HCD_HandleTypeDef * hhcd ,
217+ HAL_HCD_CallbackIDTypeDef CallbackID ,
218+ pHCD_CallbackTypeDef pCallback );
219+
220+ HAL_StatusTypeDef HAL_HCD_UnRegisterCallback (HCD_HandleTypeDef * hhcd ,
221+ HAL_HCD_CallbackIDTypeDef CallbackID );
222+
223+ HAL_StatusTypeDef HAL_HCD_RegisterHC_NotifyURBChangeCallback (HCD_HandleTypeDef * hhcd ,
224+ pHCD_HC_NotifyURBChangeCallbackTypeDef pCallback );
222225
223- HAL_StatusTypeDef HAL_HCD_RegisterHC_NotifyURBChangeCallback (HCD_HandleTypeDef * hhcd , pHCD_HC_NotifyURBChangeCallbackTypeDef pCallback );
224226HAL_StatusTypeDef HAL_HCD_UnRegisterHC_NotifyURBChangeCallback (HCD_HandleTypeDef * hhcd );
225227#endif /* USE_HAL_HCD_REGISTER_CALLBACKS */
226228/**
@@ -231,25 +233,21 @@ HAL_StatusTypeDef HAL_HCD_UnRegisterHC_NotifyURBChangeCallback(HCD_HandleTypeDef
231233/** @addtogroup HCD_Exported_Functions_Group2 Input and Output operation functions
232234 * @{
233235 */
234- HAL_StatusTypeDef HAL_HCD_HC_SubmitRequest (HCD_HandleTypeDef * hhcd ,
235- uint8_t ch_num ,
236- uint8_t direction ,
237- uint8_t ep_type ,
238- uint8_t token ,
239- uint8_t * pbuff ,
240- uint16_t length ,
241- uint8_t do_ping );
236+ HAL_StatusTypeDef HAL_HCD_HC_SubmitRequest (HCD_HandleTypeDef * hhcd , uint8_t ch_num ,
237+ uint8_t direction , uint8_t ep_type ,
238+ uint8_t token , uint8_t * pbuff ,
239+ uint16_t length , uint8_t do_ping );
242240
243241/* Non-Blocking mode: Interrupt */
244- void HAL_HCD_IRQHandler (HCD_HandleTypeDef * hhcd );
245- void HAL_HCD_SOF_Callback (HCD_HandleTypeDef * hhcd );
246- void HAL_HCD_Connect_Callback (HCD_HandleTypeDef * hhcd );
247- void HAL_HCD_Disconnect_Callback (HCD_HandleTypeDef * hhcd );
248- void HAL_HCD_PortEnabled_Callback (HCD_HandleTypeDef * hhcd );
249- void HAL_HCD_PortDisabled_Callback (HCD_HandleTypeDef * hhcd );
250- void HAL_HCD_HC_NotifyURBChange_Callback (HCD_HandleTypeDef * hhcd ,
251- uint8_t chnum ,
252- HCD_URBStateTypeDef urb_state );
242+ void HAL_HCD_IRQHandler (HCD_HandleTypeDef * hhcd );
243+ void HAL_HCD_WKUP_IRQHandler (HCD_HandleTypeDef * hhcd );
244+ void HAL_HCD_SOF_Callback (HCD_HandleTypeDef * hhcd );
245+ void HAL_HCD_Connect_Callback (HCD_HandleTypeDef * hhcd );
246+ void HAL_HCD_Disconnect_Callback (HCD_HandleTypeDef * hhcd );
247+ void HAL_HCD_PortEnabled_Callback (HCD_HandleTypeDef * hhcd );
248+ void HAL_HCD_PortDisabled_Callback (HCD_HandleTypeDef * hhcd );
249+ void HAL_HCD_HC_NotifyURBChange_Callback ( HCD_HandleTypeDef * hhcd , uint8_t chnum ,
250+ HCD_URBStateTypeDef urb_state );
253251/**
254252 * @}
255253 */
@@ -258,9 +256,12 @@ void HAL_HCD_HC_NotifyURBChange_Callback(HCD_HandleTypeDef *hhcd,
258256/** @addtogroup HCD_Exported_Functions_Group3 Peripheral Control functions
259257 * @{
260258 */
261- HAL_StatusTypeDef HAL_HCD_ResetPort (HCD_HandleTypeDef * hhcd );
262- HAL_StatusTypeDef HAL_HCD_Start (HCD_HandleTypeDef * hhcd );
263- HAL_StatusTypeDef HAL_HCD_Stop (HCD_HandleTypeDef * hhcd );
259+ HAL_StatusTypeDef HAL_HCD_ResetPort (HCD_HandleTypeDef * hhcd );
260+ HAL_StatusTypeDef HAL_HCD_Start (HCD_HandleTypeDef * hhcd );
261+ HAL_StatusTypeDef HAL_HCD_Stop (HCD_HandleTypeDef * hhcd );
262+ /**
263+ * @}
264+ */
264265/**
265266 * @}
266267 */
@@ -271,10 +272,11 @@ HAL_StatusTypeDef HAL_HCD_Stop(HCD_HandleTypeDef *hhcd);
271272 */
272273HCD_StateTypeDef HAL_HCD_GetState (HCD_HandleTypeDef * hhcd );
273274HCD_URBStateTypeDef HAL_HCD_HC_GetURBState (HCD_HandleTypeDef * hhcd , uint8_t chnum );
274- uint32_t HAL_HCD_HC_GetXferCount (HCD_HandleTypeDef * hhcd , uint8_t chnum );
275275HCD_HCStateTypeDef HAL_HCD_HC_GetState (HCD_HandleTypeDef * hhcd , uint8_t chnum );
276+ uint32_t HAL_HCD_HC_GetXferCount (HCD_HandleTypeDef * hhcd , uint8_t chnum );
276277uint32_t HAL_HCD_GetCurrentFrame (HCD_HandleTypeDef * hhcd );
277278uint32_t HAL_HCD_GetCurrentSpeed (HCD_HandleTypeDef * hhcd );
279+
278280/**
279281 * @}
280282 */
@@ -285,13 +287,11 @@ uint32_t HAL_HCD_GetCurrentSpeed(HCD_HandleTypeDef *hhcd);
285287
286288/* Private macros ------------------------------------------------------------*/
287289/** @defgroup HCD_Private_Macros HCD Private Macros
288- * @{
289- */
290-
290+ * @{
291+ */
291292/**
292293 * @}
293294 */
294-
295295/* Private functions prototypes ----------------------------------------------*/
296296/** @defgroup HCD_Private_Functions_Prototypes HCD Private Functions Prototypes
297297 * @{
@@ -306,14 +306,6 @@ uint32_t HAL_HCD_GetCurrentSpeed(HCD_HandleTypeDef *hhcd);
306306 * @{
307307 */
308308
309- /**
310- * @}
311- */
312-
313- /**
314- * @}
315- */
316-
317309/**
318310 * @}
319311 */
0 commit comments