主要研究usb host的数据传送问题,里面有对 相关usb传送关系进行解析,并对 关键函数 : //first field ox21 is bin 00100001 which splits into 0 01 00001 for direction(1bit)/type(2b)/recipient(5b) //To set direction as 'host to Device' we need 0, To set type to HID we need 11 (3), and for
#define N 200 #include #include #include #define LEFT 0x4b00 #define RIGHT 0x4d00 #define DOWN 0x5000 #define UP 0x4800 #define ESC 0x011b int i,key; int score=0;/*得分*/ int gamespeed=50000;/*游戏速度自己调整*/ struct Food { int x;/*食物的横坐标*/ int y;/*食物的纵坐