我用stc89c55rd和ch375b搭建了硬件平台,在一开始ch375b初始化没有问题,今天突然不能初始化了,在执行CH375Libinit()函数时,返回0xff,说是版本太低,这个问题要怎么解决啊?谢谢各位高手了~
下面是初始化函数代码
/* 初始化函数 输入:无 输出:uint8 状态 功能:CH375,准备U盘读写. */ uint8 InitAll(void) { uint8 state;
delaymS(500); // CH375Reset(); delaymS(200); LED1 = 0;//LED灯亮
state = CH375LibInit(); if(state == ERR_SUCCESS) { LED2 = 0; state = CH375DiskConnect(); while(state != ERR_SUCCESS) { delaymS(30); state = CH375DiskConnect(); } LED3 = 0; state = CH375DiskReady(); if(state == ERR_SUCCESS) { LED1 = 1; LED2 = 1; return 1; } } return 0; }