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