Mark Schwarzer / SDFileSystem_A8
Committer:
markschwarzer
Date:
Tue Nov 17 20:28:59 2020 +0000
Revision:
0:a9d72fcb5d03
logs gps data to SD card

Who changed what in which revision?

UserRevisionLine numberNew contents of line
markschwarzer 0:a9d72fcb5d03 1 /* mbed Microcontroller Library
markschwarzer 0:a9d72fcb5d03 2 * Copyright (c) 2006-2012 ARM Limited
markschwarzer 0:a9d72fcb5d03 3 *
markschwarzer 0:a9d72fcb5d03 4 * Permission is hereby granted, free of charge, to any person obtaining a copy
markschwarzer 0:a9d72fcb5d03 5 * of this software and associated documentation files (the "Software"), to deal
markschwarzer 0:a9d72fcb5d03 6 * in the Software without restriction, including without limitation the rights
markschwarzer 0:a9d72fcb5d03 7 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
markschwarzer 0:a9d72fcb5d03 8 * copies of the Software, and to permit persons to whom the Software is
markschwarzer 0:a9d72fcb5d03 9 * furnished to do so, subject to the following conditions:
markschwarzer 0:a9d72fcb5d03 10 *
markschwarzer 0:a9d72fcb5d03 11 * The above copyright notice and this permission notice shall be included in
markschwarzer 0:a9d72fcb5d03 12 * all copies or substantial portions of the Software.
markschwarzer 0:a9d72fcb5d03 13 *
markschwarzer 0:a9d72fcb5d03 14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
markschwarzer 0:a9d72fcb5d03 15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
markschwarzer 0:a9d72fcb5d03 16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
markschwarzer 0:a9d72fcb5d03 17 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
markschwarzer 0:a9d72fcb5d03 18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
markschwarzer 0:a9d72fcb5d03 19 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
markschwarzer 0:a9d72fcb5d03 20 * SOFTWARE.
markschwarzer 0:a9d72fcb5d03 21 */
markschwarzer 0:a9d72fcb5d03 22 #ifndef MBED_FATFILEHANDLE_H
markschwarzer 0:a9d72fcb5d03 23 #define MBED_FATFILEHANDLE_H
markschwarzer 0:a9d72fcb5d03 24
markschwarzer 0:a9d72fcb5d03 25 #include "FileHandle.h"
markschwarzer 0:a9d72fcb5d03 26
markschwarzer 0:a9d72fcb5d03 27 using namespace mbed;
markschwarzer 0:a9d72fcb5d03 28
markschwarzer 0:a9d72fcb5d03 29 class FATFileHandle : public FileHandle {
markschwarzer 0:a9d72fcb5d03 30 public:
markschwarzer 0:a9d72fcb5d03 31
markschwarzer 0:a9d72fcb5d03 32 FATFileHandle(FIL fh);
markschwarzer 0:a9d72fcb5d03 33 virtual int close();
markschwarzer 0:a9d72fcb5d03 34 virtual ssize_t write(const void* buffer, size_t length);
markschwarzer 0:a9d72fcb5d03 35 virtual ssize_t read(void* buffer, size_t length);
markschwarzer 0:a9d72fcb5d03 36 virtual int isatty();
markschwarzer 0:a9d72fcb5d03 37 virtual off_t lseek(off_t position, int whence);
markschwarzer 0:a9d72fcb5d03 38 virtual int fsync();
markschwarzer 0:a9d72fcb5d03 39 virtual off_t flen();
markschwarzer 0:a9d72fcb5d03 40
markschwarzer 0:a9d72fcb5d03 41 virtual off_t seek(off_t position, int whence) { return lseek(position, whence); }
markschwarzer 0:a9d72fcb5d03 42 virtual off_t size() { return flen(); }
markschwarzer 0:a9d72fcb5d03 43
markschwarzer 0:a9d72fcb5d03 44 protected:
markschwarzer 0:a9d72fcb5d03 45
markschwarzer 0:a9d72fcb5d03 46 FIL _fh;
markschwarzer 0:a9d72fcb5d03 47
markschwarzer 0:a9d72fcb5d03 48 };
markschwarzer 0:a9d72fcb5d03 49
markschwarzer 0:a9d72fcb5d03 50 #endif