Set ansi/oem/mac code pages from current locale.
[wine] / include / aspi.h
1 /* ASPI definitions used for both WINASPI and WNASPI32 */
2
3 #ifndef __WINE_ASPI_H
4 #define __WINE_ASPI_H
5
6 #include "windef.h"
7
8 #include "pshpack1.h"
9 #ifdef __cplusplus
10 extern "C" {
11 #endif /* #ifdef __cplusplus */
12
13
14 /* Stuff in BOTH spec */
15
16 /* SCSI Miscellaneous Stuff */
17 #define SENSE_LEN                       14
18 #define SRB_DIR_SCSI                    0x00
19 #define SRB_POSTING                     0x01
20 #define SRB_ENABLE_RESIDUAL_COUNT       0x04
21 #define SRB_DIR_IN                      0x08
22 #define SRB_DIR_OUT                     0x10
23
24 /* ASPI Command Definitions */
25 #define SC_HA_INQUIRY                   0x00
26 #define SC_GET_DEV_TYPE                 0x01
27 #define SC_EXEC_SCSI_CMD                0x02
28 #define SC_ABORT_SRB                    0x03
29 #define SC_RESET_DEV                    0x04
30 #define SC_SET_HA_PARMS                 0x05
31 #define SC_GET_DISK_INFO                0x06
32
33 /* SRB status codes */
34 #define SS_PENDING                      0x00
35 #define SS_COMP                         0x01
36 #define SS_ABORTED                      0x02
37 #define SS_ABORT_FAIL                   0x03
38 #define SS_ERR                          0x04
39
40 #define SS_INVALID_CMD                  0x80
41 #define SS_INVALID_HA                   0x81
42 #define SS_NO_DEVICE                    0x82
43
44 #define SS_INVALID_SRB                  0xE0
45 #define SS_OLD_MANAGER                  0xE1
46 #define SS_BUFFER_ALIGN                 0xE1 // Win32
47 #define SS_ILLEGAL_MODE                 0xE2
48 #define SS_NO_ASPI                      0xE3
49 #define SS_FAILED_INIT                  0xE4
50 #define SS_ASPI_IS_BUSY                 0xE5
51 #define SS_BUFFER_TO_BIG                0xE6
52 #define SS_MISMATCHED_COMPONENTS        0xE7 // DLLs/EXE version mismatch
53 #define SS_NO_ADAPTERS                  0xE8
54 #define SS_INSUFFICIENT_RESOURCES       0xE9
55 #define SS_ASPI_IS_SHUTDOWN             0xEA
56 #define SS_BAD_INSTALL                  0xEB
57
58
59 /* Host status codes */
60 #define HASTAT_OK                       0x00
61 #define HASTAT_SEL_TO                   0x11
62 #define HASTAT_DO_DU                    0x12
63 #define HASTAT_BUS_FREE                 0x13
64 #define HASTAT_PHASE_ERR                0x14
65
66 #define HASTAT_TIMEOUT                  0x09
67 #define HASTAT_COMMAND_TIMEOUT          0x0B
68 #define HASTAT_MESSAGE_REJECT           0x0D
69 #define HASTAT_BUS_RESET                0x0E
70 #define HASTAT_PARITY_ERROR             0x0F
71 #define HASTAT_REQUEST_SENSE_FAILED     0x10
72
73
74
75
76
77 /*********** OLD ****************/
78
79 /* Target status codes */
80 #define STATUS_GOOD             0x00
81 #define STATUS_CHKCOND          0x02
82 #define STATUS_BUSY             0x08
83 #define STATUS_RESCONF          0x18
84
85 #define ASPI_POSTING(prb) (prb->SRB_Flags & 0x1)
86
87 /* WNASPI32/WINASPI defs */
88 #define HOST_TO_TARGET(prb) (((prb->SRB_Flags>>3) & 0x3) == 0x2)
89 #define TARGET_TO_HOST(prb) (((prb->SRB_Flags>>3) & 0x3) == 0x1)
90 #define NO_DATA_TRANSFERED(prb) (((prb->SRB_Flags>>3) & 0x3) == 0x3)
91
92
93 #define INQUIRY_VENDOR          8
94
95 #define MUSTEK_SCSI_AREA_AND_WINDOWS 0x04
96 #define MUSTEK_SCSI_READ_SCANNED_DATA 0x08
97 #define MUSTEK_SCSI_GET_IMAGE_STATUS 0x0f
98 #define MUSTEK_SCSI_ADF_AND_BACKTRACE 0x10
99 #define MUSTEK_SCSI_CCD_DISTANCE 0x11
100 #define MUSTEK_SCSI_START_STOP 0x1b
101
102 #define CMD_TEST_UNIT_READY 0x00
103 #define CMD_REQUEST_SENSE 0x03
104 #define CMD_INQUIRY 0x12
105
106 /* scanner commands - just for debug */
107 #define CMD_SCAN_GET_DATA_BUFFER_STATUS 0x34
108 #define CMD_SCAN_GET_WINDOW 0x25
109 #define CMD_SCAN_OBJECT_POSITION 0x31
110 #define CMD_SCAN_READ 0x28
111 #define CMD_SCAN_RELEASE_UNIT 0x17
112 #define CMD_SCAN_RESERVE_UNIT 0x16
113 #define CMD_SCAN_SCAN 0x1b
114 #define CMD_SCAN_SEND 0x2a
115 #define CMD_SCAN_CHANGE_DEFINITION 0x40
116
117 #define INQURIY_CMDLEN 6
118 #define INQURIY_REPLY_LEN 96
119 #define INQUIRY_VENDOR 8
120
121 #define SENSE_BUFFER(prb) (&prb->CDBByte[prb->SRB_CDBLen])
122
123 #ifdef __cplusplus
124 }
125 #endif /* #ifdef __cplusplus */
126 #include "poppack.h"
127
128 #endif