USB control functions.
More...
USB control functions.
===============================================================================
##### Peripheral State and Errors functions #####
===============================================================================
[..]
This subsection provides a set of functions allowing to control the USB.
(+) hal_usb_get_state() API can be helpful to check in run-time the state of the USB peripheral
(+) hal_usb_get_error() check in run-time Errors occurring during communication
(+) hal_usb_set_timeout() set the timeout during internal process
◆ hal_usb_get_error()
Return the USB error code.
- Parameters
-
[in] | p_usb | Pointer to an USB handle which contains the configuration information for the specified USB module. |
- Returns
- USB error code in bitmap format
◆ hal_usb_get_state()
Return the USB handle state.
- Parameters
-
[in] | p_usb | Pointer to an USB handle which contains the configuration information for the specified USB module. |
- Return values
-
◆ hal_usb_resume_reg()
Restore some registers related to USB configuration after sleep. This function must be used in conjunction with the hal_usb_suspend_reg().
- Parameters
-
[in] | p_usb | Pointer to a USB handle which contains the configuration information for the specified USB module. |
- Return values
-
◆ hal_usb_suspend_reg()
Suspend some registers related to USB configuration before sleep.
- Parameters
-
[in] | p_usb | Pointer to a USB handle which contains the configuration information for the specified USB module. |
- Return values
-