📄 globals.h
字号:
//-----------------------------------------------------------------------------
// File: globals.h
// Contents: global variables used by the firmware
//
// indent 3. NO TABS!
//
// Copyright (c) 2001 Cypress Semiconductor
//
// $Workfile: GLOBALS.H $
// $Date: 7/23/02 5:20p $
// $Revision: 5 $
//-----------------------------------------------------------------------------
extern BYTE AlternateSetting; // Alternate settings
extern BYTE Configuration; // Current configuration
extern WORD pConfigDscr;
extern WORD pOtherConfigDscr;
extern WORD wPacketSize;
// Globals for storing per-LUN information. Data about each LUN (Logical Unit) is stored
// in two different places: 1) A struct in DATA space for storing drive geometry, capacity,
// etc., 2) a bit field in the BIT DATA area for storing device flags that we need to access
// efficiently. For each request (CBW), the firmware will swap in the appropriate LUN
// information
// The flags for the LUN that is currently being accessed.
extern BYTE bdata ActiveLunBits;
// Storage area for LUN0 and LUN1 flags
extern BYTE bdata LunBits[];
// bit defines for the active LUN
extern bit bDevicePresent;
extern bit bMasterSlave ; // 0 == device0 (master), 1 == device1 (slave)
extern bit bScsi;
extern bit bExtAddrSupport;
extern bit bCompactFlash;
extern BYTE currentLunNum;
// Device info for the Active LUN
extern DEVICE_CONFIG_DATA ActiveLunConfigData;
// Sorage area for the LUN0 and LUN1 device info
extern DEVICE_CONFIG_DATA DeviceConfigData[];
// this variable is used to store the number of devices attached to the IDE bus. This is what
// we will use to forumlate our response to the GET MAX LUN Mass Storage Class request.
extern BYTE deviceCount;
extern bit bSkipPinReset;
extern bit bFirstTime;
extern bit bSwitchToHighSpeed;
extern bit bHighSpeedEnabled;
extern xdata BYTE halfKBuffer[];
extern WORD cbwTagLow; // Tag from the most recent CBW packet
extern WORD cbwTagHi;
extern BYTE currentState;
extern DWORD dataTransferLen;
extern volatile BYTE seconds;
extern volatile BYTE hertz61ticks;
extern bit noFlashMedia;
extern bit directionIn;
extern bit phaseErrorState;
extern bit useUdma;
extern bit bShortPacketSent;
extern BYTE udmaErrorCount;
extern bit Sleep;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -