我用了在論壇上面官方放出來的編程,現(xiàn)在卡在了
chip-id:0xff
wait connect...
CH375B模塊插鍵盤上去只會(huì)重復(fù)報(bào)告這一段,是哪里出了問題呢?是375B模塊問題還是說代碼?重復(fù)插拔鍵盤只會(huì)一直重復(fù)這一段
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 ); ?/*設(shè)置USB主機(jī)模式,如果設(shè)備端是CH37X,那么5和6均可?*/
printf("wait connect...\n");
while(1)
{
while ( wait_interrupt()!=USB_INT_CONNECT ); ?/* 等待設(shè)備端連接上來 */
delayms(200); ? ? ? ? ? ? ? ? ? ?/* 等待連接穩(wěn)定?*/