請(qǐng)教CH376S狀態(tài)碼

我的CH376S初始化正常,U盤的連接和斷開也正常,但在連接之后,向CH376S發(fā)出CMD_DISK_MOUNT命令后,收到status值為0X22,資料上沒有這個(gè)值,不知怎么處理,請(qǐng)指教,謝謝! 我的中斷程序如下:

void ch376_int_trans() { unsigned char status,i,len; ch376_begin(); ch376_write_byte(CMD01_GET_STATUS); status = ch376_read_byte(); ch376_end(); sprintf(str,"ch376 status:[%d][0x%2x] ",status,status); rs485_write_str(str); switch(status) { case USB_INT_USB_SUSPEND: rs485_write_str((unsigned char*)"usb suspend\x0d\x0a"); break; case USB_INT_WAKE_UP: rs485_write_str((unsigned char*)"usb wake up\x0d\x0a"); break; case USB_INT_EP2_OUT: //端點(diǎn)2下傳成功中斷 rs485_write_str((unsigned char*)"usb ep2 out\x0d\x0a"); break; case USB_INT_EP1_OUT: //端點(diǎn)1下傳成功中斷 rs485_write_str((unsigned char*)"usb ep1 out\x0d\x0a"); break; case USB_INT_EP1_IN: //端點(diǎn)1上傳成功中斷 rs485_write_str((unsigned char*)"usb ep1 in\x0d\x0a"); break; case USB_INT_EP2_IN: //端點(diǎn)2上傳成功中斷 rs485_write_str((unsigned char*)"usb ep2 in\x0d\x0a"); break; case USB_INT_SUCCESS: rs485_write_str((unsigned char*)"usb success\x0d\x0a"); break; case USB_INT_CONNECT: rs485_write_str((unsigned char*)"usb connect\x0d\x0a"); ch376_status.connected = 1; PostMessage(&msg_ch376_disk_mount); break; case USB_INT_DISCONNECT: rs485_write_str((unsigned char*)"usb disconnect\x0d\x0a"); ch376_status.connected = 0; break; case USB_INT_BUF_OVER: rs485_write_str((unsigned char*)"usb buf over\x0d\x0a"); break; case USB_INT_USB_READY: rs485_write_str((unsigned char*)"usb ready\x0d\x0a"); break; case USB_INT_DISK_READ: rs485_write_str((unsigned char*)"usb disk read\x0d\x0a"); break; case USB_INT_DISK_WRITE: rs485_write_str((unsigned char*)"usb disk write\x0d\x0a"); break; case USB_INT_DISK_ERR: rs485_write_str((unsigned char*)"usb disk error\x0d\x0a"); break; default: rs485_write_str((unsigned char*)"unknown state\x0d\x0a"); break; } }

您是想操作U盤?感覺您用的例程不對(duì)啊,上面有些是設(shè)備的中斷狀態(tài)啊,建議您參考這里面操作U盤的例程---http://wch.cn/download/list.asp?id=126


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

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