From: Alan Cox Date: Mon, 22 Dec 2014 14:54:59 +0000 (+0000) Subject: z80pack: turn on RTC support X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=fc02500f3c59da06d7e3c40c3711746c734fa724;p=FUZIX.git z80pack: turn on RTC support --- diff --git a/Kernel/platform-z80pack/Makefile b/Kernel/platform-z80pack/Makefile index 2b14553b..d890c0ae 100644 --- a/Kernel/platform-z80pack/Makefile +++ b/Kernel/platform-z80pack/Makefile @@ -1,5 +1,5 @@ -DSRCS = ../dev/z80pack/devlpr.c ../dev/z80pack/devtty.c ../dev/z80pack/devfd.c +DSRCS = ../dev/z80pack/devlpr.c ../dev/z80pack/devtty.c ../dev/z80pack/devfd.c ../dev/z80pack/devrtc.c CSRCS += devices.c main.c ASRCS = crt0.s z80pack.s diff --git a/Kernel/platform-z80pack/config.h b/Kernel/platform-z80pack/config.h index 7d5edd63..4bb0a5fa 100644 --- a/Kernel/platform-z80pack/config.h +++ b/Kernel/platform-z80pack/config.h @@ -1,3 +1,5 @@ +/* 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 */ diff --git a/Kernel/platform-z80pack/devices.c b/Kernel/platform-z80pack/devices.c index c60640f7..fdd4ff7d 100644 --- a/Kernel/platform-z80pack/devices.c +++ b/Kernel/platform-z80pack/devices.c @@ -6,6 +6,7 @@ #include #include #include +#include struct devsw dev_tab[] = /* The device driver switch table */ { @@ -37,6 +38,7 @@ bool validdev(uint16_t dev) void device_init(void) { int i; + zrtc_init(); /* Add 64 swaps (4MB) to use the entire J drive */ for (i = 0; i < MAX_SWAPS; i++) swapmap_add(i); diff --git a/Kernel/platform-z80pack/uzi.lnk b/Kernel/platform-z80pack/uzi.lnk index 0a727ec9..672ff64c 100644 --- a/Kernel/platform-z80pack/uzi.lnk +++ b/Kernel/platform-z80pack/uzi.lnk @@ -34,4 +34,5 @@ swap.rel devsys.rel platform-z80pack/devlpr.rel platform-z80pack/devtty.rel +platform-z80pack/devrtc.rel -e