Fix MIT license language to make its intent clearer.
[pub/USBasp.git] / Demos / Device / LowLevel / MassStorage / Lib / SCSI_Codes.h
1 /*
2 LUFA Library
3 Copyright (C) Dean Camera, 2009.
4
5 dean [at] fourwalledcubicle [dot] com
6 www.fourwalledcubicle.com
7 */
8
9 /*
10 Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)
11
12 Permission to use, copy, modify, distribute, and sell this
13 software and its documentation for any purpose is hereby granted
14 without fee, provided that the above copyright notice appear in
15 all copies and that both that the copyright notice and this
16 permission notice and warranty disclaimer appear in supporting
17 documentation, and that the name of the author not be used in
18 advertising or publicity pertaining to distribution of the
19 software without specific, written prior permission.
20
21 The author disclaim all warranties with regard to this
22 software, including all implied warranties of merchantability
23 and fitness. In no event shall the author be liable for any
24 special, indirect or consequential damages or any damages
25 whatsoever resulting from loss of use, data or profits, whether
26 in an action of contract, negligence or other tortious action,
27 arising out of or in connection with the use or performance of
28 this software.
29 */
30
31 /** \file
32 *
33 * Header containing macros for possible SCSI commands and SENSE data. Refer to
34 * the SCSI standard documentation for more information on each SCSI command and
35 * the SENSE data.
36 */
37
38 #ifndef _SCSI_CODES_H_
39 #define _SCSI_CODES_H_
40
41 /* Macros: */
42 #define SCSI_CMD_INQUIRY 0x12
43 #define SCSI_CMD_REQUEST_SENSE 0x03
44 #define SCSI_CMD_TEST_UNIT_READY 0x00
45 #define SCSI_CMD_READ_CAPACITY_10 0x25
46 #define SCSI_CMD_SEND_DIAGNOSTIC 0x1D
47 #define SCSI_CMD_PREVENT_ALLOW_MEDIUM_REMOVAL 0x1E
48 #define SCSI_CMD_WRITE_10 0x2A
49 #define SCSI_CMD_READ_10 0x28
50 #define SCSI_CMD_WRITE_6 0x0A
51 #define SCSI_CMD_READ_6 0x08
52 #define SCSI_CMD_VERIFY_10 0x2F
53 #define SCSI_CMD_MODE_SENSE_6 0x1A
54 #define SCSI_CMD_MODE_SENSE_10 0x5A
55
56 #define SCSI_SENSE_KEY_GOOD 0x00
57 #define SCSI_SENSE_KEY_RECOVERED_ERROR 0x01
58 #define SCSI_SENSE_KEY_NOT_READY 0x02
59 #define SCSI_SENSE_KEY_MEDIUM_ERROR 0x03
60 #define SCSI_SENSE_KEY_HARDWARE_ERROR 0x04
61 #define SCSI_SENSE_KEY_ILLEGAL_REQUEST 0x05
62 #define SCSI_SENSE_KEY_UNIT_ATTENTION 0x06
63 #define SCSI_SENSE_KEY_DATA_PROTECT 0x07
64 #define SCSI_SENSE_KEY_BLANK_CHECK 0x08
65 #define SCSI_SENSE_KEY_VENDOR_SPECIFIC 0x09
66 #define SCSI_SENSE_KEY_COPY_ABORTED 0x0A
67 #define SCSI_SENSE_KEY_ABORTED_COMMAND 0x0B
68 #define SCSI_SENSE_KEY_VOLUME_OVERFLOW 0x0D
69 #define SCSI_SENSE_KEY_MISCOMPARE 0x0E
70
71 #define SCSI_ASENSE_NO_ADDITIONAL_INFORMATION 0x00
72 #define SCSI_ASENSE_LOGICAL_UNIT_NOT_READY 0x04
73 #define SCSI_ASENSE_INVALID_FIELD_IN_CDB 0x24
74 #define SCSI_ASENSE_WRITE_PROTECTED 0x27
75 #define SCSI_ASENSE_FORMAT_ERROR 0x31
76 #define SCSI_ASENSE_INVALID_COMMAND 0x20
77 #define SCSI_ASENSE_LOGICAL_BLOCK_ADDRESS_OUT_OF_RANGE 0x21
78 #define SCSI_ASENSE_MEDIUM_NOT_PRESENT 0x3A
79
80 #define SCSI_ASENSEQ_NO_QUALIFIER 0x00
81 #define SCSI_ASENSEQ_FORMAT_COMMAND_FAILED 0x01
82 #define SCSI_ASENSEQ_INITIALIZING_COMMAND_REQUIRED 0x02
83 #define SCSI_ASENSEQ_OPERATION_IN_PROGRESS 0x07
84
85 #endif