??? 11/16/09 05:12 Read: times |
#170856 - Help,about Pdiusbd12 |
write(0x00,1); //select
write(0xf1,1); //f1:Ack c in write(0x01,1); //01:Select End1 write(0xf1,1); //ack c out USART_Transmit(0xA1); write(0x80,1);//80:Read Endpoint Status tmp = read(); USART_Transmit(tmp); USART_Transmit(0xA2); write(0x40,1); //read last transaction status tmp = read(); USART_Transmit(tmp); write(0x00,1); //select read(); write(0xf0,1); read(); tmp = read(); lastsetup[0] = read();//first bit lastsetup[1] = read(); lastsetup[2] = read(); lastsetup[3] = read(); lastsetup[4] = read(); lastsetup[5] = read(); lastsetup[6] = read(); lastsetup[7] = read(); USART_Transmit(tmp); for(i=0;i<8;i++) USART_Transmit(lastsetup[i]); //if(lastsetup[1]==6)PORTB++; write(0xf2,1); //F2:Clear buffer USART_Transmit(0xA3); write(0x80,1);//80:Read Endpoint Status tmp = read(); USART_Transmit(tmp); USART_Transmit(0xA4); write(0x81,1);//80:Read Endpoint Status tmp = read(); USART_Transmit(tmp); write(0x01,1); //select c in read(); write(0xf0,1); //write buffer write(0x00,0); //reserved write(0x10,0); //size //Data start for (i=0;i<16;i++) { write(descriptor[i],0); } write(0xFA,1); //validate buffer I received GET_DESCRIPTOR and manage it like above.The question is that I do not receive CONTROL_IN but BUS_RESET next,and the device failed to be enumerated.It seems that the PDIUSBD12 have'nt return ack to the host?What should I do? |
Topic | Author | Date |
Help,about Pdiusbd12 | 01/01/70 00:00 | |
How to post legible source code | 01/01/70 00:00 | |
reply | 01/01/70 00:00 | |
Wrong family | 01/01/70 00:00 | |
Why not use...![]() | 01/01/70 00:00 |