主導機 mbed用のプログラムです 改良しました
Dependencies: mbed
Fork of F3RC_syudou_master by
FatFileSystem/FATFileHandle.h@19:a3f57c9833b6, 2017-08-23 (annotated)
- Committer:
- yuto17320508
- Date:
- Wed Aug 23 10:10:26 2017 +0000
- Revision:
- 19:a3f57c9833b6
- Parent:
- 0:736c76a75def
a
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
hirokimineshita | 0:736c76a75def | 1 | /* mbed Microcontroller Library - FATFileHandle |
hirokimineshita | 0:736c76a75def | 2 | * Copyright (c) 2008, sford |
hirokimineshita | 0:736c76a75def | 3 | */ |
hirokimineshita | 0:736c76a75def | 4 | |
hirokimineshita | 0:736c76a75def | 5 | #ifndef MBED_FATFILEHANDLE_H |
hirokimineshita | 0:736c76a75def | 6 | #define MBED_FATFILEHANDLE_H |
hirokimineshita | 0:736c76a75def | 7 | |
hirokimineshita | 0:736c76a75def | 8 | #include "FileHandle.h" |
hirokimineshita | 0:736c76a75def | 9 | #include "ff.h" |
hirokimineshita | 0:736c76a75def | 10 | |
hirokimineshita | 0:736c76a75def | 11 | namespace mbed { |
hirokimineshita | 0:736c76a75def | 12 | |
hirokimineshita | 0:736c76a75def | 13 | class FATFileHandle : public FileHandle { |
hirokimineshita | 0:736c76a75def | 14 | public: |
hirokimineshita | 0:736c76a75def | 15 | |
hirokimineshita | 0:736c76a75def | 16 | FATFileHandle(FIL fh); |
hirokimineshita | 0:736c76a75def | 17 | virtual int close(); |
hirokimineshita | 0:736c76a75def | 18 | virtual ssize_t write(const void* buffer, size_t length); |
hirokimineshita | 0:736c76a75def | 19 | virtual ssize_t read(void* buffer, size_t length); |
hirokimineshita | 0:736c76a75def | 20 | virtual int isatty(); |
hirokimineshita | 0:736c76a75def | 21 | virtual off_t lseek(off_t position, int whence); |
hirokimineshita | 0:736c76a75def | 22 | virtual int fsync(); |
hirokimineshita | 0:736c76a75def | 23 | virtual off_t flen(); |
hirokimineshita | 0:736c76a75def | 24 | |
hirokimineshita | 0:736c76a75def | 25 | protected: |
hirokimineshita | 0:736c76a75def | 26 | |
hirokimineshita | 0:736c76a75def | 27 | FIL _fh; |
hirokimineshita | 0:736c76a75def | 28 | |
hirokimineshita | 0:736c76a75def | 29 | }; |
hirokimineshita | 0:736c76a75def | 30 | |
hirokimineshita | 0:736c76a75def | 31 | } |
hirokimineshita | 0:736c76a75def | 32 | |
hirokimineshita | 0:736c76a75def | 33 | #endif |