A set of data recording functions to locally store data in a circular buffer, with functions for offloading to an SD Card when convenient. dataRecorderr.h shows accessible functions to the main program - all direct SD operations are abstracted away by the library. When using this library, #include dataRecorder.h
Dependencies: sd-driver_compatible_with_MAX32630FTHR
Fork of CircularBufferSDCardLib by
Diff: sdCardReader.cpp
- Revision:
- 3:df8fb1b5d868
- Parent:
- 1:45627bbdeb69
- Child:
- 4:fe6d2823b7cb
diff -r c2cfb0ebc3bd -r df8fb1b5d868 sdCardReader.cpp --- a/sdCardReader.cpp Wed Apr 04 16:17:34 2018 -0400 +++ b/sdCardReader.cpp Wed Apr 04 17:15:36 2018 -0400 @@ -6,14 +6,14 @@ void SDCardReader::mountFileSystem(){ printf("Mounting the filesystem... "); fflush(stdout); - int err = m_fs.mount(&this); + int err = m_fs->mount(&this); printf("%s\n", (err ? "Fail :(" : "OK")); if (err) { // Reformat if we can't mount the filesystem // this should only happen on the first boot printf("No filesystem found, formatting... "); fflush(stdout); - err = m_fs.reformat(&this); + err = m_fs->reformat(&this); printf("%s\n", (err ? "Fail :(" : "OK")); if (err) { error("error: %s (%d)\n", strerror(-err), err); @@ -24,7 +24,7 @@ void SDCardReader::unmountFileSystem(){ printf("Unmounting... "); fflush(stdout); - err = m_fs.unmount(); + err = m_fs->unmount(); printf("%s\n", (err < 0 ? "Fail :(" : "OK")); if (err < 0) { error("error: %s (%d)\n", strerror(-err), err);