2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
5 Desc: Internal defs for trackdisk
8 #ifndef TRACKDISK_DEVICE_H
9 #define TRACKDISK_DEVICE_H
11 #include <exec/types.h>
12 #include <exec/devices.h>
13 #include <exec/semaphores.h>
14 #include <exec/interrupts.h>
15 #include <exec/tasks.h>
17 #include <devices/trackdisk.h>
19 /* Stack size - 4096 longwords should be enough */
20 #define STACK_SIZE 16384
22 /* Maximum number of units */
26 #define TDUF_WRITE (1<<0)
30 struct MsgPort td_Port
; // MessagePort
31 struct Task td_Task
; // Task Structure
32 APTR td_Stack
; // Keep stack here
35 #define TDU_NODISK 0x00
38 #define TDU_READONLY 0x01
39 #define TDU_WRITABLE 0x00
43 struct TDU_PublicUnit pub
;
44 struct List tdu_Listeners
;
45 APTR td_DMABuffer
; /* Buffer for DMA accesses */
46 BOOL tdu_Busy
; /* Unit working? */
47 UBYTE tdu_UnitNum
; /* Unit number */
48 UBYTE tdu_DiskIn
; /* Disk in drive? */
49 UBYTE tdu_MotorOn
; /* Motor on? */
54 UBYTE tdu_stepdir
; /* Last step direction for disk insertion detection */
55 UBYTE tdu_Present
; /* Drive is present? */
60 struct Device td_device
;
61 struct TaskData
*td_TaskData
;
62 struct TDU
*td_Units
[TD_NUMUNITS
];
63 struct timerequest
*td_TimerIO
;
64 struct MsgPort
*td_TimerMP
;
65 ULONG td_IntBit
; /* Sigbit for floppyints */
66 ULONG td_TmoBit
; /* Used for timeout signaling */
67 UBYTE td_comsize
; /* RAW command size */
68 UBYTE td_rawcom
[9]; /* RAW command to send */
69 UBYTE td_comsize2
; /* Secondary command (inside td_dinit()) */
71 UBYTE td_result
[7]; /* Last set of bytes */
72 UBYTE td_dor
; /* Digital Output Register */
78 struct Interrupt td_FloppyInt
;
79 struct Interrupt td_TimerInt
;
82 #endif /* TRACKDISK_DEVICE_H */