thijse / Arduino-DCF77

Efficient and complete DCF77 library for Arduino
GNU Lesser General Public License v2.1
44 stars 17 forks source link

Allow to use RTC instead of TimeLib. #18

Open DCEM opened 4 years ago

DCEM commented 4 years ago

The constructor now additionally accepts:

Allow to use RTC instead of TimeLib.

To archive this, you have to #define DCF77_USE_RTC before #include "DCF77.h".
This should work with any RTC. Since the DCF77 library needs to get the time from the RTC you need to put the function call inside the RTC_Callback_Wrapper(). Look at the ZeroRTCSync example for more details.