-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Multi-byte read/write from RTC SRAM #38
Comments
I can do it as uEEPROMLib, but then I would rather do it in a spare library as it can use too much resources. |
It shouldn't be necessary to break it out into a separate library, it's just 2 small functions/overrides, I don't think it seriously threatens the "micro" nature of the lib ;) I've looked into it a bit more and I think I can probably figure it out, so I'll send you a PR when I get some time. |
Problem is that using templates (on .h file, at end) can lead to a massive code explosion. Also, for paged reads you need at least 32 bytes buffer. |
I'm literally just after something like |
I was thinking about this and the I realized: Why duplicate the code if you can use uEEPROMLib directly?
Then you can use it directly. Edit: fixed ptr parameter |
For write functions:
|
Hi
First of all thanks for this library, and for so promptly incorporating my earlier PRs.
This time around I have a suggestion but don't have a PR because I'm not sure how best to do it.
In Adafruit RTCLib there are functions to read and write an arbitrary number of consecutive bytes from/to the RTC's SRAM into a buffer in one go. In fact the 1-byte read and write just call these functions with number of bytes = 1.
It would be great to have this in uRTCLib too. I am currently working around it by reading one byte at a time, but that obviously comes with additional I2C overhead which it would be good to avoid.
Cheers
Ben
The text was updated successfully, but these errors were encountered: