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

📄 ohcied.h

📁 Usb Host/Periphel Control TD1120 codes
💻 H
字号:
/*-----------------------------------------------------------------------------
$File: //hodad/usblink/3.4/source/hostctrl/otg242/ohcied.h $
$DateTime: 2003/09/08 15:17:45 $
$Revision: #1 $
Purpose:   OHCD ED definitions

CONFIDENTIAL AND PROPRIETARY INFORMATION OF SOFTCONNEX TECHNOLOGIES, INC.

THIS NOTICE IS NOT TO BE DELETED, MODIFIED, MOVED OR CHANGED IN ANY WAY.

Copyright (c) 1999 - 2003 by SoftConnex Technologies, Inc. 

This software is protected by copyright laws and international copyright 
treaties, as well as other intellectual property laws and treaties.  This
software is a CONFIDENTIAL, unpublished work of authorship, and with portions 
constituting TRADE SECRETS of SoftConnex Technologies, Inc., a Delaware USA 
corporation.  Any unauthorized use, disclosure, and/or reproduction of this 
software, or any part of this software; or distribution of this software in any 
form or by any means; or storage of this software in any database or retrieval 
system, without the express written consent of, and license from, SoftConnex 
Technologies, Inc. is strictly prohibited.  This software is protected under the
copyright and/or trade secret laws in other countries in addition to USA.  All 
Rights Reserved.  Failure to abide by the use, disclosure and/or reproduction 
restrictions may result in civil and /or criminal penalties, and will be 
prosecuted to the maximum extent of the law.
-----------------------------------------------------------------------------*/

#ifndef _SOFTCONNEX_OHCIED_H_
#define _SOFTCONNEX_OHCIED_H_

#define OHCIED_MAXIMUM_PACKET_SIZE    0x07FF0000
#define OHCIED_FORMAT                 0x00008000
#define OHCIED_SKIP                   0x00004000
#define OHCIED_SPEED                  0x00002000
#define OHCIED_DIRECTION              0x00001800
#define OHCIED_EP_NUMBER              0x00000780
#define OHCIED_FUNCTION_ADDR          0x0000007F
#define OHCIED_TOGGLE_CARRY           0x00000002
#define OHCIED_HALTED                 0x00000001
#define OHCIED_POINTER                0xFFFFFFF0

#define OHCIED_DIRECTION_OUT          0x00000800
#define OHCIED_DIRECTION_IN           0x00001000

#define OhciEd_IsIsoc(ed)                 (ed->desc & OHCIED_FORMAT)
#define OhciEd_GetMaxPacketSize(ed)       (ed->desc & OHCIED_MAXIMUM_PACKET_SIZE)
#define OhciEd_GetFunctionAddress(ed)     (ed->desc & OHCIED_FUNCTION_ADDR)
#define OhciEd_GetEndpointNumber(ed)      (ed->desc & OHCIED_EP_NUMBER)
#define OhciEd_GetDirection(ed)           (ed->desc & OHCIED_DIRECTION)
#define OhciEd_GetSpeed(ed)               (ed->desc & OHCIED_SPEED)
#define OhciEd_GetHalted(ed)              (ed->headP & OHCIED_HALTED)
#define OhciEd_GetToggleCarry(ed)         (ed->headP & OHCIED_TOGGLE_CARRY)
#define OhciEd_GetMaxPacketSizeValue(ed)  ((ed->desc & OHCIED_MAXIMUM_PACKET_SIZE) >> 16)

#define OhciEd_SetToggleCarry(ed, carry)  {ed->headP &= ~OHCIED_TOGGLE_CARRY; ed->headP |= carry;}

#define OhciEd_IsDirectionOut(ed, td)     (((ed->desc & OHCIED_DIRECTION) == OHCIED_DIRECTION_OUT)? 1 : \
                                          (((ed->desc & OHCIED_DIRECTION) == OHCIED_DIRECTION_IN)? 0 : \
                                          OhciTd_IsDirectionOut(td)))

#define OhciEd_IsDirectionIn(ed, td)      (((ed->desc & OHCIED_DIRECTION) == OHCIED_DIRECTION_IN)? 1 : \
                                          (((ed->desc & OHCIED_DIRECTION) == OHCIED_DIRECTION_OUT)? 0 : \
                                          OhciTd_IsDirectionIn(td)))

#define OhciEd_GetMaxPacketSizeValue(ed)  ((ed->desc & OHCIED_MAXIMUM_PACKET_SIZE) >> 16)
#define OhciEd_SetHalted(ed)              {ed->headP |= OHCIED_HALTED;}

#define OHCIED_IsEof(link)                (((link) & 0xFFFFFFF0) == 0xFFFFFFF0 || ((link) & 0xFFFFFFF0) == 0)

typedef struct _OhciEd
   {
   U32 desc;
   U32 tailP;
   U32 headP;
   U32 nextEd;
   }
OhciEd;

#endif

⌨️ 快捷键说明

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