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

Refactoring of RTC libraries #185

Open
GoogleCodeExporter opened this issue Mar 3, 2016 · 3 comments
Open

Refactoring of RTC libraries #185

GoogleCodeExporter opened this issue Mar 3, 2016 · 3 comments

Comments

@GoogleCodeExporter
Copy link


Looks like lots of function are identical for DS1307, MCP 794X and PCF 8563.
i2c device address is different and MCP series has some additional functions 
like storing the power failure and resumption time stamps.

Apart from the above mentioned rtc's Ds1302 and PIC internal RTC also can share 
some common functionality.
All of them require bcd routines.

Original issue reported on code.google.com by robhamerling on 9 Sep 2012 at 8:29

@GoogleCodeExporter
Copy link
Author

Matt's (MCP 7940) and Rob's (hardware RTC)  libraries seems to be well written.
It would be better to deprecate functions and procedures in other libraries and 
have a common API.
Sunnish

Original comment by robhamerling on 9 Sep 2012 at 8:30

@GoogleCodeExporter
Copy link
Author

Work on refactoring has started, taking the RTCC_HW library as model.
Common routines like bcd2bin, mult60, day-of-week calculation, etc. will go to 
a common library. The DS1302 library will be the first to be adapted. 


Original comment by robhamerling on 23 Apr 2013 at 2:41

  • Changed state: Started

@GoogleCodeExporter
Copy link
Author

In addition following suggestions may be added to the RTC libraries (when not 
already present).
1. functions to read/write individual values of second, minute. hour, day, 
month and year.
2. add aliases to device files for variable with 'deviating' names, esp. 
T1CON_T1OSCEN for T1CON_SOSCEN.
3. modify RTCC_HW library to use RTCCFG_RTCPTR in stead of RTCCFG_RTCPTR1 and 
RTCCFG_RTCPTR0.

Original comment by robhamerling on 10 Jul 2013 at 7:16

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

No branches or pull requests

1 participant