在Max3421e.cpp 修改:
boolean MAX3421E::reset(){
regWr( rUSBCTL, bmCHIPRES ); //Chip reset. This stops the oscillator
regWr( rUSBCTL, 0×00 ); //Remove the reset
while(!(regRd( rUSBIRQ ) & bmOSCOKIRQ )) { //wait until the PLL is stable
tmp++; //timeout after 256 attempts
if( tmp == 0 ) {
return( false );
}
}
return( true );
}
改成:
boolean MAX3421E::reset()
{
regWr( rUSBCTL, bmCHIPRES );
regWr( rUSBCTL, 0×00 );
while (!(regRd(rUSBIRQ) & bmOSCOKIRQ));
}
還不行就用我的吧:UsbHost
No comments:
Post a Comment