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

📄 otg.h

📁 Windows CE 6.0 BSP for the Beagle Board.
💻 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.
//
//------------------------------------------------------------------------------
//
//  File:  otg.h - derived from omap2420_otg.h
//
#ifndef __OTG_H
#define __OTG_H

//------------------------------------------------------------------------------
//
//  Define: ZONE_xxx

#ifdef DEBUG
#define ZONE_ERROR          DEBUGZONE(0)
#define ZONE_WARN           DEBUGZONE(1)
#define ZONE_FUNCTION       DEBUGZONE(2)
#define ZONE_INIT           DEBUGZONE(3)
#define ZONE_INFO           DEBUGZONE(4)
#define ZONE_OTT            DEBUGZONE(5)
#endif

//------------------------------------------------------------------------------
//
//  Define:  OTG_MODE_xxx
//
#define OTG_MODE_DAT_SE0_UNI        0
#define OTG_MODE_DAT_SE0_BI         1
#define OTG_MODE_VP_VM_UNI          2
#define OTG_MODE_VP_VM_BI           3

//------------------------------------------------------------------------------
//
//  Define:  OTG_STATE_xxx
//
#define OTG_STATE_ID_GND            (1 << 0)
#define OTG_STATE_ID_FLOAT          (1 << 1)
#define OTG_STATE_SESSION           (1 << 2)
#define OTG_STATE_VBUS              (1 << 3)
#define OTG_STATE_A_HNP             (1 << 4)

//------------------------------------------------------------------------------
//
//  Define:  OTG_CTRL_xx
//
#define OTG_CTRL_DM_PD              (1 << 0)
#define OTG_CTRL_DM_PU              (1 << 1)
#define OTG_CTRL_DP_PD              (1 << 2)
#define OTG_CTRL_DP_PU              (1 << 3)
#define OTG_CTRL_VBUS_PD            (1 << 4)
#define OTG_CTRL_VBUS_PU            (1 << 5)
#define OTG_CTRL_VBUS_DRV           (1 << 6)

//------------------------------------------------------------------------------
//
//  Function:  OTT_Init
//
//  This function is called from OTG driver to initialize transceiver driver.
//  It  returns handler used for subsequent OTG transceiver function calls and
//  transceiver connection mode (as defined by OTG_MODE_xxx above).
//
HANDLE OTT_Init(LPCWSTR szContext, HANDLE hOTG, DWORD *pMode);

//------------------------------------------------------------------------------
//
//  Function:  OTT_Open
//
//  This function is called from OTG driver to activate transceiver driver.
//
BOOL OTT_Open(HANDLE hOTG);

//------------------------------------------------------------------------------
//
//  Function: OTT_Deinit
//
//  This function is called from OTG driver to close transceiver. After
//  return the handle is no valid anymore.
//
BOOL OTT_Deinit(HANDLE hOTT);

//------------------------------------------------------------------------------
//
//  Function: OTT_Ctrl
//
//  This function is called from OTG driver to control transceiver. Desired
//  state is set in second parameter (as defined by OTG_CTRL_xxx above).
//
VOID OTT_Ctrl(HANDLE hOTT, DWORD ctrl);

//------------------------------------------------------------------------------
//
//  Function: OTT_Ctrl
//
//  This function returns actual transceiver state (as defined by OTG_STATE_xxx
//  above).
//
DWORD OTT_State(HANDLE hOTT);

//------------------------------------------------------------------------------
//
//  Function: OTT_Ctrl
//
//  This function is called from transceiver driver to inform OTG driver about
//  state change (as defined by OTG_STATE_xxx above).
//
VOID OTG_State(HANDLE hOTG, DWORD state);

//------------------------------------------------------------------------------

#endif

⌨️ 快捷键说明

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