📄 usb_suspend.h
字号:
#ifndef USB_SUSPEND_H
#define USB_SUSPEND_H
/** \addtogroup module_usb_suspend USB Suspend (usbsusp)
* \brief This module contains the functionality for USB suspend, USB resume and USB remote wakeup.
*
* To comply with the USB specification some care must be taken when implementing this functionality, please follow the explanation below carefully.
*
* \section usb_suspend_resume To implement the USB suspend and USB resume:
* \li Make sure that the 48 MHz XOSC is never turned off anywhere in the application.
* \li In the main loop, add the code shown below. Make sure that the code below is run at least every 10 ms.
* If the main loop use longer than 10 ms to complete one round, the code must be inserted multiple places. \n
* Do NOT insert this code into any interrupt service routine.
* \code
* // Handle USB suspend
* if (USBIRQ_GET_EVENT_MASK() & USBIRQ_EVENT_SUSPEND) {
*
* USBIRQ_CLEAR_EVENTS(USBIRQ_EVENT_SUSPEND);// Clear USB suspend interrupt
* //
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -