我用了在论坛上面官方放出来的编程,现在卡在了
chip-id:0xff
wait connect...
CH375B模块插键盘上去只会重复报告这一段,是哪里出了问题呢?是375B模块问题还是说代码?重复插拔键盘只会一直重复这一段
void main()
{
unsigned char i,s;
unsigned short len;
max_package = MAXSETUPPACK;
mInitSTDIO( );
s = read_id();
printf("chip-id:0x%02x\n",(unsigned short)s);
set_usb_mode( 5 ); /*设置USB主机模式,如果设备端是CH37X,那么5和6均可 */
printf("wait connect...\n");
while(1)
{
while ( wait_interrupt()!=USB_INT_CONNECT ); /* 等待设备端连接上来 */
delayms(200); /* 等待连接稳定 */