You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
我参考力创开源的硬件资料, 用 stm32 和移位寄存器自己画了一个 16 键的键盘。改了下代码,就是把按键数量,led 数量改为 16 个, 烧录到机器里现象是,灯效和按键不能同时使用。如果开了灯效,hid 报告是错误的,就导致按键功能没有。我把 main.cpp while 循环里的代码注释掉, 按键功能就都正常了。
我用 bus hound capture 看, 不开灯效时,按下抬起就两个事件, log 如下:
Device Phase Data Description Cmd.Phase.Ofs(rep)
35.1 IN 01 00 10 00 00 00 00 00 ........ 2103.1.0(95)
35.1 IN 01 00 00 00 00 00 00 00 ........ 2198.1.0(9129)
开启灯效时,按下时会报下面一堆事件,抬起时没有:
Device Phase Data Description Cmd.Phase.Ofs(rep)
35.1 IN 01 00 00 00 00 00 00 00 ........ 1.1.0(1220)
35.1 IN 01 00 02 00 00 00 00 00 ........ 1221.1.0
35.1 IN 01 00 01 00 00 00 00 00 ........ 1222.1.0
35.1 IN 01 00 02 00 00 00 00 00 ........ 1223.1.0(3)
35.1 IN 01 00 01 00 00 00 00 00 ........ 1226.1.0
35.1 IN 01 00 02 00 00 00 00 00 ........ 1227.1.0(3)
35.1 IN 01 00 01 00 00 00 00 00 ........ 1230.1.0
35.1 IN 01 00 02 00 00 00 00 00 ........ 1231.1.0(3)
35.1 IN 01 00 01 00 00 00 00 00 ........ 1234.1.0
35.1 IN 01 00 02 00 00 00 00 00 ........ 1235.1.0(3)
35.1 IN 01 00 01 00 00 00 00 00 ........ 1238.1.0
35.1 IN 01 00 02 00 00 00 00 00 ........ 1239.1.0(3)
35.1 IN 01 00 01 00 00 00 00 00 ........ 1242.1.0
35.1 IN 01 00 02 00 00 00 00 00 ........ 1243.1.0(3)
35.1 IN 01 00 01 00 00 00 00 00 ........ 1246.1.0
35.1 IN 01 00 02 00 00 00 00 00 ........ 1247.1.0(3)
35.1 IN 01 00 01 00 00 00 00 00 ........ 1250.1.0
35.1 IN 01 00 02 00 00 00 00 00 ........ 1251.1.0(20)
35.1 IN 01 00 01 00 00 00 00 00 ........ 1271.1.0
35.1 IN 01 00 02 00 00 00 00 00 ........ 1272.1.0(4)
35.1 IN 01 00 01 00 00 00 00 00 ........ 1276.1.0
35.1 IN 01 00 02 00 00 00 00 00 ........ 1277.1.0(12)
35.1 IN 01 00 01 00 00 00 00 00 ........ 1289.1.0
35.1 IN 01 00 02 00 00 00 00 00 ........ 1290.1.0(4)
35.1 IN 01 00 01 00 00 00 00 00 ........ 1294.1.0
35.1 IN 01 00 02 00 00 00 00 00 ........ 1295.1.0(4)
35.1 IN 01 00 01 00 00 00 00 00 ........ 1299.1.0
35.1 IN 01 00 02 00 00 00 00 00 ........ 1300.1.0(4)
35.1 IN 01 00 01 00 00 00 00 00 ........ 1304.1.0
35.1 IN 01 00 02 00 00 00 00 00 ........ 1305.1.0(4)
35.1 IN 01 00 01 00 00 00 00 00 ........ 1309.1.0
好像循环发送了十多遍的样子, 代码看不太明白。请问这个问题可能是哪里的原因造成的?
Beta Was this translation helpful? Give feedback.
All reactions