Sorting source tree a bit
[tpg/acess2.git] / KernelLand / Modules / Storage / FDDv2 / common.h
1 /*
2  * Acess2 82077AA FDC
3  * - By John Hodge (thePowersGang)
4  *
5  * common.h
6  * - Common definitions
7  */
8 #ifndef _FDC_COMMON_H_
9 #define _FDC_COMMON_H_
10
11 #include <mutex.h>
12 #include <timers.h>
13
14 // === CONSTANTS ===
15 #define MAX_DISKS       8       // 4 per controller, 2 controllers
16 #define TRACKS_PER_DISK (1440*2/18)
17 #define BYTES_PER_TRACK (18*512)
18
19 // === TYPEDEFS ===
20 typedef struct sFDD_Drive       tDrive;
21
22 // === STRUCTURES ===
23 struct sFDD_Drive
24 {
25          int    bValid;
26          int    bInserted;
27          int    MotorState;
28         tTimer  *Timer;
29
30         tMutex  Mutex;
31         
32         void    *TrackData[TRACKS_PER_DISK];    // Whole tracks are read
33 };
34
35 // === FUNCTIONS ===
36 extern int      FDD_SetupIO(void);
37 extern int      FDD_int_ReadWriteTrack(int Disk, int Track, int bWrite, void *Buffer);
38
39 // === GLOBALS ===
40 extern tDrive   gaFDD_Disks[MAX_DISKS];
41
42 #endif
43

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