   return ret;
 }
 
-static FatFile writeFile;
+static SdFile writeFile;
 
 static void appendData(const String& data) {
-  if (writeFile.write(data.c_str(), data.length()) == (int)data.length())
+  if (writeFile.write(data.c_str(), data.length()) == data.length())
     Serial.println("AP:OK");
   else
     Serial.println("AP:NAK");

static bool hold = false;
static bool finished = false;

static FatFile tasFile;

//static unsigned int progressPos = 0;
static unsigned long numFrames = 0, curFrame = 0;

#include <SdFatConfig.h>
#include <MinimumSerial.h>
#include <SdFat.h>
#include <DMAChannel.h>
#include <EEPROM.h>

