Reset bug fix for rev.1.xx shields

This commit is contained in:
Oleg Mazurov 2011-01-18 19:31:24 -07:00
parent 9b8154f821
commit 5ddbce77d2
2 changed files with 8 additions and 2 deletions

View file

@ -7,7 +7,8 @@ MAX3421e<P10, P9> Max;
void setup() { void setup() {
Serial.begin( 115200 ); Serial.begin( 115200 );
Serial.println("\r\nStart"); Serial.println("\r\nStart");
if ( Max.reset() == -1 ) {
if ( Max.init() == -1 ) {
Serial.println("OSCOKIRQ failed to assert"); Serial.println("OSCOKIRQ failed to assert");
while(1); while(1);
} }

View file

@ -55,6 +55,11 @@ MAX3421e< SS, INTR >::MAX3421e()
/* pin and peripheral setup */ /* pin and peripheral setup */
SS::SetDirWrite(); SS::SetDirWrite();
SS::Set(); SS::Set();
/**/
/* For shield rev.1.xx uncomment following two lines */
P7::SetDirWrite();
P7::Set();
/**/
spi::init(); spi::init();
INTR::SetDirRead(); INTR::SetDirRead();
/* MAX3421E - full-duplex SPI, level interrupt */ /* MAX3421E - full-duplex SPI, level interrupt */
@ -167,4 +172,4 @@ int8_t MAX3421e< SS, INTR >::init()
return( 0 ); return( 0 );
} }
#endif //_USBHOST_H_ #endif //_USBHOST_H_