From: EtchedPixels Date: Tue, 10 Apr 2018 13:37:44 +0000 (+0100) Subject: Merge branch 'master' into time X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=955d4e872fa699500984d77c5d34c51297f00fdb;p=FUZIX.git Merge branch 'master' into time --- 955d4e872fa699500984d77c5d34c51297f00fdb diff --cc Kernel/platform-coco3/dwtime.c index 6159fe98,fd44fdec..bff57eb9 --- a/Kernel/platform-coco3/dwtime.c +++ b/Kernel/platform-coco3/dwtime.c @@@ -102,15 -105,30 +102,13 @@@ DISC int dwtime_init( void return 0; } -- -- - /* Called every every so often from updatetod from timer.c */ + /* Called every every decisec from timer.c */ uint8_t platform_rtc_secs(void) { - static uint8_t ticks=10; - static uint8_t longt=CONFIG_DWTIME_INTERVAL; uint8_t t[6]; - - /* count to 10 deci's before doing anything */ - if( --ticks ) - return secs; - ticks=10; - /* count to INTERVAL before polling */ - if( --longt ) - goto nopoll; - longt=CONFIG_DWTIME_INTERVAL; /* poll dw time and return it */ - if( get_time( t ) ) goto nopoll; - return secs; - - nopoll: - if( (++secs) > 59 ) secs = 0; - return secs; + get_time(t); + return t[5]; }