From 5ddbce77d219fa4e672c3e4210c291271422a4cf Mon Sep 17 00:00:00 2001 From: Oleg Mazurov Date: Tue, 18 Jan 2011 19:31:24 -0700 Subject: [PATCH] Reset bug fix for rev.1.xx shields --- newusb.pde | 3 ++- usbhost.h | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/newusb.pde b/newusb.pde index 06ce5195..6091af19 100644 --- a/newusb.pde +++ b/newusb.pde @@ -7,7 +7,8 @@ MAX3421e Max; void setup() { Serial.begin( 115200 ); Serial.println("\r\nStart"); - if ( Max.reset() == -1 ) { + + if ( Max.init() == -1 ) { Serial.println("OSCOKIRQ failed to assert"); while(1); } diff --git a/usbhost.h b/usbhost.h index b66c4aa9..4ad25de6 100644 --- a/usbhost.h +++ b/usbhost.h @@ -55,6 +55,11 @@ MAX3421e< SS, INTR >::MAX3421e() /* pin and peripheral setup */ SS::SetDirWrite(); SS::Set(); + /**/ + /* For shield rev.1.xx uncomment following two lines */ + P7::SetDirWrite(); + P7::Set(); + /**/ spi::init(); INTR::SetDirRead(); /* MAX3421E - full-duplex SPI, level interrupt */ @@ -167,4 +172,4 @@ int8_t MAX3421e< SS, INTR >::init() return( 0 ); } -#endif //_USBHOST_H_ +#endif //_USBHOST_H_