Basic DS3231 RTC questions

odometer:
It would help if you would provide a link, in case there is more than one version of that library floating around, or more than one library by that author.

Is this what you are using? http://physics.csuchico.edu/~eayars/code/DS3231.zip

Same author, same date, yet the author had called the folder "DS3231-1.0.2", and indeed had appended some extra code to it, including some that was similar to your calls, getting multiple registers at once

odometer:
Here is some of my old code I dug up. I believe it deals correctly with both issues you bring up.

Yes I ended up doing something similar... requesting multiple registers at once, starting with seconds, since that toggles a 1 second freeze between the live registers and the ones exposed for user read, specifically to make rollover impossible. My particular project only requires day time (seconds, minutes, hours), so thats all I read or write in one shot.

Thats a good idea you added, reporting an error if the number of registers available is less than what you requested.

But you are still using the original WIRE library, and I've been lead to consider alternatives like Wayne Truchsess' I2C library, which boasts more built in lockup avoidance, faster operation, and reduced code footprint. The trouble is, the DS3231 support code seems pretty easy to trace out and rebuild your own way, using these newer calls. But doing this with the LCD library is much more complicated, and once I go down that path it makes little sense to NOT do the same for every I2C device I ever use.

So that said, it looks like the only sensible thing is to analyze Wayne's work, and build a wrapper class around it to mimic the WIRE library as closely as possible, so that ANY I2C device with a support library can make use of the better calls without modification.

Perhaps I'll write to the author and ask why HE stopped doing that.