public bool XferToSD() { UInt16[] tempBuffer = new UInt16[bufferSize]; while (!storage.eof()) { if (storage.Read(tempBuffer, (ushort)bufferSize)) { if (!removableStorage.Write(tempBuffer, (ushort)bufferSize)) { Debug.Print("XferToSD : Write to SD Card failed \n"); return(false); } } else { Debug.Print("XferToSD : Read from NOR failed \n"); return(false); } //System.Threading.Thread.Sleep(20); } return(true); }
public bool Persist(PersistentStorage storage) { lock (bufferLock) { if (!storage.Write(buffer, (ushort)buffer.Length)) { return(false); } bufferfull = false; } return(true); }