mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
Use pin definition in avrpins.h to set MAX_RESET pin on Arduino ADK
This commit is contained in:
parent
6752a52b82
commit
82c52542cc
2 changed files with 7 additions and 4 deletions
|
@ -510,7 +510,11 @@ public:
|
||||||
#define P51 Pb2
|
#define P51 Pb2
|
||||||
#define P52 Pb1
|
#define P52 Pb1
|
||||||
#define P53 Pb0
|
#define P53 Pb0
|
||||||
|
|
||||||
|
#ifdef BOARD_MEGA_ADK // These pins are not broken out on the Arduino ADK
|
||||||
#define P54 Pe6 // INT on Arduino ADK
|
#define P54 Pe6 // INT on Arduino ADK
|
||||||
|
#define P55 Pj2 // MAX_RESET on Arduino ADK
|
||||||
|
#endif
|
||||||
|
|
||||||
// "Mega" pin numbers
|
// "Mega" pin numbers
|
||||||
|
|
||||||
|
|
|
@ -95,10 +95,9 @@ template< typename SS, typename INTR >
|
||||||
MAX3421e< SS, INTR >::MAX3421e() {
|
MAX3421e< SS, INTR >::MAX3421e() {
|
||||||
// Leaving ADK hardware setup in here, for now. This really belongs with the other parts.
|
// Leaving ADK hardware setup in here, for now. This really belongs with the other parts.
|
||||||
#ifdef BOARD_MEGA_ADK
|
#ifdef BOARD_MEGA_ADK
|
||||||
/* For Mega ADK, which has Max3421e on-board, set MAX_RESET to Output mode, and pull Reset to HIGH */
|
// For Mega ADK, which has a Max3421e on-board, set MAX_RESET to output mode, and then set it to HIGH
|
||||||
DDRJ |= _BV(PJ2);
|
P55::SetDirWrite();
|
||||||
PORTJ &= ~_BV(PJ2);
|
P55::Set();
|
||||||
PORTJ |= _BV(PJ2);
|
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue