欧美极品高清xxxxhd,国产日产欧美最新,无码AV国产东京热AV无码,国产精品人与动性XXX,国产传媒亚洲综合一区二区,四库影院永久国产精品,毛片免费免费高清视频,福利所导航夜趣136

標題: PS2鼠標發數據包給主機,那么每一字節數據之間是有間隔一小段時間嗎? [打印本頁]

作者: Cmz@    時間: 2020-6-11 20:55
標題: PS2鼠標發數據包給主機,那么每一字節數據之間是有間隔一小段時間嗎?
ps2鼠標發數據包給主機,假設數據包為3個字節,那么發送每一個字節之間是有一小段時間間隔的嗎?還是說字節數據是連續發的?因為考慮到主機每收到一字節可能要執行某些操作、調用某些函數。如果字節數據是連續發的,那么就沒法調用函數,執行某些操作。比如下面函數
void data_analyse(void)
{
        //將收到的11位信號中截取8位數據放進mouse_byte
        mouse_byte_bit0=mouse_buffer[1];
        mouse_byte_bit1=mouse_buffer[2];
        mouse_byte_bit2=mouse_buffer[3];
        mouse_byte_bit3=mouse_buffer[4];
        mouse_byte_bit4=mouse_buffer[5];
        mouse_byte_bit5=mouse_buffer[6];
        mouse_byte_bit6=mouse_buffer[7];
        mouse_byte_bit7=mouse_buffer[8];       
        if(Checkout())//如果校驗正確
        {
                if(mouse_data_bit<3)         
                        mouse_data[mouse_data_bit++]=mouse_byte;
        每收到一字節數據就把數據賦值給mouse_byte。按推理來說,字節數據應該不是連續發的,應該是有一小段時間間隔才對。








歡迎光臨 (http://m.raoushi.com/bbs/) Powered by Discuz! X3.1