sensedat.h

来自「用ST92163开发的鼠标」· C头文件 代码 · 共 60 行

H
60
字号
/*-*-*-*-*-*-*-*-*-*-* (C) 2000 STMicroelectronics *-*-*-*-*-*-*-*-*-*-*-*-*-*

PROJECT  : ST92163 USB Mass Storage Class - Bulk-Only
COMPILER : ST9 C

MODULE  :  SenseDat.h
VERSION :  V 1.2

CREATION DATE :  19/09/2000

AUTHOR : Microcontroller Division - ePI BU Application Lab
-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/


// Definition of Sense Key
#define NO_SENSE		0
#define RECOVERED_ERROR	1
#define NOT_READY		2
#define MEDIUM_ERROR	3
#define HARDWARE_ERROR	4
#define ILLEGAL_REQUEST	5
#define UNIT_ATTENTION	6
#define DATA_PROTECT	7
#define BLANK_CHECK		8
#define VENDOR_SPECIFIC	9
#define COPY_ABORTED	10
#define ABORTED_COMMAND	11
#define VOLUME_OVERFLOW	13
#define MISCOMPARE		14

// Definitions of Additional Sense Code and Additional Sense Code Qualifier
#define	MODE_PARAMETERS_CHANGED		0x2A01

#define INVALID_COMMAND_CODE		0x2000
#define POWER_ON_RESET				0x2900
#define ADDRESS_OUT_OF_RANGE		0x2100
#define INVALID_CDB_FIELD			0x2400
#define MEDIA_NOT_PRESENT			0x3A00
#define MEDIA_CHANGED				0x2800
#define READ_ERROR					0x1111
#define WRITE_FAULT					0x0300
#define READ_PAST_END_MEDIUM		0x3B09
#define WRITE_PROTECT				0x2700

#define SENSE_LIST_DEEPTH	6
typedef struct _SENSE_ITEM {
	BYTE	SKey;
	union {
		WORD	Data;
		struct _ASCs {
			BYTE	ASC;
			BYTE	ASCQ;
		} b;
		BYTE*	pData;
	} w;
} SENSE_ITEM;

#define Push_SenseData(Buf)	Push_SenseCode(0x00, (WORD)(Buf))
void Push_SenseCode(BYTE SKey, WORD ASC_ASCQ);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?