Class that contain only FATFileSystem

Fork of USBFileSystem by Erik -

Committer:
mkilivan
Date:
Fri Dec 19 14:41:08 2014 +0000
Revision:
6:eeeea7fbb0a2
Parent:
2:9af05743d551
Remove USB part

Who changed what in which revision?

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