Final tidy of code following installation of new sensor, more comments added prior to submission

Dependencies:   mbed

Committer:
legstar85
Date:
Fri Jan 21 22:33:32 2022 +0000
Revision:
14:3e9991fe64e5
Addition of new menu option, start of coding for writing Temp data to SD card

Who changed what in which revision?

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