diff options
| author | Michal Idziorek <m.i@gmx.at> | 2014-09-03 00:15:51 +0200 |
|---|---|---|
| committer | Michal Idziorek <m.i@gmx.at> | 2014-09-03 00:15:51 +0200 |
| commit | aad04a2208fbde8db2c1a81d6057c1ac4edb390e (patch) | |
| tree | 87f3b47c5f85d6c7c5921e799571b42906d0eb0a /kernel/floppy.c | |
| parent | 1a3a3a20773a5664c653a8aebcd10d288962285b (diff) | |
ACPI support !
Diffstat (limited to 'kernel/floppy.c')
| -rw-r--r-- | kernel/floppy.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/kernel/floppy.c b/kernel/floppy.c index e6d2d11..e00e96b 100644 --- a/kernel/floppy.c +++ b/kernel/floppy.c @@ -16,19 +16,22 @@ * */ -#include "x86.h" - -#include "../lib/logger/log.h" // logger facilities #define FOOLOS_MODULE_NAME "floppy" +#ifdef FOOLOS_COMPILE_FLOPPY + +#include "lib/logger/log.h" + +#include "x86.h" + #define FLPY_SECTORS_PER_TRACK 18 void flpydsk_send_command (uint8_t cmd); void flpydsk_wait_irq (); void flpydsk_check_int (uint32_t* st0, uint32_t* cyl); -static volatile int _CurrentDrive=0; -static volatile uint8_t _FloppyDiskIRQ = 0; +static volatile int _CurrentDrive; +static volatile uint8_t _FloppyDiskIRQ; // temporary dma hack //! initialize DMA to use phys addr 1k-64k @@ -158,14 +161,6 @@ void flpydsk_write_ccr (uint8_t val) { x86_outb (FLPYDSK_CTRL, val); } -void sleep(int i) -{ - i*=1000000; - for(;i>0;i--) - { - - } -} void flpydsk_motor_on() { @@ -561,3 +556,4 @@ void floppy_init() } +#endif |
