revert between 56095 -> 55830 in arch
[AROS.git] / arch / i386-pc / drivers / parallel.hidd / parallel_intern.h
blobe4954bc4027d2363624db26ea4c776fecdca753d
1 /*
2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #ifndef PARALLEL_HIDD_INTERN_H
7 #define PARALLEL_HIDD_INTERN_H
9 /* Include files */
11 #ifndef EXEC_LIBRARIES_H
12 # include <exec/libraries.h>
13 #endif
14 #ifndef OOP_OOP_H
15 # include <oop/oop.h>
16 #endif
17 #ifndef HIDD_PARALLEL_H
18 # include <hidd/parallel.h>
19 #endif
20 #include <dos/dos.h>
22 #define PAR_MAX_UNITS 3
24 struct HIDDParallelData
26 OOP_Class *ParallelHIDDClass;
28 OOP_Object *ParallelUnits[PAR_MAX_UNITS];
29 UBYTE usedunits;
33 #define PAR_UNIT_0_F 1
34 #define PAR_UNIT_1_F 2
35 #define PAR_UNIT_2_F 4
38 struct class_static_data
40 OOP_Class *parallelhiddclass;
41 OOP_Class *parallelunitclass;
44 struct HIDDParallelUnitData
46 VOID (*DataWriteCallBack) (ULONG unitnum, APTR userdata);
47 VOID (*DataReceivedCallBack)(UBYTE *buffer, ULONG len, ULONG unitnum, APTR userdata);
48 VOID *DataWriteUserData;
49 VOID *DataReceivedUserData;
51 ULONG unitnum;
52 ULONG baseaddr;
53 BOOL stopped;
55 #if 0
56 struct MsgPort *replyport_read;
57 struct Interrupt *softint_read;
58 HIDD unixio_read;
60 struct MsgPort *replyport_write;
61 struct Interrupt *softint_write;
62 HIDD unixio_write;
63 #endif
67 /* Library base */
69 struct IntHIDDParallelBase
71 struct Library hdg_LibNode;
72 struct Library *hdg_UtilityBase;
74 struct class_static_data hdg_csd;
78 #define CSD(x) ((struct class_static_data *)x)
81 * Define some names for the registers
83 #define PAR_DATA 0 /* In/Out: Parallel Data */
84 #define PAR_SP 1 /* In: Status Port */
85 #define PAR_PCP 2 /* In/Out: Parallel Control Port */
87 #define PAR_SP_BUSY 0x80
88 #define PAR_SP_ACK 0x40
89 #define PAR_SP_PE 0x20
90 #define PAR_SP_SLCT 0x10
91 #define PAR_SP_ERROR 0x08
92 #define PAR_SP_IRQ_STATUS 0x04
94 #define PAR_PCP_DIRECTION 0x20 /* Mask for direction bit */
95 #define PAR_PCP_IRQ_EN 0x10 /* enables the parallel port irq */
96 #define PAR_PCP_SLCT_IN 0x08 /* control fr select in signal */
97 #define PAR_PCP_INIT 0x04 /* initialize printer signal */
98 #define PAR_PCP_AUTO_FD_XT 0x02 /* automatic feed xt */
99 #define PAR_PCP_STROBE 0x01 /* strobe signal */
101 #endif /* PARALLEL_HIDD_INTERN_H */