- Added support for Arduino Mega ADK board.

This commit is contained in:
Ilya Bakulin 2012-01-23 05:32:51 +04:00
parent 452fee3d61
commit 5daa359bd3
2 changed files with 7 additions and 2 deletions

5
Usb.h
View file

@ -50,7 +50,8 @@ e-mail : support@circuitsathome.com
#ifdef BOARD_BLACK_WIDDOW
typedef MAX3421e<P6, P3> MAX3421E; // Black Widow
#else
typedef MAX3421e<P10, P9> MAX3421E; // Official Arduinos (UNO, Duemilanove, Mega, 2560
//typedef MAX3421e<P10, P9> MAX3421E; // Official Arduinos (UNO, Duemilanove, Mega, 2560
typedef MAX3421e<P53, Pe6> MAX3421E; // Arduino Mega ADK
#endif
//Debug macros. In 1.0 it is possible to move strings to PROGMEM by defining USBTRACE (Serial.print(F(s)))
@ -272,4 +273,4 @@ inline uint8_t USB::setConf( uint8_t addr, uint8_t ep, uint8_t conf_value )
#endif // defined(USB_METHODS_INLINE)
#endif //_usb_h_
#endif //_usb_h_

View file

@ -86,6 +86,10 @@ MAX3421e< SS, INTR >::MAX3421e()
SS::Set();
spi::init();
INTR::SetDirRead();
/* For Mega ADK, which has Max3421e on-board, set MAX_RESET to Output mode, and pull Reset to HIGH */
DDRJ |= 0x04;
PORTJ |= 0x04;
/* MAX3421E - full-duplex SPI, level interrupt */
regWr( rPINCTL,( bmFDUPSPI + bmINTLEVEL ));