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

📄 sdenum.h

📁 SAMSUNG S3C6410 CPU BSP for winmobile6
💻 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.
//

#ifndef _SDENUM_H_
#define _SDENUM_H_

#include <SDCardDDK.h>
#include <DefBus.h>


#define DEFAULT_SD_BUS_NAME _T("SDCARD")

struct SDCARD_DEVICE_CONTEXT;


class CSdDeviceFolder : public DeviceFolder {
public:
    CSdDeviceFolder(LPCTSTR pszBusName, LPCTSTR pszTemplateRegPath, 
        SDCARD_DEVICE_CONTEXT *pDevice,
        DWORD dwBusType, DWORD dwBusNumber, PCI_SLOT_NUMBER SlotNumber, 
        HANDLE hParent, DWORD dwInitReg);
    virtual ~CSdDeviceFolder() {}

    CEDEVICE_POWER_STATE GetPowerState();
    BOOL SetPowerState(CEDEVICE_POWER_STATE cpsNew);

private:
    SDCARD_DEVICE_CONTEXT *m_pDevice;
};


class CSdBusEnum : public DefaultBusDriver {
public:
    CSdBusEnum(LPCTSTR pszActiveRegPath);
    virtual ~CSdBusEnum();
    virtual BOOL Init();

    virtual DWORD GetBusNamePrefix(LPTSTR pszReturnBusName, DWORD cchReturnBusName);

    virtual SD_API_STATUS ActivateChild(LPCTSTR pszChildDeviceKey, DWORD dwHCNumber,
        DWORD dwSlotNumber, DWORD dwFunctionNumber, SDCARD_DEVICE_CONTEXT *pDevice,
        CSdDeviceFolder **ppDeviceFolder);

    virtual SD_API_STATUS DeactivateChild(CSdDeviceFolder *pDeviceFolder);

    virtual BOOL IOControl(DWORD dwCode, PBYTE pBufIn, DWORD dwLenIn, 
        PBYTE pBufOut, DWORD dwLenOut, PDWORD pdwActualOut);

    BOOL SetBusName(LPCTSTR pszBusName);

private:
    LPCTSTR GetBusName();

    LPTSTR m_pszBusName;
};

#endif // _SDENUM_H_

⌨️ 快捷键说明

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