luxos/Kernel/drivers/drivers.c
Tiberiu Chibici caa7718af9 [GOOD] BUILD 0.1.0.551 DATE 9/03/2011 AT 9:25 AM
====================================================
Mainly changed: HAL.FSs
+ Updated 'mount' call in floppy driver, now done after controller is
initialized
+ Added 'detect' function for FAT file systems
+ Implemented 'initdr' driver, however still bugged
+ Improved logger
2021-09-14 18:51:43 +03:00

35 lines
692 B
C

#include "drivers.h"
#include "cmos/cmos.h"
#include "pit/pit.h"
#include "floppy/floppy.h"
#include "time.h"
#include "../hal/cpu/irq.h"
#include <debugio.h>
#include <settings.h>
void DriversInstall_Clock()
{
// Set up PIT
PitSetFrequency(PIT_FREQUENCY);
// Update internal clock
Time time;
CmosGetRTC(&time);
TimeSetInternalTime(ConvertTimeToTimeSystem(time));
Log("Drivers", "Read RTC time: %#%u/%u/%u %u:%u:%u.%u\n", ColorLightCyan, time.Month, time.Day,
time.Year, time.Hour, time.Minute, time.Second, time.Milisecond);
}
void DriversInstall()
{
// Install clock
DriversInstall_Clock();
// Install fdc
IrqInstallHandler(6, FloppyIrqHandler);
FloppyInitialize();
}