Use pin definition in avrpins.h to set MAX_RESET pin on Arduino ADK

This commit is contained in:
Kristian Sloth Lauszus 2013-10-21 02:17:47 +02:00
parent 6752a52b82
commit 82c52542cc
2 changed files with 7 additions and 4 deletions

View file

@ -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

View file

@ -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
};