Snake vs Block Game to be run upon K64F.

Dependencies:   mbed

Committer:
AhmedPlaymaker
Date:
Thu May 09 14:52:19 2019 +0000
Revision:
104:17040265b7b4
Parent:
51:387249f9b333
Final Submission. I have read and agreed with Statement of Academic Integrity.

Who changed what in which revision?

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