while(1) { //获取设备1的数据 s = get_int_in( Device_Atti.Device[0].tog,Device_Atti.Device[0].Device_endp);
//如果该设备是符合设备,则需要获取设备2的数据 if( Device_Atti.Device_compat ) { s = get_int_in( Device_Atti.Device[1].tog,Device_Atti.Device[1].Device_endp); } // if(s==0x04) led3=0;
//以下是检测设备插拔状态 CH376_WR_CMD_PORT(CMD01_TEST_CONNECT ); //检测设备插拔 s = CH376_RD_DAT_PORT( ); led1=0; led2=1; if(s == USB_INT_DISCONNECT ) { Device_Atti.Device_connect = 0; led1=1;led2=0; // Device_Atti = {0}; break; //设备断开 } } }
}文字[b]文字[/b]
红色部分是CH376做HOST接上键盘后,我通过串口软件可以看到俺”A“输出00 00 04 00 00 00 00 00,但是不知道这个 s = get_int_in(),变量s得到值是什么呢?因为我想接收s的值,并通过LCD显示出来,故求大侠告诉我下这个s变量到底是什么呀???感激不尽