mirror of
https://github.com/gbowne1/ClassicOS.git
synced 2026-01-02 05:25:19 -08:00
Create floppy.h
floppy driver that works with the fat12 implementation
This commit is contained in:
19
kernel/floppy.h
Normal file
19
kernel/floppy.h
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
#ifndef FLOPPY_H
|
||||||
|
#define FLOPPY_H
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
|
#define FDC_DOR 0x3F2
|
||||||
|
#define FDC_MSR 0x3F4
|
||||||
|
#define FDC_FIFO 0x3F5
|
||||||
|
#define FDC_CCR 0x3F7
|
||||||
|
|
||||||
|
// Geometry for 1.44MB floppy
|
||||||
|
#define FLOPPY_SPT 18
|
||||||
|
#define FLOPPY_HPC 2
|
||||||
|
|
||||||
|
void floppy_init(void);
|
||||||
|
int floppy_read_sector(uint32_t lba, uint8_t* buffer);
|
||||||
|
void floppy_lba_to_chs(uint32_t lba, uint16_t* cyl, uint16_t* head, uint16_t* sect);
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user