home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ddkx86v5.zip / DDKX86 / SRC / DEV / DASD / OS2DASD / IOCTL.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-14  |  6.6 KB  |  155 lines

  1. /*DDK*************************************************************************/
  2. /*                                                                           */
  3. /* COPYRIGHT    Copyright (C) 1995 IBM Corporation                           */
  4. /*                                                                           */
  5. /*    The following IBM OS/2 WARP source code is provided to you solely for  */
  6. /*    the purpose of assisting you in your development of OS/2 WARP device   */
  7. /*    drivers. You may use this code in accordance with the IBM License      */
  8. /*    Agreement provided in the IBM Device Driver Source Kit for OS/2. This  */
  9. /*    Copyright statement may not be removed.                                */
  10. /*                                                                           */
  11. /*****************************************************************************/
  12. /*static char *SCCSID = "src/dev/dasd/os2dasd/ioctl.h, dsdm, ddk_subset, b_bdd.032 93/10/08";*/
  13.  
  14. /**************************************************************************
  15.  *
  16.  * SOURCE FILE NAME = IOCTL.H
  17.  *
  18.  * DESCRIPTIVE NAME = OS2DASD.DMD - OS/2 DASD Device Manager
  19.  *
  20.  *
  21.  *
  22.  * VERSION = V2.0
  23.  *
  24.  * DATE
  25.  *
  26.  * DESCRIPTION : IOCTL function codes
  27.  *
  28.  *
  29.  *
  30. */
  31. /*      Major and Minor Codes
  32. **      Category(Major) and Function(Minor) Codes
  33. **      -----------------------------------------
  34. **
  35. **      The Major and Minor values are each contained in a byte.
  36. **
  37. **      Major Code:
  38. **
  39. **              0... ....               - Microsoft Defined
  40. **              1... ....               - Oem/User Defined
  41. **              .xxx xxxx               - Code
  42. **
  43. **
  44. **      Minor Code:
  45. **
  46. **              0... ....               - Return error if unsupported
  47. **              1... ....               - Ignore if unsupported
  48. **              .0.. ....               - Intercepted by DOS
  49. **              .1.. ....               - Passed to driver
  50. **              ..0. ....               - Function sends data/commands to device
  51. **              ..1. ....               - Function querys data/info from device
  52. **              ...x xxxx               - Subfunction
  53. **
  54. **
  55. **      Note that the "sends/querys" data bit is intended only to
  56. **      regularize the function set.  It plays no critical role; some
  57. **      functions may contain elements of both command and query.  The
  58. **      convention is that such commands are defined as "sends data".
  59. */
  60.  
  61.  
  62.  
  63.  /*
  64.  ** Major and Minor Codes
  65.  */
  66.  
  67.  
  68. #define IOC_SE   1              /*  serial device control */
  69. #define IOSW_BR ((IOC_SW<<8) | 0x41)            /*  set baud rate */
  70. #define IOSR_BR ((IOC_SR<<8) | 0x61)            /*  return baud rate */
  71. #define IOSW_FC ((IOC_SW<<8) | 0x42)            /*  set frame control (stop bits, parity) */
  72. #define IOSR_FC ((IOC_SR<<8) | 0x62)            /*  return frame control (stop bits, parity) */
  73. #define IOSW_FI ((IOC_SW<<8) | 0x03)            /*  flush input side (seen by DOS and driver) */
  74. #define IOSW_FO ((IOC_SW<<8) | 0x04)            /*  flush output           (seen by DOS and driver) */
  75.  
  76. #define IOC_TC   2              /*  Terminal Control */
  77. #define IOTW_EC ((IOC_TC<<8) | 0x41)            /*  set echo control */
  78. #define IOTR_EC ((IOC_TC<<8) | 0x61)            /*  get echo control */
  79. #define     TTECHO      02
  80. #define IOTW_EM ((IOC_TC<<8) | 0x42)            /*  set edit mode (raw, cooked) */
  81. #define IOTR_EM ((IOC_TC<<8) | 0x62)            /*  get edit mode (raw, cooked) */
  82. #define     TTRAW       04
  83. #define IOTW_KI ((IOC_TC<<8) | 0x43)            /*  set keyboard intercept characters */
  84. #define IOTR_KI ((IOC_TC<<8) | 0x63)            /*  get keyboard intercept characters */
  85.  
  86. #define IOC_SC   3              /*  Screen Control */
  87. #define IOSC_LS ((IOC_SC<<8) | 0x41)            /*  Locate SIB */
  88. #define IOSC_SS ((IOC_SC<<8) | 0x42)            /*  save segment */
  89. #define IOSC_RS ((IOC_SC<<8) | 0x43)            /*  restore segment */
  90. #define IOSC_EI ((IOC_SC<<8) | 0x44)            /*  re-enable I/O */
  91. #define IOSC_IS ((IOC_SC<<8) | 0x45)            /*  initialize screen */
  92.  
  93. #define IOC_KC   4              /*  Keyboard Control */
  94. #define IOKC_LK ((IOC_KC<<8) | 0x41)            /*  Locate KIB */
  95. #define IOKC_SS ((IOC_KC<<8) | 0x42)            /*  save segment */
  96. #define IOKC_RS ((IOC_KC<<8) | 0x43)            /*  restore segment */
  97. #define IOKC_CK ((IOC_KC<<8) | 0x44)            /*  change keyboard images */
  98. #define IOKC_IK ((IOC_KC<<8) | 0x45)            /*  initialize keyboard */
  99. #define IOKC_SL ((IOC_KC<<8) | 0x06)            /*  set console locus */
  100. #define IOKC_RL ((IOC_KC<<8) | 0x07)            /*  reset console locus */
  101.  
  102.  
  103. #define IOC_PC   5              /*  printer Control */
  104.  
  105.  
  106. #define IOC_LP   6              /*  light pen */
  107.  
  108.  
  109. #define IOC_MC   7              /*  mouse Control */
  110.  
  111.  
  112.  
  113.                                 /* IOCTL Control */
  114.  
  115. #define FT_IOCTL_Cat    0x88
  116. #define FT_IOCTL_Func   0x51
  117.  
  118.  
  119.  /*
  120.  ** Logical Disk Control IOCTL
  121.  */
  122.  
  123. #define IOC_DC   0x08             /* disk control             */
  124. #define IODC_LK  0x00             /* Lock drive               */
  125. #define IODC_UL  0x01             /* unlock drive             */
  126. #define IODC_RM  0x02             /* redetermine media        */
  127. #define IODC_SL  0x03             /* set logical map          */
  128. #define IODC_BF  0x04             /* begin format             */
  129. #define IODC_BR  0x20             /* block removable          */
  130. #define IODC_GL  0x21             /* get logical map          */
  131. #define IODC_RC  0x40             /* Removable Media Control  */     /*@V51531*/
  132. #define IODC_SP  0x43             /* set device parameters    */
  133. #define IODC_WT  0x44             /* write track              */
  134. #define IODC_FT  0x45             /* format track             */
  135. #define IODC_QD  0x5d             /* quiesce/restart diskette */
  136. #define IODC_MS  0x60             /* Media Sense              */
  137. #define IODC_GP  0x63             /* get device parameters    */
  138. #define IODC_RT  0x64             /* READ TRACK               */
  139. #define IODC_VT  0x65             /* verify track             */
  140. #define IODC_ST  0x66             /* Drive status             */     /*@V51531*/
  141.  
  142.  /*
  143.  ** Physical Disk Control IOCTL
  144.  */
  145.  
  146. #define IOC_PD   0x09             /* physical disk control   */
  147. #define IOPD_LK  0x00             /* lock physical drive     */
  148. #define IOPD_UL  0x01             /* unlock physical drive   */
  149. #define IOPD_ED  0x22             /* install BDS functions   */
  150. #define IOPD_DM  0x47             /* Set DASD Mgr Parms      */      /*@V74404*/
  151. #define IOPD_RB  0x5e             /* readback function       */
  152. #define IOPD_DO  0x5f             /* DMA overrun function    */
  153.  
  154.  
  155.