1 #ifndef DEVICES_PARALLEL_H
    2 #define DEVICES_PARALLEL_H
    3 
    4 /*
    5 	parallel.device include
    6 
    7 	Copyright © 2002 The MorphOS Development Team, All Rights Reserved.
    8 */
    9 
   10 #ifndef EXEC_IO_H
   11 # include <exec/io.h>
   12 #endif
   13 
   14 #pragma pack(2)
   15 
   16 
   17 struct IOPArray
   18 {
   19 	ULONG PTermArray0;
   20 	ULONG PTermArray1;
   21 };
   22 
   23 
   24 struct IOExtPar
   25 {
   26 	struct IOStdReq IOPar;
   27 
   28 	ULONG           io_PExtFlags;
   29 	UBYTE           io_Status;
   30 	UBYTE           io_ParFlags;
   31 	struct IOPArray io_PTermArray;
   32 };
   33 
   34 
   35 /* io_ParFlags values */
   36 
   37 #define PARB_SHARED      5
   38 #define PARF_SHARED      (1<<PARB_SHARED)
   39 #define PARB_SLOWMODE    4
   40 #define PARF_SLOWMODE    (1<<PARB_SLOWMODE)
   41 #define PARB_FASTMODE    3
   42 #define PARF_FASTMODE    (1<<PARB_FASTMODE)
   43 #define PARB_RAD_BOOGIE  3
   44 #define PARF_RAD_BOOGIE  (1<<PARB_RAD_BOOGIE)
   45 
   46 #define PARB_ACKMODE     2
   47 #define PARF_ACKMODE     (1<<PARB_ACKMODE)
   48 
   49 #define PARB_EOFMODE     1
   50 #define PARF_EOFMODE     (1<<PARB_EOFMODE)
   51 
   52 /* MorphOS extension for Pegasos */
   53 
   54 #define PARF_MODEMASK    0xc0
   55 #define PARMODE_STD      0x00           /* Standard parallel mode */
   56 #define PARMODE_EPP      0x40           /* EPP mode */
   57 #define PARMODE_ECP      0x80           /* ECP mode, RLE compression disabled */
   58 #define PARMODE_ECP_COMP 0xc0           /* ECP mode, RLE compression enabled */
   59 
   60 
   61 /* io_Status values */
   62 
   63 #define IOPARB_QUEUED    6
   64 #define IOPARF_QUEUED    (1<<IOPARB_QUEUED)
   65 #define IOPARB_ABORT     5
   66 #define IOPARF_ABORT     (1<<IOPARB_ABORT)
   67 #define IOPARB_ACTIVE    4
   68 #define IOPARF_ACTIVE    (1<<IOPARB_ACTIVE)
   69 
   70 #define IOPTB_RWDIR      3
   71 #define IOPTF_RWDIR      (1<<IOPTB_RWDIR)
   72 #define IOPTB_PARSEL     2
   73 #define IOPTF_PARSEL     (1<<IOPTB_PARSEL)
   74 #define IOPTB_PAPEROUT   1
   75 #define IOPTF_PAPEROUT   (1<<IOPTB_PAPEROUT)
   76 #define IOPTB_PARBUSY    0
   77 #define IOPTF_PARBUSY    (1<<IOPTB_PARBUSY)
   78 
   79 
   80 #define PARALLELNAME  "parallel.device"
   81 
   82 
   83 #define PDCMD_QUERY      (CMD_NONSTD + 0)
   84 #define PDCMD_SETPARAMS  (CMD_NONSTD + 1)
   85 
   86 
   87 #define ParErr_DevBusy    1
   88 #define ParErr_BufTooBig  2
   89 #define ParErr_InvParam   3
   90 #define ParErr_LineErr    4
   91 #define ParErr_NotOpen    5
   92 #define ParErr_PortReset  6
   93 #define ParErr_InitErr    7
   94 
   95 
   96 #pragma pack()
   97 
   98 #endif /* DEVICES_PARALLEL_H */