1 #ifndef PARALLEL_INTERN_H
2 #define PARALLEL_INTERN_H
4 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
7 Desc: Private definitions for Parallel device.
11 #ifndef AROS_LIBCALL_H
12 # include <aros/libcall.h>
14 #ifndef EXEC_EXECBASE_H
15 # include <exec/execbase.h>
17 #ifndef EXEC_DEVICES_H
18 # include <exec/devices.h>
20 #ifndef EXEC_SEMAPHORES_H
21 # include <exec/semaphores.h>
26 #ifndef EXEC_SEMAPHORES_H
27 # include <exec/semaphores.h>
30 # include <exec/nodes.h>
32 #ifndef DEVICES_SERIAL_H
33 # include <devices/parallel.h>
48 struct ParallelUnit
* findUnit(struct parallelbase
* ParallelDevice
,
52 ULONG
RBF_InterruptHandler(UBYTE
* data
, ULONG length
, ULONG unitnum
, APTR userdata
);
53 ULONG
WBE_InterruptHandler(ULONG unitum
, APTR userdata
);
57 #define MINBUFSIZE 512
66 struct Library
*ParallelHidd
;
67 struct Library
*oopBase
;
69 OOP_Object
*ParallelObject
;
75 struct MinNode pu_Node
;
78 struct SignalSemaphore pu_Lock
;
80 struct MsgPort pu_QReadCommandPort
;
81 struct Message
* pu_ActiveRead
;
83 struct MsgPort pu_QWriteCommandPort
;
84 struct Message
* pu_ActiveWrite
;
85 ULONG pu_NextToWrite
; /* index in the buffer of next data to tx */
86 ULONG pu_WriteLength
; /* Number of bytes left to tx */
89 ULONG pu_Flags
; // copy of IOExtSer->io_SerFlags;
93 struct IOPArray pu_PTermArray
;
95 UBYTE pu_OpenerCount
; // Count how many openers this unit has. Important in shared mode
99 /* a few flags for the status */
100 #define STATUS_CHANGING_IN_BUFFER 1 /* the user requested a change of the size
101 of the input buffer and is now changing
102 the input buffer. During this time
103 it could happen that the interrupt that
104 holds incoming bytes writes to a memory
105 location that would be invalid.
106 This tells the interrupt to simply drop
107 the data that it was about to write
110 #define STATUS_READS_PENDING 2
111 #define STATUS_WRITES_PENDING 4 /* When the task write the first byte into the UART
112 it has to set this flag.
113 When the HW-interrupt happens and there is
114 no more byte to write to the UART this
115 flag has to be cleared immediately
117 #define STATUS_BUFFEROVERFLOW 8 /* This flag indicates that an overflow
118 occurred with the internal receive
119 buffer. All further bytes will be
120 dropped until somebody reads the contents
124 /* FIXME: Remove these #define xxxBase hacks
125 Do not use this in new code !
131 #define OOPBase (((struct parallelbase *)ParallelDevice)->oopBase)
133 #endif /* PARALLEL_INTERN_H */