@@ -108,8 +108,8 @@ typedef struct
108
108
/** @defgroup HCD_Speed HCD Speed
109
109
* @{
110
110
*/
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
113
113
114
114
/**
115
115
* @}
@@ -142,9 +142,9 @@ typedef struct
142
142
143
143
/* Exported macro ------------------------------------------------------------*/
144
144
/** @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
+ */
148
148
#define __HAL_HCD_ENABLE (__HANDLE__ ) (void)USB_EnableGlobalInt ((__HANDLE__)->Instance)
149
149
#define __HAL_HCD_DISABLE (__HANDLE__ ) (void)USB_DisableGlobalInt ((__HANDLE__)->Instance)
150
150
@@ -169,19 +169,15 @@ typedef struct
169
169
/** @defgroup HCD_Exported_Functions_Group1 Initialization and de-initialization functions
170
170
* @{
171
171
*/
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 );
181
177
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 );
185
181
186
182
#if (USE_HAL_HCD_REGISTER_CALLBACKS == 1U )
187
183
/** @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);
190
186
*/
191
187
typedef enum
192
188
{
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 */
198
194
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 */
201
197
202
198
} HAL_HCD_CallbackIDTypeDef ;
203
199
/**
@@ -217,10 +213,16 @@ typedef void (*pHCD_HC_NotifyURBChangeCallbackTypeDef)(HCD_HandleTypeDef *hhcd,
217
213
* @}
218
214
*/
219
215
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 );
222
225
223
- HAL_StatusTypeDef HAL_HCD_RegisterHC_NotifyURBChangeCallback (HCD_HandleTypeDef * hhcd , pHCD_HC_NotifyURBChangeCallbackTypeDef pCallback );
224
226
HAL_StatusTypeDef HAL_HCD_UnRegisterHC_NotifyURBChangeCallback (HCD_HandleTypeDef * hhcd );
225
227
#endif /* USE_HAL_HCD_REGISTER_CALLBACKS */
226
228
/**
@@ -231,25 +233,21 @@ HAL_StatusTypeDef HAL_HCD_UnRegisterHC_NotifyURBChangeCallback(HCD_HandleTypeDef
231
233
/** @addtogroup HCD_Exported_Functions_Group2 Input and Output operation functions
232
234
* @{
233
235
*/
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 );
242
240
243
241
/* 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 );
253
251
/**
254
252
* @}
255
253
*/
@@ -258,9 +256,12 @@ void HAL_HCD_HC_NotifyURBChange_Callback(HCD_HandleTypeDef *hhcd,
258
256
/** @addtogroup HCD_Exported_Functions_Group3 Peripheral Control functions
259
257
* @{
260
258
*/
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
+ */
264
265
/**
265
266
* @}
266
267
*/
@@ -271,10 +272,11 @@ HAL_StatusTypeDef HAL_HCD_Stop(HCD_HandleTypeDef *hhcd);
271
272
*/
272
273
HCD_StateTypeDef HAL_HCD_GetState (HCD_HandleTypeDef * hhcd );
273
274
HCD_URBStateTypeDef HAL_HCD_HC_GetURBState (HCD_HandleTypeDef * hhcd , uint8_t chnum );
274
- uint32_t HAL_HCD_HC_GetXferCount (HCD_HandleTypeDef * hhcd , uint8_t chnum );
275
275
HCD_HCStateTypeDef HAL_HCD_HC_GetState (HCD_HandleTypeDef * hhcd , uint8_t chnum );
276
+ uint32_t HAL_HCD_HC_GetXferCount (HCD_HandleTypeDef * hhcd , uint8_t chnum );
276
277
uint32_t HAL_HCD_GetCurrentFrame (HCD_HandleTypeDef * hhcd );
277
278
uint32_t HAL_HCD_GetCurrentSpeed (HCD_HandleTypeDef * hhcd );
279
+
278
280
/**
279
281
* @}
280
282
*/
@@ -285,13 +287,11 @@ uint32_t HAL_HCD_GetCurrentSpeed(HCD_HandleTypeDef *hhcd);
285
287
286
288
/* Private macros ------------------------------------------------------------*/
287
289
/** @defgroup HCD_Private_Macros HCD Private Macros
288
- * @{
289
- */
290
-
290
+ * @{
291
+ */
291
292
/**
292
293
* @}
293
294
*/
294
-
295
295
/* Private functions prototypes ----------------------------------------------*/
296
296
/** @defgroup HCD_Private_Functions_Prototypes HCD Private Functions Prototypes
297
297
* @{
@@ -306,14 +306,6 @@ uint32_t HAL_HCD_GetCurrentSpeed(HCD_HandleTypeDef *hhcd);
306
306
* @{
307
307
*/
308
308
309
- /**
310
- * @}
311
- */
312
-
313
- /**
314
- * @}
315
- */
316
-
317
309
/**
318
310
* @}
319
311
*/
0 commit comments