?? sddisk.h
字號:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/*++
Copyright (c) 1999-2000 SanDisk Corporation
Module Name:
sddisk.h
Abstract:
This module contains the function prototypes and constant, type,
global data and structure definitions for the WINCE Secured Digital
and Multimedia card driver.
--*/
#define DEBUG 1
#ifndef _SDDISK_H_
#define _SDDISK_H_
#ifdef __cplusplus
extern "C" {
#endif
#define DISK_IO_TIME_OUT 10000
#define REQUEST_TIME_OUT 30000
#define BYTES_PER_SECTOR 512
// (The other registers are defined in atapi.h)
#define STATE_INITING 1
#define STATE_CLOSED 2
#define STATE_OPENED 3
#define STATE_DEAD 4 // Power down
#define STATE_REMOVED 5 // Power down
//
// Structure to keep track of a disk
//
typedef struct _DISK {
struct _DISK * d_next;
CRITICAL_SECTION d_DiskCardCrit;// guard access to global state and card
DWORD d_DrvNo;
DWORD d_DiskCardState;
DISK_INFO d_DiskInfo; // for DISK_IOCTL_GET/SETINFOs
BOOL d_fLBAMode; // TRUE => logical block addressing supported
DWORD d_OpenCount; // open ref count
LPWSTR d_ActivePath; // Active key registry path
} DISK, * PDISK;
//
// Global Variables
//
extern DWORD v_MemGran; // memory granularity (usually 1)
extern CRITICAL_SECTION v_DiskCrit; // guard access to disk structure list
extern PDISK v_DiskList;
//
// Global functions
//
extern void CloseDisk(PDISK pDisk);
extern DWORD DoDiskIO(PDISK pDisk, DWORD Opcode, PSG_REQ pSG);
extern DWORD GetDiskInfo(PDISK pDisk, PDISK_INFO pInfo);
extern DWORD SetDiskInfo(PDISK pDisk, PDISK_INFO pInfo);
extern DWORD InitDisk(PDISK pDisk);
extern BOOL IsValidDisk(PDISK pDisk);
extern DWORD GetDiskStateError(DWORD DiskState);
#ifdef DEBUG
//
// Debug zones
//
#define ZONE_ERROR DEBUGZONE(0)
#define ZONE_WARNING DEBUGZONE(1)
#define ZONE_FUNCTION DEBUGZONE(2)
#define ZONE_INIT DEBUGZONE(3)
#define ZONE_IO DEBUGZONE(5)
#endif // DEBUG
#ifdef __cplusplus
}
#endif
#endif // _SDDISK_H_
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -