Merge branch 'xxxajk'

This commit is contained in:
Kristian Lauszus 2014-03-06 21:48:54 +01:00
commit 0378d35ee8
3 changed files with 19 additions and 3 deletions

View file

@ -18,7 +18,11 @@
#ifdef BOARD_BLACK_WIDDOW #ifdef BOARD_BLACK_WIDDOW
typedef MAX3421e<P6, P3> MAX3421E; // Black Widow typedef MAX3421e<P6, P3> MAX3421E; // Black Widow
#elif defined(CORE_TEENSY) && (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__)) #elif defined(CORE_TEENSY) && (defined(__AVR_AT90USB646__) || defined(__AVR_AT90USB1286__))
#if EXT_RAM
typedef MAX3421e<P20, P7> MAX3421E; // Teensy++ 2.0 with XMEM2
#else
typedef MAX3421e<P9, P8> MAX3421E; // Teensy++ 1.0 and 2.0 typedef MAX3421e<P9, P8> MAX3421E; // Teensy++ 1.0 and 2.0
#endif
#elif defined(BOARD_MEGA_ADK) #elif defined(BOARD_MEGA_ADK)
typedef MAX3421e<P53, P54> MAX3421E; // Arduino Mega ADK typedef MAX3421e<P53, P54> MAX3421E; // Arduino Mega ADK
#elif defined(ARDUINO_AVR_BALANDUINO) #elif defined(ARDUINO_AVR_BALANDUINO)

View file

@ -503,7 +503,7 @@ void loop() {
if (isfat(parts[cpart].type)) { if (isfat(parts[cpart].type)) {
Fats[cpart] = new PFAT(&sto[i], cpart, parts[cpart].firstSector); Fats[cpart] = new PFAT(&sto[i], cpart, parts[cpart].firstSector);
//int r = Fats[cpart]->Good(); //int r = Fats[cpart]->Good();
if (Fats[cpart]->Good()) { if (Fats[cpart]->MountStatus()) {
delete Fats[cpart]; delete Fats[cpart];
Fats[cpart] = NULL; Fats[cpart] = NULL;
} else cpart++; } else cpart++;
@ -514,7 +514,7 @@ void loop() {
// try superblock // try superblock
Fats[cpart] = new PFAT(&sto[i], cpart, 0); Fats[cpart] = new PFAT(&sto[i], cpart, 0);
//int r = Fats[cpart]->Good(); //int r = Fats[cpart]->Good();
if (Fats[cpart]->Good()) { if (Fats[cpart]->MountStatus()) {
//printf_P(PSTR("Superblock error %x\r\n"), r); //printf_P(PSTR("Superblock error %x\r\n"), r);
delete Fats[cpart]; delete Fats[cpart];
Fats[cpart] = NULL; Fats[cpart] = NULL;

View file

@ -102,12 +102,24 @@
#define WIICAMERA #define WIICAMERA
#endif #endif
#if USE_XMEM_SPI_LOCK | defined(USE_MULTIPLE_APP_API) // To use some other locking (e.g. freertos),
// define XMEM_ACQUIRE_SPI and XMEM_RELEASE_SPI to point to your lock and unlock.
// NOTE: NO argument is passed. You have to do this within your routine for
// whatever you are using to lock and unlock.
#if !defined(XMEM_ACQUIRE_SPI)
#if USE_XMEM_SPI_LOCK || defined(USE_MULTIPLE_APP_API)
#include <xmem.h> #include <xmem.h>
#else #else
#define XMEM_ACQUIRE_SPI() (void(0)) #define XMEM_ACQUIRE_SPI() (void(0))
#define XMEM_RELEASE_SPI() (void(0)) #define XMEM_RELEASE_SPI() (void(0))
#endif #endif
#endif
#if !defined(EXT_RAM) && defined(EXT_RAM_STACK) || defined(EXT_RAM_HEAP)
#include <xmem.h>
#else
#define EXT_RAM 0
#endif
#if defined(CORE_TEENSY) && (defined(__MK20DX128__) || defined(__MK20DX256__)) #if defined(CORE_TEENSY) && (defined(__MK20DX128__) || defined(__MK20DX256__))
#define USING_SPI4TEENSY3 USE_SPI4TEENSY3 #define USING_SPI4TEENSY3 USE_SPI4TEENSY3