Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added CRC check option to fork. #16

Open
bzuidgeest opened this issue Apr 30, 2017 · 0 comments
Open

Added CRC check option to fork. #16

bzuidgeest opened this issue Apr 30, 2017 · 0 comments

Comments

@bzuidgeest
Copy link

Hello,

I updated the code in my fork (https://github.com/bzuidgeest/Arduino-EEPROMEx/) to include the functionality from https://github.com/AMPWorks/ArduinoLibs/tree/master/EEPromUtils into this libraries read/write/update block functions. So when writing data to EEPROM it also adds a start byte, records the length being written, and adds a CRC to the end of the data. I added function parameters to switch this behavior on and off.

the old functions are still all there and call the new ones using the new safeWrite parameter to switch off the new functionality.

The specific reason I had for adding these changes is that I want to be able to see if I read valid (initialized) eeprom data. the CRC check allows me to do this. Your library also had has far nicer code than the library I pulled the CRC code from.

I also changed readInt into readInt16 and readLong into readInt32. This is less confusing as the size of int and long differ depending on platform (teensy vs avr)and that might lead to mistakes if you do not look carefully.

If find just creating a pull request presumptuous. I can still do this if you find the changes interesting. I pulled enough code of github. Time to try put something back.

PS C++/github is not my most used language/sourcecontrol system. To me the changes I made look nice enough and seem to work in the tests I did, but I advise looking over the changes carefully.

Let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant