应用程序:仅供参考 int usb_fd = 0; char * DeviceName = "/dev/gliethttp_flash0"; //#define USBDEBUG #ifdef USBDEBUG int dbg_level = 1; #define usb_dbg(args...) \ do { \ printf(args); \ }while(0) #else int dbg_level = 0; #define usb_dbg(args...) \ do { \ }while(0) #endif void dbg_usbStatus(WTPSTATUS *WtpStatus) { #ifdef USBDEBUG int i; if (WtpStatus->DLEN > 0) { for (i=0; i< WtpStatus->DLEN; i++) printf("data 0x%2x-----", WtpStatus->Data[i]); } printf ("\n"); printf ("CMD 0x%2x-----", WtpStatus->CMD); printf ("SEQ 0x%2x-----", WtpStatus->SEQ); printf ("CID 0x%2x-----", WtpStatus->CID); printf ("Status 0x%2x----- ", WtpStatus->Status); printf ("Flags 0x%2x-----", WtpStatus->Flags); printf ("DLEN 0x%2x-----", WtpStatus->DLEN); printf ("\n"); #endif } |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |