From 11a93eb06a74ed299c9bb72b02b155d8990778c7 Mon Sep 17 00:00:00 2001 From: "Andrew J. Kroll" Date: Sat, 22 Feb 2014 12:52:57 -0500 Subject: [PATCH] Teensy++2 support with xmem2 --- UsbCore.h | 4 ++++ avrpins.h | 3 ++- settings.h | 8 +++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/UsbCore.h b/UsbCore.h index 9a09d804..3ba0208a 100644 --- a/UsbCore.h +++ b/UsbCore.h @@ -18,7 +18,11 @@ #ifdef BOARD_BLACK_WIDDOW typedef MAX3421e MAX3421E; // Black Widow #elif defined(CORE_TEENSY) && (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)) +#if EXT_RAM +typedef MAX3421e MAX3421E; // Teensy++ 2.0 with XMEM2 +#else typedef MAX3421e MAX3421E; // Teensy++ 1.0 and 2.0 +#endif #elif defined(BOARD_MEGA_ADK) typedef MAX3421e MAX3421E; // Arduino Mega ADK #elif defined(ARDUINO_AVR_BALANDUINO) diff --git a/avrpins.h b/avrpins.h index ca83a8a9..c7e90af6 100644 --- a/avrpins.h +++ b/avrpins.h @@ -681,7 +681,8 @@ public: #define P8 Pa1 /* 8 - PA1 */ #define P9 Pa2 /* 9 - PA2 */ #define P10 Pa3 /* 10 - PA3 */ -#define P11 Pa4 /* 11 - PA4 */ +#define P11 Pa4 /* 11 digitalWrite(4, 0); + - PA4 */ #define P12 Pa5 /* 12 - PA5 */ #define P13 Pc1 /* 13 - PC1 */ #define P14 Pc0 /* 14 - PC0 */ diff --git a/settings.h b/settings.h index 424a5bcf..c6348aa8 100644 --- a/settings.h +++ b/settings.h @@ -103,13 +103,19 @@ #define WIICAMERA #endif -#if USE_XMEM_SPI_LOCK | defined(USE_MULTIPLE_APP_API) +#if USE_XMEM_SPI_LOCK || defined(USE_MULTIPLE_APP_API) #include #else #define XMEM_ACQUIRE_SPI() (void(0)) #define XMEM_RELEASE_SPI() (void(0)) #endif +#if !defined(EXT_RAM) && defined(EXT_RAM_STACK) || defined(EXT_RAM_HEAP) +#include +#else +#define EXT_RAM 0 +#endif + #if defined(__MK20DX128__) || defined(__MK20DX256__) #define USING_SPI4TEENSY3 USE_SPI4TEENSY3 #else