Merge branch 'master' into time
authorEtchedPixels <alan@etchedpixels.co.uk>
Tue, 10 Apr 2018 13:37:44 +0000 (14:37 +0100)
committerGitHub <noreply@github.com>
Tue, 10 Apr 2018 13:37:44 +0000 (14:37 +0100)
1  2 
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];
  }