📄 atamain.h
字号:
//**********************************************************************
//
// Filename: atamain.h
//
// Description:
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Use of this source code is subject to the terms of the Cirrus 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
// EULA.RTF on your install media.
//
// Copyright(c) Cirrus Logic Corporation 2005, All Rights Reserved
//
//**********************************************************************
//
// 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.
//
//**********************************************************************
#ifndef _ATAMAIN_H_
#define _ATAMAIN_H_
#include <windows.h>
#include <types.h>
#include <tchar.h>
#include <excpt.h>
#include <wdm.h>
#include <cardserv.h>
#include <cardapi.h>
#include <tuple.h>
#include <devload.h>
#include <diskio.h>
#include <nkintr.h>
#include <atapi2.h>
#include <cdioctl.h>
#include <dvdioctl.h>
#include <atapiio.h>
#include <diskmain.h>
#include <helper.h>
#include <debug.h>
#include <storemgr.h>
#include <hwdefs.h>
#define DEFAULT_MEDIA_CHECK_TIME 5000
#define MAX_RESET_ATTEMPTS 10
#define DEFAULT_WAIT_CHECK_ITER 2000
#define DEFAULT_WAIT_SAMPLE_TIMES 100
//#define DEFAULT_WAIT_STALL_TIME 400
#define DEFAULT_WAIT_STALL_TIME 4000
#define MAX_SECT_PER_COMMAND 256
// * * * CAMSDB - Original as of 05/18/04 = #define MAX_DMA_SECT_PER_COMMAND 63 (START)
#define MAX_DMA_SECT_PER_COMMAND 63
// * * * CAMSDB - Original as of 05/18/04 = #define MAX_DMA_SECT_PER_COMMAND 63 (END)
// * * * CAMSDB - Original as of 05/11/04 = #define MAX_CD_SECT_PER_COMMAND 32 (START)
#define MAX_CD_SECT_PER_COMMAND 16 //* * * 05/25/04 This was 16.
// * * * CAMSDB - Original as of 05/11/04 = #define MAX_CD_SECT_PER_COMMAND 32 (END)
#define DISK_IO_TIME_OUT 20000
//
// Timeouts for UDMA rev E0 fix. The time between the DMA interrupt and the ide
// interrupt occurring could be up to 10 seconds. The timout for the dma interrupt
// is pretty short because the transfer should have a max of 8 words in the UDMA fifo
// on a read.
//
#define UDMA_IDE_TIMEOUT 10000
#define UDMA_DMA_TIMEOUT 50
// Registry value names
#define REG_VALUE_MEDIACHECKTIME TEXT("MediaCheckTime")
#define REG_VALUE_CHS TEXT("CHSMode")
#define REG_VALUE_DMAENABLE TEXT("DMAEnable")
#define REG_VALUE_UDMAENABLE TEXT("UDMAEnable")
#define REG_VALUE_MDMA_MODE TEXT("BestMDMAMode")
#define REG_VALUE_UDMA_MODE TEXT("BestUDMAMode")
#define REG_VALUE_DVD TEXT("DVD")
#define REG_VALUE_INTENABLE TEXT("IntEnable")
#define REG_VALUE_HDPROFILE TEXT("HDProfile")
#define REG_VALUE_CDPROFILE TEXT("CDProfile")
#define ATA_SETTINGS_HDDMA 0x1
#define ATA_SETTINGS_CDDMA 0x4
BOOL AtaIsValidDisk(CDisk *pDisk);
void HardResetAndForcePIOMode(void);
typedef struct tagIDEBUS {
DWORD dwIoBase[5];
DWORD dwIoLen[5];
DWORD hDevice[4];
LPWSTR szDevice[4];
} IDEBUS, *PIDEBUS;
#endif _ATAMAIN_H_
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -