CDY version that shares functionality with Counter

Dependencies:   SDFileSystem_HelloWorld mbed FATFileSystem

Committer:
Charles David Young
Date:
Sun Nov 04 18:44:51 2018 -0700
Revision:
0:aa13e1c335cd
create new repo for show2me

Who changed what in which revision?

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