charlesbaynham / osfs Goto Github PK
View Code? Open in Web Editor NEWOverly Simplified File System for Arduino EEPROM
License: GNU General Public License v3.0
Overly Simplified File System for Arduino EEPROM
License: GNU General Public License v3.0
`
sketch\LeOS_EEPROM.cpp: In function 'void OSFS::readNBytes(uint16_t, unsigned int, void*)':
sketch\LeOS_EEPROM.cpp:45:11: warning: ISO C++ forbids incrementing a pointer of type 'void*' [-Wpointer-arith]
output++;
^
sketch\LeOS_EEPROM.cpp: In function 'void OSFS::writeNBytes(uint16_t, unsigned int, const void*)':
sketch\LeOS_EEPROM.cpp:53:10: warning: ISO C++ forbids incrementing a pointer of type 'const void*' [-Wpointer-arith]
input++;
^
In file included from sketch\LeOS_EEPROM.cpp:5:0:
sketch\OSFS.h: In instantiation of 'OSFS::result OSFS::getFile(const char*, T&) [with T = int]':
sketch\LeOS_EEPROM.cpp:274:34: required from here
sketch\OSFS.h:121:23: warning: 'readNBytesChk' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
return readNBytesChk(add, size, &buf);
^
sketch\OSFS.h:230:9: note: 'OSFS::result OSFS::readNBytesChk(uint16_t, unsigned int, void*)' declared here, later in the translation unit
result readNBytesChk(uint16_t address, unsigned int num, void* input);
^
sketch\OSFS.h: In instantiation of 'OSFS::result OSFS::getFile(const char*, T&) [with T = long int]':
sketch\LeOS_EEPROM.cpp:275:44: required from here
sketch\OSFS.h:121:23: warning: 'readNBytesChk' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
return readNBytesChk(add, size, &buf);
^
sketch\OSFS.h:230:9: note: 'OSFS::result OSFS::readNBytesChk(uint16_t, unsigned int, void*)' declared here, later in the translation unit
result readNBytesChk(uint16_t address, unsigned int num, void* input);
^
sketch\OSFS.h: In instantiation of 'OSFS::result OSFS::getFile(const char*, T&) [with T = long unsigned int]':
sketch\LeOS_EEPROM.cpp:304:53: required from here
sketch\OSFS.h:121:23: warning: 'readNBytesChk' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
return readNBytesChk(add, size, &buf);
^
sketch\OSFS.h:230:9: note: 'OSFS::result OSFS::readNBytesChk(uint16_t, unsigned int, void*)' declared here, later in the translation unit
result readNBytesChk(uint16_t address, unsigned int num, void* input);
^
sketch\OSFS.h: In instantiation of 'OSFS::result OSFS::getFile(const char*, T&) [with T = _LeOS_DATA_EEPROM]':
sketch\LeOS_EEPROM.cpp:357:38: required from here
sketch\OSFS.h:121:23: warning: 'readNBytesChk' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
return readNBytesChk(add, size, &buf);
^
sketch\OSFS.h:230:9: note: 'OSFS::result OSFS::readNBytesChk(uint16_t, unsigned int, void*)' declared here, later in the translation unit
result readNBytesChk(uint16_t address, unsigned int num, void* input);
^
sketch\OSFS.h: In instantiation of 'OSFS::result OSFS::getFile(const char*, T&) [with T = _LeOS_STAT_EEPROM]':
sketch\LeOS_EEPROM.cpp:367:39: required from here
sketch\OSFS.h:121:23: warning: 'readNBytesChk' was not declared in this scope, and no declarations were found by argument-dependent lookup at the point of instantiation [-fpermissive]
return readNBytesChk(add, size, &buf);
^
sketch\OSFS.h:230:9: note: 'OSFS::result OSFS::readNBytesChk(uint16_t, unsigned int, void*)' declared here, later in the translation unit
result readNBytesChk(uint16_t address, unsigned int num, void* input);
^`
First i uploaded > writeTest example
Serial output below given
Overly Simplified File System (OSFS) : write-test Formatting device... Storing an integer... Storing a string Storing a complex data type Done
then uploaded > readTest example
Serial output below given
Overly Simplified File System (OSFS) : read-test Looking for testInt... Error: 5 Looking for testStr... Error: 5 Looking for complex data type... Error: 5 Done
Hi @charlesbaynham:
Your library is just what I had in mind, I was glad to find it.
I would like to add more than one external memory to my project. An EEPROM memory and a FRAM.
But I see that the interface is through static methods, so I imagine that it is not possible to define several instances of it, one for each type and size of memory.
Am I right?
hey @charlesbaynham,
first of all nice work but i would really love to see fragmented files support for a library that is so flexible! to my knowledge it would also be very unique. there is no library that support any storage (eeprom, fram, etc.), has such a small footprint and supports fragmented files.
in my opionion its a good time to give this library a update!
I hope you see it like me.
Best regards from Germany
Hello Charles,
I would like to clone your OSFS into python 3 version into my project https://github.com/mamin27/ecomet_i2c_raspberry_tools. I would like to use your code logic for EEPROM operation system.
I would like to know your opinion? The code will be different but I would like to use your logic of file storing into EEPROM. Currently I am working on some different code but after half year I would like to start.
Regards Marian Minar
If a file small enough to fit into a deleted chunk of free space is written with overwrite==true
, it will be inserted into that space but the previous version that exists later on in the filesystem will not be overwritten. See
Lines 130 to 135 in 5002c74
Hello: Very interesting your library, congratulations.
I need this same but with support for "Overwriting with a larger file" do you plan to add it?
Thank you
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.