/************************************************************************/ /* */ /* Clock / Calendar */ /* */ /* Author: Peter Dannegger */ /* danni@specs.de */ /* */ /************************************************************************/ #include "main.h" #include "clock.h" #include "timebase.h" #include "dcf77.h" struct time data time; const u8 code MDAYS[] = { 29, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; u8 is_cet(void) { return ((time.flags & FLAG_CET) && !(time.flags & FLAG_CEST)); } u8 is_cest(void) { return ((time.flags & FLAG_CEST) && !(time.flags & FLAG_CET)); } void clock(void) { u8 i; time.second++; if( time.second >= 60 ){ if (time.flags & FLAG_LEAP_SECOND && time.second == 60) { return; } time.second = 0; timeflags = 1<