ch579 藍牙鼠標問題

在ch579藍牙鼠標的例子中,模擬不了雙擊,不知道是怎么回事,求解

一個雙擊事件是:

????按下->彈起, ->再按下->再彈起的過程,

?換句話說, 你需要最起碼發(fā)送4次,才能讓操作系統(tǒng)識別為你是雙擊

把官網(wǎng)的sdk 的ble mouse 的對應(yīng)的這個event的代碼這樣寫,就可以實現(xiàn)雙擊了

(注意wch 的ble是查詢實現(xiàn)的, 是不能有阻塞操作的)

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
if ( events & START_REPORT_EVT )
{
??????static uint8_t report_state =0;
??????switch(report_state) {
??????????case 0:
??????????????PRINT("report_1st press\r\n");
??????????????hidEmuSendMouseReport( 0x01 , 0 , 0 );
??????????????break;
??????????case 1:
??????????????PRINT("report_1st release\r\n");
??????????????hidEmuSendMouseReport( 0x00 , 0 , 0 );
??????????????break;
??????????case 10:
??????????????PRINT("report_2nd press\r\n");
??????????????hidEmuSendMouseReport( 0x01 , 0 , 0 );
??????????????break;
??????????case 11:
??????????????PRINT("report_2nd release\r\n");
??????????????hidEmuSendMouseReport( 0x00 , 0 , 0 );
??????????????break;
??????????default:
??????????????break;
??????}?
??????report_state ++;
??????tmos_start_task( hidEmuTaskId, START_REPORT_EVT, 16 );
??????return ( events ^ START_REPORT_EVT );
??}




只有登錄才能回復(fù),可以選擇微信賬號登錄

国产91精品新入口,国产成人综合网在线播放,九热这里只有精品,本道在线观看,美女视频a美女视频,韩国美女激情视频,日本美女pvp视频