UniverSpace 2022 / Mbed 2 deprecated Inisat4_nucleo

Dependencies:   mbed Servo

Committer:
Giamarchi
Date:
Sat Jun 04 16:29:45 2022 +0000
Revision:
6:d10e992a37b1
Parent:
0:b8bade04f24f
MAJ

Who changed what in which revision?

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