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

📄 xllp_udc_os_depend.h

📁 优龙pxa270平台试验程序
💻 H
字号:
/******************************************************************************
**
**  COPYRIGHT (C) 2000, 2001 Intel Corporation.
**
**  This software as well as the software described in it is furnished under 
**  license and may only be used or copied in accordance with the terms of the 
**  license. The information in this file is furnished for informational use 
**  only, is subject to change without notice, and should not be construed as 
**  a commitment by Intel Corporation. Intel Corporation assumes no 
**  responsibility or liability for any errors or inaccuracies that may appear 
**  in this document or any software that may be provided in association with 
**  this document. 
**  Except as permitted by such license, no part of this document may be 
**  reproduced, stored in a retrieval system, or transmitted in any form or by 
**  any means without the express written consent of Intel Corporation. 
**
**  FILENAME:  		xllp_udc_os_depend.h
**
**  PURPOSE:   		This files contains the OS specific stuff for USB Device controller  
**					(UDC) driver implementation.
**
**  LAST MODIFIED:  1/25/2001
**
******************************************************************************/

#ifndef _xllp_udc_os_depend_h
#define _xllp_udc_os_depend_h

// UDC Controller Registers' Base
#define XLLP_UDC_REGISTERS_BASE		(0x40600000)

// This definition and functions are used
// because no XLLP clock enable functions were available when
// this code was developed.
#define XLLP_CLK_MGR_REGS_BASE          0x41300000
#define XLLP_CLK_MGR_REGS_CKEN_UDC_EN   0x1U << 11            
#define XLLP_CLK_MGR_REGS_CKEN_UDC_DIS  0x7FF7FF            

typedef struct XLLP_CLK_MGR_REGS_S
{
    XLLP_VUINT32_T CCCR;    // Core clock configuration register
    XLLP_VUINT32_T CKEN;    // Clock Enable register
    XLLP_VUINT32_T OSCC;    // Oscillator Configuration register
    XLLP_VUINT32_T CCSR;    // Core Clock Status register
} XLLP_CLK_MGR_REGS_T, *P_XLLP_CLK_MGR_REGS_T;

/*
*******************************************************************************
*    Platform Registers
*******************************************************************************
*/

// Mainstone Board Register.
#define XLLP_BOARD_REG_BASE     0x08000000

#define XLLP_MISC_WR2_USB_SC         ( 0x1U << 4 )   // USB Client soft connect control

// Masks for Miscellaneous Read Register 1
#define XLLP_MISC_RD_USB_CL_STATUS   ( 0x1U << 5 )   // USB Client status

// Masks for the interrupt Mask/Enable Register
#define XLLP_INT_MASK_ENB_USBC       ( 0x1U << 2 )   // USB client cable detection interrupt

// Masks for the interrupt Set/Clear Register
#define XLLP_INT_SET_CLR_USBC        ( 0x1U << 2 )    // USB client cable detection interrupt

typedef struct XLLP_BOARD_REGISTERS_S {
    XLLP_VUINT32_T  resv1[4];              //        0x00
    XLLP_VUINT32_T  hex_led;               //        0x10
    XLLP_VUINT32_T  resv2[11];             //        0x14 - 0x3F
    XLLP_VUINT32_T  disc_blank_led;        //        0x40
    XLLP_VUINT32_T  resv3[7];              //        0x44 - 0x5F
    XLLP_VUINT32_T  user_switches;         //        0x60
    XLLP_VUINT32_T  resv5[7];              //        0x64 - 0x7F
    XLLP_VUINT32_T  miscWr1;               //        0x80
    XLLP_VUINT32_T  miscWr2;               //        0x84
    XLLP_VUINT32_T  resv6[2];              //        0x88 - 0x8F
    XLLP_VUINT32_T  miscRd;                //        0x90
    XLLP_VUINT32_T  resv7[11];             //        0x94 - 0xBF
    XLLP_VUINT32_T  intMaskEnb;            //        0xC0
    XLLP_VUINT32_T  resv8[3];              //        0x84 - 0x8F
    XLLP_VUINT32_T  intSetClr;             //        0xD0
    XLLP_VUINT32_T  resv9[3];              //        0xD4 - 0xDF
    XLLP_VUINT32_T  pcmcia0;               //        0xE0
    XLLP_VUINT32_T  pcmcia1;               //        0xE4
} XLLP_BOARD_REGISTERS_T, *P_XLLP_BOARD_REGISTERS_T;

#define XLLP_UDC_CONFIG1_LENGTH     32
//#define XLLP_UDC_CONFIG2_LENGTH     32
//#define XLLP_UDC_CONFIG3_LENGTH     32
//#define XLLP_UDC_CONFIG_TOTAL       (XLLP_UDC_CONFIG1_LENGTH + XLLP_UDC_CONFIG2_LENGTH + XLLP_UDC_CONFIG3_LENGTH)
#define XLLP_UDC_CONFIG_TOTAL       XLLP_UDC_CONFIG1_LENGTH

/*
************************************************************************************
*                            FUNCTION PROTOTYPES 
************************************************************************************
*/

XLLP_STATUS_T XllpUdcRegisterFirstLevelInterrupt (P_XLLP_UDC_T pUdcHandle);
XLLP_STATUS_T XllpUdcEnableFirstLevelInterrupt (void);
XLLP_STATUS_T XllpUdcUnRegisterFirstLevelInterrupt(void);
XLLP_STATUS_T XllpUdcDisableFirstLevelInterrupt(void);
XLLP_STATUS_T XllpUdcProcessVendorRequest (P_XLLP_UDC_T pUdcHandle); 
XLLP_BOOL_T XllpUdcGetStringDescriptor(XLLP_UINT16_T wValue, P_XLLP_UINT8_T *txDatP, P_XLLP_UINT32_T txDatLen);

#endif 	/* _xllp_udc_os_depend_h */

⌨️ 快捷键说明

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