SparkFun USB-Host-Shield

USB Host Shield 2.0 Library from Circuits@Home

The SparkFun USB Host Shield has additional connected Reset and GPX from the MAX3421E to the Arduino pins 7 and 8. For a correct function of the USB Host Shield 2.0 Library you have to initialize these pins in setup() before using the library.

//Revision 1.2 (DEV-09628)
#define MAX_RESET 8 //MAX3421E pin 12
#define MAX_GPX   7 //MAX3421E pin 17
//Revision 1.3 (DEV-09947)
#define MAX_RESET 7 //MAX3421E pin 12
#define MAX_GPX   8 //MAX3421E pin 17

void setup()
  pinMode(MAX_GPX, INPUT);
  digitalWrite(MAX_RESET, LOW);
  delay(20); //wait 20ms
  digitalWrite(MAX_RESET, HIGH);
  delay(20); //wait 20ms

  if(Usb.Init() == -1)
    //Serial.println("OSC did not start.");