Skip to content

Commit 0378d35

Browse files
committed
Merge branch 'xxxajk'
2 parents bb9fef0 + 7e826ab commit 0378d35

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

UsbCore.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@
1818
#ifdef BOARD_BLACK_WIDDOW
1919
typedef MAX3421e<P6, P3> MAX3421E; // Black Widow
2020
#elif defined(CORE_TEENSY) && (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__))
21+
#if EXT_RAM
22+
typedef MAX3421e<P20, P7> MAX3421E; // Teensy++ 2.0 with XMEM2
23+
#else
2124
typedef MAX3421e<P9, P8> MAX3421E; // Teensy++ 1.0 and 2.0
25+
#endif
2226
#elif defined(BOARD_MEGA_ADK)
2327
typedef MAX3421e<P53, P54> MAX3421E; // Arduino Mega ADK
2428
#elif defined(ARDUINO_AVR_BALANDUINO)

examples/testusbhostFAT/testusbhostFAT.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ void loop() {
503503
if (isfat(parts[cpart].type)) {
504504
Fats[cpart] = new PFAT(&sto[i], cpart, parts[cpart].firstSector);
505505
//int r = Fats[cpart]->Good();
506-
if (Fats[cpart]->Good()) {
506+
if (Fats[cpart]->MountStatus()) {
507507
delete Fats[cpart];
508508
Fats[cpart] = NULL;
509509
} else cpart++;
@@ -514,7 +514,7 @@ void loop() {
514514
// try superblock
515515
Fats[cpart] = new PFAT(&sto[i], cpart, 0);
516516
//int r = Fats[cpart]->Good();
517-
if (Fats[cpart]->Good()) {
517+
if (Fats[cpart]->MountStatus()) {
518518
//printf_P(PSTR("Superblock error %x\r\n"), r);
519519
delete Fats[cpart];
520520
Fats[cpart] = NULL;

settings.h

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,12 +102,24 @@
102102
#define WIICAMERA
103103
#endif
104104

105-
#if USE_XMEM_SPI_LOCK | defined(USE_MULTIPLE_APP_API)
105+
// To use some other locking (e.g. freertos),
106+
// define XMEM_ACQUIRE_SPI and XMEM_RELEASE_SPI to point to your lock and unlock.
107+
// NOTE: NO argument is passed. You have to do this within your routine for
108+
// whatever you are using to lock and unlock.
109+
#if !defined(XMEM_ACQUIRE_SPI)
110+
#if USE_XMEM_SPI_LOCK || defined(USE_MULTIPLE_APP_API)
106111
#include <xmem.h>
107112
#else
108113
#define XMEM_ACQUIRE_SPI() (void(0))
109114
#define XMEM_RELEASE_SPI() (void(0))
110115
#endif
116+
#endif
117+
118+
#if !defined(EXT_RAM) && defined(EXT_RAM_STACK) || defined(EXT_RAM_HEAP)
119+
#include <xmem.h>
120+
#else
121+
#define EXT_RAM 0
122+
#endif
111123

112124
#if defined(CORE_TEENSY) && (defined(__MK20DX128__) || defined(__MK20DX256__))
113125
#define USING_SPI4TEENSY3 USE_SPI4TEENSY3

0 commit comments

Comments
 (0)