SDFileSystem, slightly modified for the ExoController

Dependencies:   SDFileSystem

Dependents:   Data-Management-Honka

Fork of SDFileSystem_HelloWorld by Bradley Perry

Committer:
mzling
Date:
Mon May 11 21:47:54 2015 +0000
Revision:
11:b47fb3344ed9
Parent:
9:5bad923e18ce
Added debug functions/comments

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mzling 3:8f5903a77a13 1 /**
mzling 3:8f5903a77a13 2 * @file SDFile.h
mzling 3:8f5903a77a13 3 * @brief This header file contains read/write functions for the SDFile object
mzling 3:8f5903a77a13 4 * @author Michael Ling
mzling 3:8f5903a77a13 5 * @date 2/2/2015
mzling 3:8f5903a77a13 6 */
mzling 3:8f5903a77a13 7
mzling 3:8f5903a77a13 8 #include <string>
mzling 3:8f5903a77a13 9
mzling 2:ec4d7e5fa68e 10 #include "mbed.h"
mzling 2:ec4d7e5fa68e 11 #include "SDFileSystem.h"
mzling 3:8f5903a77a13 12
mzling 2:ec4d7e5fa68e 13 #ifndef SDFILE_H
mzling 2:ec4d7e5fa68e 14 #define SDFILE_H
mzling 2:ec4d7e5fa68e 15 class SDFile
mzling 2:ec4d7e5fa68e 16 {
mzling 2:ec4d7e5fa68e 17 public:
mzling 4:99e9c9e0dfb0 18 SDFile(std::string path, std::string filename, bool readOnly);
mzling 3:8f5903a77a13 19 int *read(int length, int *array);
mzling 4:99e9c9e0dfb0 20 int *read_from_start(int length, int *array);
mzling 3:8f5903a77a13 21 void write(int length, int *array);
mzling 9:5bad923e18ce 22 void write_to_index(int index, int value);
mzling 4:99e9c9e0dfb0 23 void append(int length, int *array);
mzling 4:99e9c9e0dfb0 24 // void changeAccess(std::string path, std::string filename);
mzling 4:99e9c9e0dfb0 25 void open_for_read(std::string path, std::string filename);
mzling 4:99e9c9e0dfb0 26 void open_for_write(std::string path, std::string filename);
mzling 4:99e9c9e0dfb0 27 void close();
mzling 11:b47fb3344ed9 28 void debug_print();
mzling 2:ec4d7e5fa68e 29
mzling 2:ec4d7e5fa68e 30 private:
mzling 3:8f5903a77a13 31 FILE *_fp;
mzling 2:ec4d7e5fa68e 32 };
mzling 3:8f5903a77a13 33 #endif