mirror of
https://github.com/felis/USB_Host_Shield_2.0.git
synced 2024-03-22 11:31:26 +01:00
- Added support for Arduino Mega ADK board.
This commit is contained in:
parent
452fee3d61
commit
5daa359bd3
2 changed files with 7 additions and 2 deletions
5
Usb.h
5
Usb.h
|
@ -50,7 +50,8 @@ e-mail : support@circuitsathome.com
|
||||||
#ifdef BOARD_BLACK_WIDDOW
|
#ifdef BOARD_BLACK_WIDDOW
|
||||||
typedef MAX3421e<P6, P3> MAX3421E; // Black Widow
|
typedef MAX3421e<P6, P3> MAX3421E; // Black Widow
|
||||||
#else
|
#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
|
#endif
|
||||||
|
|
||||||
//Debug macros. In 1.0 it is possible to move strings to PROGMEM by defining USBTRACE (Serial.print(F(s)))
|
//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 // defined(USB_METHODS_INLINE)
|
||||||
|
|
||||||
#endif //_usb_h_
|
#endif //_usb_h_
|
||||||
|
|
|
@ -86,6 +86,10 @@ MAX3421e< SS, INTR >::MAX3421e()
|
||||||
SS::Set();
|
SS::Set();
|
||||||
spi::init();
|
spi::init();
|
||||||
INTR::SetDirRead();
|
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 */
|
/* MAX3421E - full-duplex SPI, level interrupt */
|
||||||
regWr( rPINCTL,( bmFDUPSPI + bmINTLEVEL ));
|
regWr( rPINCTL,( bmFDUPSPI + bmINTLEVEL ));
|
||||||
|
|
Loading…
Reference in a new issue