2 Copyright © 1995-2007, The AROS Development Team. All rights reserved.
6 #ifndef PARALLEL_HIDD_INTERN_H
7 #define PARALLEL_HIDD_INTERN_H
11 #ifndef EXEC_LIBRARIES_H
12 # include <exec/libraries.h>
17 #ifndef HIDD_PARALLEL_H
18 # include <hidd/parallel.h>
22 #define PAR_MAX_UNITS 3
24 struct HIDDParallelData
26 OOP_Class
*ParallelHIDDClass
;
28 OOP_Object
*ParallelUnits
[PAR_MAX_UNITS
];
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
;
56 struct MsgPort
*replyport_read
;
57 struct Interrupt
*softint_read
;
60 struct MsgPort
*replyport_write
;
61 struct Interrupt
*softint_write
;
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 */