time: change references to rtc_secs to platform_rtc_secs
authorBrett Gordon <beretta42@gmail.com>
Sun, 8 Apr 2018 23:07:50 +0000 (19:07 -0400)
committerBrett Gordon <beretta42@gmail.com>
Sun, 8 Apr 2018 23:07:50 +0000 (19:07 -0400)
rtc_secs() has no prototype anymore, and errant results from an
implied call was speeding my clock up by 51 secs every RTC_INTERVAL.
change everyone over to new api.

Kernel/dev/ds1302.c
Kernel/dev/ds1302.h
Kernel/dev/z80pack/devrtc.c
Kernel/platform-coco3/dwtime.c
Kernel/platform-msx2/devrtc.c
Kernel/platform-nc100/main.c
Kernel/platform-trs80/main.c
Kernel/platform-ubee/main.c
Kernel/timer.c

index b400987..35c1813 100644 (file)
@@ -77,7 +77,7 @@ void ds1302_read_clock(uint8_t *buffer, uint8_t length)
 }
 
 /* define CONFIG_RTC in platform's config.h to hook this into timer.c */
-uint8_t rtc_secs(void)
+uint8_t platform_rtc_secs(void)
 {
     uint8_t buffer;
     ds1302_read_clock(&buffer, 1);   /* read out only the seconds value */
index 94f3f83..ea76950 100644 (file)
@@ -3,7 +3,7 @@
 
 /* public interface */
 void ds1302_init(void);
-uint8_t rtc_secs(void);
+uint8_t platform_rtc_secs(void);
 
 #ifdef _DS1302_PRIVATE
 /* consult the DS1302 datasheet for data format;
index e85a6f1..24f9069 100644 (file)
@@ -16,7 +16,7 @@ void zrtc_init(void)
        inittod();
 }
 
-uint8_t rtc_secs(void)
+uint8_t platform_rtc_secs(void)
 {
        return clkd;
 }
index b55240b..6159fe9 100644 (file)
@@ -105,7 +105,7 @@ DISC int dwtime_init( void )
 
 
 /* Called every every so often from updatetod from timer.c */
-uint16_t rtc_secs(void)
+uint8_t platform_rtc_secs(void)
 {
        uint8_t t[6];
        /* poll dw time and return it */
index f9777cf..d2e3f7c 100755 (executable)
@@ -15,7 +15,7 @@ void rp5c01_write_reg(uint8_t reg, uint8_t value)
     RTC_DATA = value;
 }
 
-uint8_t rtc_secs(void)
+uint8_t platform_rtc_secs(void)
 {
     return rp5c01_rtc_secs();
 }
index ac49083..7f8a607 100644 (file)
@@ -49,7 +49,7 @@ __sfr __at 0xD0 rtc_secl;
 __sfr __at 0xD1 rtc_sech;
 __sfr __at 0xDD rtc_page;
 
-uint8_t rtc_secs(void)
+uint8_t platform_rtc_secs(void)
 {
     uint8_t sl, rv;
     /* Make sure we are seeing the seconds not NVRAM */
index 84b414e..013dd1d 100644 (file)
@@ -71,7 +71,7 @@ void platform_discard(void)
 __sfr __at 0xB0 rtc_secl;
 __sfr __at 0xB1 rtc_sech;
 
-uint8_t rtc_secs(void)
+uint8_t platform_rtc_secs(void)
 {
     uint8_t sl, rv;
     /* BCD encoded */
index 93fb598..e9bff50 100644 (file)
@@ -24,7 +24,7 @@ __sfr __at 0x02 pia0b;
 __sfr __at 0x04 cmos_reg;
 __sfr __at 0x07 cmos_read;
 
-uint8_t rtc_secs(void)
+uint8_t platform_rtc_secs(void)
 {
        cmos_reg = 0x00;
        return cmos_read;
index 4308f3f..7dbb235 100644 (file)
@@ -99,7 +99,7 @@ void updatetod(void)
        tod_deci = 0;
 #endif
 
-       rtcnew = rtc_secs();            /* platform function */
+       rtcnew = platform_rtc_secs();           /* platform function */
 
        if (rtcnew == rtcsec)
                return;
@@ -115,7 +115,7 @@ addtod:
 
 void inittod(void)
 {
-       rtcsec = rtc_secs();
+       rtcsec = platform_rtc_secs();
 }
 
 #endif                         /* NO_RTC */