home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 502b.lha / PCQ_v1.2 / Include / Exec / Devices.i < prev    next >
Text File  |  1991-05-07  |  946b  |  44 lines

  1. {
  2.     Devices.i for PCQ Pascal
  3. }
  4.  
  5. {$I "Include:Exec/Libraries.i"}
  6. {$I "Include:Exec/Ports.i"}
  7.  
  8. {***** Device *****************************************************}
  9.  
  10. type
  11.     Device = record
  12.     dd_Library : Library;
  13.     end;
  14.     DevicePtr = ^Device;
  15.  
  16. {***** Unit *******************************************************}
  17.  
  18.     Unit = record
  19.     unit_MsgPort    : MsgPort;    { queue for unprocessed messages }
  20.                     { instance of msgport is recommended }
  21.     unit_flags    : Byte;
  22.     unit_pad    : Byte;
  23.     unit_OpenCnt    : Short;    { number of active opens }
  24.     end;
  25.     UnitPtr = ^Unit;
  26.  
  27. const
  28.     UNITF_ACTIVE    = 1;
  29.     UNITF_INTASK    = 2;
  30.  
  31. Procedure AddDevice(device : DevicePtr);
  32.     External;
  33.  
  34. Procedure CloseDevice(io : Address);    { io is an IORequestPtr }
  35.     External;
  36.  
  37. Function OpenDevice(devName : String; unitNumber : Integer;
  38.             io : Address; flags : Integer) : Integer;
  39.     External;    { io is an IORequestPtr }
  40.  
  41. Procedure RemDevice(device : DevicePtr);
  42.     External;
  43.  
  44.