We'll need the RTC in fact as 64 doesn't divide by 10
+/* We have an RTC */
+#define CONFIG_RTC
/* Enable to make ^Z dump the inode table for debug */
#undef CONFIG_IDUMP
/* Enable to make ^A drop back into the monitor */
#define VT_RIGHT 79
#define VT_BOTTOM 23
-#define TICKSPERSEC 60 /* Ticks per second */
+#define TICKSPERSEC 64 /* Ticks per second */
#define PROGBASE 0x0000 /* Base of user */
#define PROGLOAD 0x0100 /* Load and run here */
#define PROGTOP 0x7D00 /* Top of program, base of U_DATA stash */
void device_init(void)
{
int i;
+ /* Time of day clock */
+ inittod();
/* Add 64 swaps (2MB) */
for (i = MAX_SWAPS - 1 ; i >= 0; i--)
swapmap_add(i);
#endif
/* and if we ever poke at the 1024 stuff its bit 7-5/1-0 */
}
+
+__sfr __at 0x04 rtc_c;
+__sfr __at 0x06 rtc_d;
+
+uint8_t rtc_secs(void)
+{
+ rtc_c = 0x00;
+ return rtc_d;
+}