printer usb
源代码在线查看: usbmass.h
/*
* Start of Zoran Standard Header
* Copyright (c) 2003 - 2004 Zoran Corporation.
*
*
* All rights reserved. Proprietary and confidential.
*
* DESCRIPTION for usbmass.h
* Include file for usbmass.c
*
* NEW HISTORY COMMENT (description must be followed by a blank line)
*
* ===== HISTORY of changes in //depot/misc/projects/tps/usb/usbmass.h
*
* 28/May/04 #10 lee Add sense code.
* 20/Apr/04 #9 lee Add sense code for "media changed"
* 15/Mar/04 #8 lee Define MODE_SENSE10.
* 3/Mar/04 #7 lee Added define for Funai 02-27-04 code.
* 11/Dec/03 #6 lee Make module non-executable (again).
* 30/Oct/03 #5 lee Make this file not executable.
* 7/Oct/03 #4 lee Continued development.
* 6/Oct/03 #3 lee Moved prototypes to usb.h.
* 2/Oct/03 #2 lee More SCSI commands, sense codes, etc.
* 19/Sep/03 #1 lee Created.
*
* End of Zoran Standard Header
*/
/* USB Mass Storage Class Bulk-Only Transport - Device */
#ifndef USBMASS_INCLUDED
#define USBMASS_INCLUDED
/* supported SCSI command opcodes */
#define INQUIRY 0x12
#define MODE_SENSE6 0x1A
#define MODE_SENSE10 0x5A
#define PREVENT_ALLOW_MEDIUM_REMOVAL 0x1E
#define READ10 0x28
#define READ12 0xA8
#define READ_CAPACITY 0x25
#define READ_FORMAT_CAPACITIES 0x23
#define REQUEST_SENSE 0x03
#define SEND_DIAGNOSTIC 0x1D
#define TEST_UNIT_READY 0x00
#define VERIFY 0x2F
#define WRITE10 0x2A
#define WRITE12 0xAA
#ifdef FUNAI_MODIFY_022704
#define CARD_CHECK_TEST 0xFF /* for Memory Card Check Test */
#endif /* FUNAI_MODIFY_022704 */
/* Command status values */
#define COMMAND_PASSED 0
#define COMMAND_FAILED 1
#define PHASE_ERROR 2
/* Sense keys: | key (8) | additional code (8) | additional qualifier (8) | */
#define NO_SENSE 0
#define SENSE_DRIVE_NOT_READY ((0x02 #define SENSE_MEDIUM_NOT_PRESENT ((0x02 #define SENSE_USB_TO_HOST_FAILURE ((0x02 #define SENSE_WRITE_FAULT ((0x03 #define SENSE_READ_ERROR ((0x03 #define SENSE_INVALID_CMD_OPCODE ((0x05 #define SENSE_ADDRESS_OUT_OF_RANGE ((0x05 #define SENSE_INVALID_FIELD_IN_CMD ((0x05 #define SENSE_UNIT_ATTN_MEDIA_CHNGD ((0x06 #define SENSE_WRITE_PROTECTED_MEDIA ((0x07
#endif /* USBMASS_INCLUDED */