i edit the bulkloop firmware,and edit the td_init() function as follows,but when i use cyconsole to see the pipe info,it shows
"pipe: 0 type:blk endpoint : 1 out maxpktsize:0x40
pipe:1 type:blk endpoint: 1 IN .................................
pipe:2 type:blk endpoint:2 OUT mxpktsize:0x200"
i just active ep2,but it seems that the result is not as i config.
does anywhere else need to be edited??????
p.s . : the firmware before i edit, config the ep1in ep1out and ep2.
void TD_Init(void)
{
CPUCS = ((CPUCS & ~bmCLKSPD) | bmCLKSPD1) ;
IFCONFIG = 0xeb;
EP1OUTCFG = 0x00;
SYNCDELAY;
EP1INCFG = 0x00;
SYNCDELAY;
EP2CFG = 0xA2;
SYNCDELAY;
EP4CFG = 0x00;
EP6CFG = 0x00;
SYNCDELAY;
EP8CFG = 0x00;
SYNCDELAY;
// reset all FIFOs
FIFORESET = 0x80;
SYNCDELAY; // see TRM section 15.14
FIFORESET = 0x02;
SYNCDELAY;
FIFORESET = 0x00;
// deactivate NAK-ALL
SYNCDELAY;
EP2FIFOCFG = 0x11;
SYNCDELAY;
EP2FIFOBCH = 0x10;
SYNCDELAY;
EP2FIFOBCL = 0x00;
SYNCDELAY;
PINFLAGSAB = 0x00;
SYNCDELAY;
PINFLAGSCD = 0x00;
SYNCDELAY;
SYNCDELAY;
EP2BCL = 0x80;
SYNCDELAY;
EP2BCL = 0x80;
SYNCDELAY;
Rwuen = TRUE; // Enable remote-wakeup
}
|