Fixed the RTC only firing once.
authorJohn Hodge <[email protected]>
Sat, 10 Oct 2009 04:42:44 +0000 (12:42 +0800)
committerJohn Hodge <[email protected]>
Sat, 10 Oct 2009 04:42:44 +0000 (12:42 +0800)
Also added the <acess/devices.h> usermode header that will be used by the GUI

Kernel/arch/x86/time.c
Usermode/include/acess/devices.h [new file with mode: 0644]

index 4cfa280..9248bd1 100644 (file)
@@ -69,9 +69,13 @@ void Time_Interrupt()
                giPartMiliseconds -= 0x80000000;
        }
        
-       Log("giTimestamp = %lli", giTimestamp);
+       //Log("giTimestamp = %lli", giTimestamp);
        
        Timer_CallTimers();
+
+       // Make sure the RTC Fires again
+       outb(0x70, 0x0C); // Select register C
+       inb(0x71);      // Just throw away contents.
 }
 
 /**
@@ -114,7 +118,7 @@ void Timer_CallTimers()
                i < NUM_TIMERS;
                i ++)
        {
-               Log("%i", i);
+               //Log("Timer %i", i);
                if(gTimers[i].Callback == NULL) continue;
                Log("%i - %lli < %lli", i, giTimestamp, gTimers[i].FiresAfter);
                if(giTimestamp < gTimers[i].FiresAfter) continue;
diff --git a/Usermode/include/acess/devices.h b/Usermode/include/acess/devices.h
new file mode 100644 (file)
index 0000000..1039430
--- /dev/null
@@ -0,0 +1,47 @@
+/**
+ * \file drivers.h
+ */
+#ifndef _SYS_DRIVERS_H
+#define _SYS_DRIVERS_H
+
+// === COMMON ===
+enum eDrv_Common {
+       DRV_IOCTL_NULL,
+       DRV_IOCTL_TYPE,
+       DRV_IOCTL_IDENT,
+       DRV_IOCTL_VER
+};
+
+enum eDrv_Types {
+       DRV_TYPE_NULL,          //!< NULL Type - Custom Interface
+       DRV_TYPE_TERMINAL,      //!< Terminal
+       DRV_TYPE_VIDEO,         //!< Video - LFB
+       DRV_TYPE_SOUND,         //!< Audio
+       DRV_TYPE_MOUSE,         //!< Mouse
+       DRV_TYPE_JOYSTICK       //!< Joystick / Gamepad
+};
+
+// === VIDEO ===
+enum eDrv_Video {
+       VID_IOCTL_SETMODE = 4,
+       VID_IOCTL_GETMODE,
+       VID_IOCTL_FINDMODE,
+       VID_IOCTL_MODEINFO,
+       VID_IOCTL_REQLFB        // Request LFB
+};\r
+struct sVideo_IOCtl_Mode {\r
+       short   id;\r
+       Uint16  width;\r
+       Uint16  height;\r
+       Uint16  bpp;\r
+};\r
+typedef struct sVideo_IOCtl_Mode       tVideo_IOCtl_Mode;      //!< Mode Type
+
+// === MOUSE ===
+enum eDrv_Mouse {\r
+       MSE_IOCTL_SENS = 4,\r
+       MSE_IOCTL_MAX_X,\r
+       MSE_IOCTL_MAX_Y\r
+};
+
+#endif

UCC git Repository :: git.ucc.asn.au