unsigned char temp=0; // unsigned char tmp[] = "Hello USB!\n"; // int i; mInitCH376Host(); printf("CH376芯片读写测试!\n"); xWriteCH376Cmd(CMD01_GET_IC_VER); temp=xReadCH376Data()-0x80; printf("固件版本号为:0x %x\n",temp); xWriteCH376Cmd(CMD11_CHECK_EXIST); xWriteCH376Data(0xaa); temp = xReadCH376Data(); if(temp == 0x55) { printf("测试工作状态:成功!\n"); } else { printf("测试工作状态:失败\n"); }
用上段程序测试结果 CH376芯片读写测试! 固件版本号为:0x c4 测试工作状态:成功!
unsigned s; mInitCH376Host(); s = CH376DiskConnect(); while ( CH376DiskConnect( ) != USB_INT_SUCCESS ) { usleep( 100000 ); } usleep( 200000 ); for(s=0;s<10;s++) { usleep(50000); printf("ready?\n"); if(CH376DiskMount( )==USB_INT_SUCCESS) break; }
s=CH376DirCreate("/LI"); printf("%x",s); s=CH376FileClose(FALSE); printf("%x",s); while(1); return 0;
但是我用这段程序却不能创建文件夹,程序有什么问题吗?