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_*掩码。

posted on   lydstory  阅读(36)  评论(0编辑  收藏  举报

相关博文:
阅读排行:
· 震惊!C++程序真的从main开始吗?99%的程序员都答错了
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
· 【硬核科普】Trae如何「偷看」你的代码?零基础破解AI编程运行原理
· 上周热点回顾(3.3-3.9)

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

统计

点击右上角即可分享
微信分享提示