RV3028 RTC Driver and example for Raspberry Pico #39
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've coded up the RV3028 driver for the Pico, so that I could use you RTC breakout. I started with the Arduino RV_3028_C7 library (version 2.1.0), added startup code, and modified the register reads and writes to use the same code as the existing drivers (particularly the MSA301). I also added the method to get the current timer countdown count (missing from the Arduino code, though the constants to define the register were present).
I include C/C++ example code to test the driver. This requires a display and the RTC module - I used your pico display and wired the RTC module to GPIO pins 20, 21 and 22 (like in the Pi400 Breakout Garden). I haven't tested the alarm code yet, though the timer code seems to work fine. My example also doesn't contain the code to set the time - you would need to do that on another machine.
There is no documentation on the calls (like the other drivers that are being developed!), and none in the original Arduino code, as far as I can tell. I worked out the methods from the example code given, and the RV3028C7 datasheet. Maybe that's something for a later date....