mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Reset bug fix for rev.1.xx shields
This commit is contained in:
parent
9b8154f821
commit
5ddbce77d2
2 changed files with 8 additions and 2 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
|
@ -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_
|
||||||
|
|
Loading…
Reference in a new issue