BOOL DR_SetConfiguration(void) // Called when a Set Configuration command is received
{
if( EZUSB_HIGHSPEED() )
{ // FX2 enumerated at high speed
// SYNCDELAY; //
EP6AUTOINLENH = 0x02; // 0x02,set AUTOIN commit length to 512 bytes
SYNCDELAY; //
EP6AUTOINLENL = 0x00;
SYNCDELAY;
// enum_high_speed = TRUE;
}
else
{ // FX2 enumerated at full speed
// SYNCDELAY;
EP6AUTOINLENH = 0x00; // set AUTOIN commit length to 64 bytes
SYNCDELAY;
EP6AUTOINLENL = 0x40;
SYNCDELAY;
// enum_high_speed = FALSE;
}
Configuration = SETUPDAT[2];
return(TRUE); // Handled by user code
}
文章评论(0条评论)
登录后参与讨论