peng-zhihui / HelloWord-Keyboard

GNU General Public License v3.0
6.03k stars 986 forks source link

USB Config Descriptor 中的问题 #145

Open BrianLChen opened 1 year ago

BrianLChen commented 1 year ago

在文件 “usbd_customhid.c” 中,146,205和264行。这把键盘的设计应该是使用USB总线供电,而非自供电,而且键盘带有远程唤醒。为什么这里的值是0xC0 (1100 0000)而不是0xA0 (1010 0000)。

根据定义,D6为供电方式标识,0为总线供电,1为自供电。D5为远程唤醒标识符,1为支持远程唤醒。