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 P52 Pb1
|
||||
#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 P55 Pj2 // MAX_RESET on Arduino ADK
|
||||
#endif
|
||||
|
||||
// "Mega" pin numbers
|
||||
|
||||
|
|
|
@ -95,10 +95,9 @@ template< typename SS, typename INTR >
|
|||
MAX3421e< SS, INTR >::MAX3421e() {
|
||||
// Leaving ADK hardware setup in here, for now. This really belongs with the other parts.
|
||||
#ifdef BOARD_MEGA_ADK
|
||||
/* For Mega ADK, which has Max3421e on-board, set MAX_RESET to Output mode, and pull Reset to HIGH */
|
||||
DDRJ |= _BV(PJ2);
|
||||
PORTJ &= ~_BV(PJ2);
|
||||
PORTJ |= _BV(PJ2);
|
||||
// For Mega ADK, which has a Max3421e on-board, set MAX_RESET to output mode, and then set it to HIGH
|
||||
P55::SetDirWrite();
|
||||
P55::Set();
|
||||
#endif
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue