⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cedriver.h

📁 Windows CE 6.0 BSP for VOIP sample phone. Intel PXA270 platform.
💻 H
字号:
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES OR INDEMNITIES.
//

//           Copyright (C) M-Systems Flash Disk Pioneers Ltd. 1995-2005            

//**********************************************************************
//                                                                      
// Header file for the CEdriver.c, the FLite driver layer for WinCE     
//                                                                      
//**********************************************************************

#ifndef _CEDRIVER_H
#define _CEDRIVER_H

#ifdef __cplusplus
extern "C" {
#endif

#include <windows.h>
#include <windev.h>
#include <devload.h>
#include <diskio.h>
#include "blockdev.h"
#include <storemgr.h>


#define TRUEFFS_DEFAULT_PROFILE TEXT("TRUEFFS_DOC")

#define DEFAULT_FOLDING_RESOLUTION 0x1000

//Available registry entries
#define PROFILE_REGISTRY_NAME       L"Profile"
#define FOLDING_RESOLUTION_REG_NAME L"BackgroundFoldingResolution"


// Device states - To guard against races during trasitions to and from       
// standby mode, a disk starts in the STATE_INITIALIZING state. Upon entering 
// standby mode, a disk goes into the STATE_DEAD state and can no longer      
// be used. Coming out of standby mode, the pcmcia system will force a card   
// removal and this driver will get unloaded. Between the time the device     
// has left standby mode and the card removal notice gets generated, the disk 
// should not be used at all, since as the driver is unloading it unmaps the  
// memory windows to pcmcia common memory space.                              
#define STATE_UNINITIALIZED  0          // pre DSK_Init(), post DSK_Deinit() 
#define STATE_INITIALIZING   1          // pre DSK_Init() 
#define STATE_CLOSED         2
#define STATE_OPENED         3
#define STATE_DEAD           0x8000     // Power down 


//============================================================================
// Enum Name: FLMountStatus                                                   
// Purpose..: Volume mount status.                                            
//============================================================================
typedef enum
{
    FL_MOUNT_NOT_ATTEMPTED = 0,
    FL_MOUNTED
} FLMountStatus;


//============================================================================
// Structure Name: DISK                                                       
// Purpose.......: Structure to hold volume information and keep track of it. 
//============================================================================

#define TFFS_DISK_SIGNATURE     0x1A2B3C4D

typedef struct _DISK
{
    DISK_INFO               diskInfo;           // For DISK_IOCTL_GET/SETINFO 
    DWORD                   diskState;
    FLMountStatus           mountStatus;
    DWORD                   openCount;          // Open ref count 
    LPWSTR                  registryPath;       // Active key registry path 
    CRITICAL_SECTION        cs;
    DWORD                   numberOfMounts;
    DWORD                   totalSectorWrite;
    DWORD                   totalSectorRead;
    DWORD                   sectorWriteSinceFolding;
    BOOL                    foldingThreadInProcess;
    DWORD                   foldingResolution;
    BYTE*                   intermediateBuf;
    DWORD                   signature;          // To validate the structure.
} DISK, *PDISK;


#endif //_CEDRIVER_H 

⌨️ 快捷键说明

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