udoklein / dcf77

Noise resilient DCF77 decoder library for Arduino
http://blog.blinkenlight.net/experiments/dcf77/dcf77-library/
GNU General Public License v3.0
92 stars 28 forks source link

Undefined Reference to Internal::Generic_1_kHz_Generator::setup() when compiling for Arduino Zero (Atmel ATSAMD21G18) #47

Open Anderl94 opened 1 month ago

Anderl94 commented 1 month ago

When attempting to compile a project for the Arduino Zero with a DCF77 module, I encountered the following error:

.pio/build/nanoatmega328new/libdcf77_xtal.a(dcf77.cpp.o): In function `DCF77_Clock::set_input_provider(unsigned char (*)())':
dcf77.cpp:(.text._ZN11DCF77_Clock18set_input_providerEPFhvE+0x2): undefined reference to `Internal::Generic_1_kHz_Generator::setup(unsigned char (*)())'
udoklein commented 1 month ago

In the 1 kHz Generator (line https://github.com/udoklein/dcf77/blob/c9b5c54a6adbd17f4ddb9231c422dafdd5af326a/dcf77.cpp#L1664 and below) it fails to properly account for the zero. Obviously this is because my code was developed before the zero entered the market. Feel free to add the missing statements and test it. If it works I can merge it into the code base.