home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / TRSICAT.LZX / CATS_CD2_TRSI / Inc&AD1.3 / Includes / devices / parallel.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-09-12  |  3.1 KB  |  94 lines

  1. #ifndef DEVICES_PARALLEL_H
  2. #define DEVICES_PARALLEL_H
  3. /*
  4. **    $Filename: devices/parallel.h $
  5. **    $Release: 1.3 $
  6. **
  7. **    external declarations for Serial Port Driver 
  8. **
  9. **    (C) Copyright 1985,1986,1987,1988 Commodore-Amiga, Inc.
  10. **        All Rights Reserved
  11. */
  12.  
  13. #ifndef      EXEC_IO_H
  14. #include "exec/io.h"
  15. #endif     !EXEC_IO_H 
  16.  
  17.  struct     IOPArray {
  18.     ULONG PTermArray0;
  19.     ULONG PTermArray1;
  20. };
  21.  
  22. /******************************************************************/
  23. /* CAUTION !!  IF YOU ACCESS the parallel.device, you MUST (!!!!) use
  24.    an IOExtPar-sized structure or you may overlay innocent memory !! */
  25. /******************************************************************/
  26.  
  27.  struct      IOExtPar {
  28.     struct     IOStdReq IOPar;
  29.  
  30. /*     STRUCT    MsgNode
  31. *   0    APTR     Succ
  32. *   4    APTR     Pred
  33. *   8    UBYTE     Type
  34. *   9    UBYTE     Pri
  35. *   A    APTR     Name
  36. *   E    APTR     ReplyPort
  37. *  12    UWORD     MNLength
  38. *     STRUCT   IOExt
  39. *  14    APTR     io_Device
  40. *  18    APTR     io_Unit
  41. *  1C    UWORD     io_Command
  42. *  1E    UBYTE     io_Flags
  43. *  1F    UBYTE     io_Error
  44. *     STRUCT   IOStdExt
  45. *  20    ULONG     io_Actual
  46. *  24    ULONG     io_Length
  47. *  28    APTR     io_Data
  48. *  2C    ULONG     io_Offset
  49. *  30 */
  50.     ULONG    io_PExtFlags;     /* (not used) flag extension area */
  51.     UBYTE    io_Status;     /* status of parallel port and registers */
  52.     UBYTE    io_ParFlags;     /* see PARFLAGS bit definitions below */
  53.     struct    IOPArray io_PTermArray; /* termination character array */
  54. };
  55.  
  56. #define PARB_SHARED    5       /* ParFlags non-exclusive access bit */
  57. #define PARF_SHARED    (1<<5)       /*     "     non-exclusive access mask */
  58. #define PARB_RAD_BOOGIE 3       /*     "     (not yet implemented) */
  59. #define PARF_RAD_BOOGIE (1<<3)       /*     "     (not yet implemented) */
  60. #define PARB_EOFMODE   1       /*     "     EOF mode enabled bit */
  61. #define PARF_EOFMODE   (1<<1)       /*     "     EOF mode enabled mask */
  62. #define IOPARB_QUEUED  6       /* IO_FLAGS rqst-queued bit */
  63. #define IOPARF_QUEUED  (1<<6)       /*     "     rqst-queued mask */
  64. #define IOPARB_ABORT   5       /*     "     rqst-aborted bit */
  65. #define IOPARF_ABORT   (1<<5)       /*     "     rqst-aborted mask */
  66. #define IOPARB_ACTIVE  4       /*     "     rqst-qued-or-current bit */
  67. #define IOPARF_ACTIVE  (1<<4)       /*     "     rqst-qued-or-current mask */
  68. #define IOPTB_RWDIR    3       /* IO_STATUS read=0,write=1 bit */
  69. #define IOPTF_RWDIR    (1<<3)       /*     "     read=0,write=1 mask */
  70. #define IOPTB_PARSEL   2       /*     "     printer selected on the A1000 */
  71. #define IOPTF_PARSEL   (1<<2)       /* printer selected & serial "Ring Indicator"
  72.                       on the A500 & A2000.  Be careful when
  73.                       making cables */
  74. #define IOPTB_PAPEROUT 1       /*     "     paper out bit */
  75. #define IOPTF_PAPEROUT (1<<1)       /*     "     paper out mask */
  76. #define IOPTB_PARBUSY  0       /*     "     printer in busy toggle bit */
  77. #define IOPTF_PARBUSY  (1<<0)       /*     "     printer in busy toggle mask */
  78. /* Note: previous versions of this include files had bits 0 and 2 swapped */
  79.  
  80. #define PARALLELNAME        "parallel.device"
  81.  
  82. #define PDCMD_QUERY        (CMD_NONSTD)
  83. #define PDCMD_SETPARAMS        (CMD_NONSTD+1)
  84.  
  85. #define ParErr_DevBusy        1
  86. #define ParErr_BufTooBig    2
  87. #define ParErr_InvParam        3
  88. #define ParErr_LineErr        4
  89. #define ParErr_NotOpen        5
  90. #define ParErr_PortReset    6
  91. #define ParErr_InitErr        7
  92.  
  93. #endif    /* DEVICES_PARALLEL_H */
  94.