void USB_Init(uint8_t corenum, uint8_t mode);
/* Function Prototypes: */
/** Main function to initialize and start the USB interface. Once active, the USB interface will
* allow for device connection to a host when in device mode, or for device enumeration while in
* host mode.
*
* As the USB library relies on interrupts for the device and host mode enumeration processes,
* the user must enable global interrupts before or shortly after this function is called. In
* device mode, interrupts must be enabled within 500ms of this function being called to ensure
* that the host does not time out whilst enumerating the device. In host mode, interrupts may be
* enabled at the application's leisure however enumeration will not begin of an attached device
* until after this has occurred.
*
* Calling this function when the USB interface is already initialized will cause a complete USB
* interface reset and re-enumeration.
*
* \see @ref Group_Device for the \c USB_DEVICE_OPT_* masks.
/*函数原型: */
/**主功能,可初始化和启动USB接口。一旦激活,USB接口就会启动
*允许在设备模式下将设备连接到主机,或在设备模式下进行设备枚举
*主机模式。
*
*由于USB库依赖于设备和主机模式枚举进程的中断,
*用户必须在调用此函数之前或之后不久启用全局中断。在
*设备模式,中断必须在500 ms内启用,以确保
*主机在枚举设备时没有超时。在主机模式下,中断可能是
*在应用程序空闲时启用,但枚举不会开始附加设备
*直到这一切发生之后。
*
*当USB接口已经初始化时,调用此功能将导致一个完整的USB
*接口重置和重新枚举。
*
*\参见@refGrece_USB_DEVICE_OPT_*掩码。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)