This is code is part of a Technion course project in advanced IoT, implementing a device to read and transmit sensors data from a Formula racing car built by students at Technion - Israel Institute of Technology.
Fork of DISCO-L072CZ-LRWAN1_LoRa_PingPong by
This is code is part of a Technion course project in advanced IoT, implementing a device to read and transmit sensors data from a Formula racing car built by students at Technion - Israel Institute of Technology.
How to install
- Create an account on Mbed: https://os.mbed.com/account/signup/
- Import project into Compiler
- In the Program Workspace select "Formula_Nucleo_Reader"
- Select a Platform like so:
- Click button at top-left
- Add Board
- Search "B-L072Z-LRWAN1" and then "Add to your Mbed Compiler"
- Finally click "Compile", if the build was successful, the binary would download automatically
- To install it on device simply plug it in to a PC, open device drive and drag then drop binary file in it
FATFileSystem/FATDirHandle.h@12:02d779e8c4f6, 2018-05-19 (annotated)
- Committer:
- wardm
- Date:
- Sat May 19 11:41:10 2018 +0000
- Revision:
- 12:02d779e8c4f6
Code for Technion Formula car sensors reader transmit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
wardm | 12:02d779e8c4f6 | 1 | /* mbed Microcontroller Library |
wardm | 12:02d779e8c4f6 | 2 | * Copyright (c) 2006-2012 ARM Limited |
wardm | 12:02d779e8c4f6 | 3 | * |
wardm | 12:02d779e8c4f6 | 4 | * Permission is hereby granted, free of charge, to any person obtaining a copy |
wardm | 12:02d779e8c4f6 | 5 | * of this software and associated documentation files (the "Software"), to deal |
wardm | 12:02d779e8c4f6 | 6 | * in the Software without restriction, including without limitation the rights |
wardm | 12:02d779e8c4f6 | 7 | * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
wardm | 12:02d779e8c4f6 | 8 | * copies of the Software, and to permit persons to whom the Software is |
wardm | 12:02d779e8c4f6 | 9 | * furnished to do so, subject to the following conditions: |
wardm | 12:02d779e8c4f6 | 10 | * |
wardm | 12:02d779e8c4f6 | 11 | * The above copyright notice and this permission notice shall be included in |
wardm | 12:02d779e8c4f6 | 12 | * all copies or substantial portions of the Software. |
wardm | 12:02d779e8c4f6 | 13 | * |
wardm | 12:02d779e8c4f6 | 14 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
wardm | 12:02d779e8c4f6 | 15 | * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
wardm | 12:02d779e8c4f6 | 16 | * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
wardm | 12:02d779e8c4f6 | 17 | * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
wardm | 12:02d779e8c4f6 | 18 | * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
wardm | 12:02d779e8c4f6 | 19 | * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE |
wardm | 12:02d779e8c4f6 | 20 | * SOFTWARE. |
wardm | 12:02d779e8c4f6 | 21 | */ |
wardm | 12:02d779e8c4f6 | 22 | #ifndef MBED_FATDIRHANDLE_H |
wardm | 12:02d779e8c4f6 | 23 | #define MBED_FATDIRHANDLE_H |
wardm | 12:02d779e8c4f6 | 24 | |
wardm | 12:02d779e8c4f6 | 25 | #include "DirHandle.h" |
wardm | 12:02d779e8c4f6 | 26 | |
wardm | 12:02d779e8c4f6 | 27 | using namespace mbed; |
wardm | 12:02d779e8c4f6 | 28 | |
wardm | 12:02d779e8c4f6 | 29 | class FATDirHandle : public DirHandle { |
wardm | 12:02d779e8c4f6 | 30 | |
wardm | 12:02d779e8c4f6 | 31 | public: |
wardm | 12:02d779e8c4f6 | 32 | FATDirHandle(const FATFS_DIR &the_dir); |
wardm | 12:02d779e8c4f6 | 33 | virtual int closedir(); |
wardm | 12:02d779e8c4f6 | 34 | virtual struct dirent *readdir(); |
wardm | 12:02d779e8c4f6 | 35 | virtual void rewinddir(); |
wardm | 12:02d779e8c4f6 | 36 | virtual off_t telldir(); |
wardm | 12:02d779e8c4f6 | 37 | virtual void seekdir(off_t location); |
wardm | 12:02d779e8c4f6 | 38 | |
wardm | 12:02d779e8c4f6 | 39 | virtual ssize_t read(struct dirent *ent); |
wardm | 12:02d779e8c4f6 | 40 | virtual int close() { return closedir(); }; |
wardm | 12:02d779e8c4f6 | 41 | virtual void seek(off_t offset) { seekdir(offset); }; |
wardm | 12:02d779e8c4f6 | 42 | virtual off_t tell() { return telldir(); }; |
wardm | 12:02d779e8c4f6 | 43 | virtual void rewind() { rewinddir(); }; |
wardm | 12:02d779e8c4f6 | 44 | |
wardm | 12:02d779e8c4f6 | 45 | private: |
wardm | 12:02d779e8c4f6 | 46 | FATFS_DIR dir; |
wardm | 12:02d779e8c4f6 | 47 | struct dirent cur_entry; |
wardm | 12:02d779e8c4f6 | 48 | |
wardm | 12:02d779e8c4f6 | 49 | }; |
wardm | 12:02d779e8c4f6 | 50 | |
wardm | 12:02d779e8c4f6 | 51 | #endif |