📄 usbreg.h
字号:
/*****************************Copyright(c)****************************************************************
** Guangzhou ZHIYUAN electronics Co.,LTD.
**
** http://www.embedtools.com
**
**------File Info-----------------------------------------------------------------------------------------
** File Name: usb_reg.h
** Latest modified Date: 2007-11-06
** Latest Version: V1.0
** Description: usb中的寄存器定义,
**
**--------------------------------------------------------------------------------------------------------
** Created By: 吴隆穗 Longsui Wu
** Created date: 2007-11-06
** Version: V1.0
** Descriptions: 初始版本
**
**--------------------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
** Version:
** Description:
**
**--------------------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
** Version:
** Description:
**
*********************************************************************************************************/
#ifndef __USB_REG_H
#define __USB_REG_H
#define OHCI_REG_BASE_ADDR 0xFFE0C000
#ifndef USB_MAX_PORTS
#define USB_MAX_PORTS 2
#endif
/********************************************************************************************************
OHCI规范定义的寄存器,详见OHCI规范第7章
********************************************************************************************************/
typedef struct __tagOHCI_REG {
volatile unsigned int uiHcRevision; /* OHCI_REG_BASE_ADDR + 0x00 */
volatile unsigned int uiHcControl; /* OHCI_REG_BASE_ADDR + 0x04 */
volatile unsigned int uiHcCommandStatus; /* OHCI_REG_BASE_ADDR + 0x08 */
volatile unsigned int uiHcInterruptStatus; /* OHCI_REG_BASE_ADDR + 0x0C */
volatile unsigned int uiHcInterruptEnable; /* OHCI_REG_BASE_ADDR + 0x10 */
volatile unsigned int uiHcInterruptDisable; /* OHCI_REG_BASE_ADDR + 0x14 */
volatile unsigned int HcHCCA; /* OHCI_REG_BASE_ADDR + 0x18 */
volatile unsigned int uiHcPeriodCurrentED; /* OHCI_REG_BASE_ADDR + 0x1C */
volatile unsigned int uiHcControlHeadED; /* OHCI_REG_BASE_ADDR + 0x20 */
volatile unsigned int uiHcControlCurrentED; /* OHCI_REG_BASE_ADDR + 0x24 */
volatile unsigned int uiHcBulkHeadED; /* OHCI_REG_BASE_ADDR + 0x28 */
volatile unsigned int uiHcBulkCurrentED; /* OHCI_REG_BASE_ADDR + 0x2C */
volatile unsigned int uiHcDoneHead; /* OHCI_REG_BASE_ADDR + 0x30 */
volatile unsigned int uiHcFmInterval; /* OHCI_REG_BASE_ADDR + 0x34 */
volatile unsigned int uiHcFmRemaining; /* OHCI_REG_BASE_ADDR + 0x38 */
volatile unsigned int uiHcFmNumber; /* OHCI_REG_BASE_ADDR + 0x3C */
volatile unsigned int uiHcPeriodicStart; /* OHCI_REG_BASE_ADDR + 0x40 */
volatile unsigned int uiHcLSThreshold; /* OHCI_REG_BASE_ADDR + 0x44 */
volatile unsigned int uiHcRhDescriptorA; /* OHCI_REG_BASE_ADDR + 0x48 */
volatile unsigned int uiHcRhDescriptorB; /* OHCI_REG_BASE_ADDR + 0x4C */
volatile unsigned int uiHcRhStatus; /* OHCI_REG_BASE_ADDR + 0x50 */
volatile unsigned int uiHcRhPortStatus[USB_MAX_PORTS]; /* OHCI_REG_BASE_ADDR + 0x54 */
} __OHCI_REG, *__POHCI_REG;
extern const __POHCI_REG volatile __GpsOhciReg;
/********************************************************************************************************
USB OTG Registers
********************************************************************************************************/
#ifndef USB_OTG_BASE_ADDR
#define USB_OTG_BASE_ADDR 0xFFE0C100
#endif
#ifndef OTGIntSt
#define OTGIntSt (*(volatile unsigned long *)(USB_OTG_BASE_ADDR))
#endif
#ifndef OTGIntEn
#define OTGIntEn (*(volatile unsigned long *)(USB_OTG_BASE_ADDR + 0x04))
#endif
#ifndef OTGIntSet
#define OTGIntSet (*(volatile unsigned long *)(USB_OTG_BASE_ADDR + 0x08))
#endif
#ifndef OTGIntClr
#define OTGIntClr (*(volatile unsigned long *)(USB_OTG_BASE_ADDR + 0x0C))
#endif
#ifndef OTGStCtrl
#define OTGStCtrl (*(volatile unsigned long *)(USB_OTG_BASE_ADDR + 0x10))
#endif
#ifndef OTGTmr
#define OTGTmr (*(volatile unsigned long *)(USB_OTG_BASE_ADDR + 0x14))
#endif
#ifndef OTGClkCtrl
#define OTGClkCtrl (*(volatile unsigned long *)(0xFFE0CFF4))
#endif
#ifndef OTGClkSt
#define OTGClkSt (*(volatile unsigned long *)(0xFFE0CFF8))
#endif
/********************************************************************************************************
USB I2C Registers
********************************************************************************************************/
#ifndef OTG_I2C_RX
#define OTG_I2C_RX (*(volatile unsigned char *)(0xFFE0C300))
#endif
#ifndef OTG_I2C_TX
#define OTG_I2C_TX (*(volatile unsigned long *)(0xFFE0C300))
#endif
#ifndef OTG_I2C_STS
#define OTG_I2C_STS (*(volatile unsigned long *)(0xFFE0C304))
#endif
#ifndef OTG_I2C_CTL
#define OTG_I2C_CTL (*(volatile unsigned long *)(0xFFE0C308))
#endif
#ifndef OTG_I2C_CLKHI
#define OTG_I2C_CLKHI (*(volatile unsigned char *)(0xFFE0C30C))
#endif
#ifndef OTG_I2C_CLKLO
#define OTG_I2C_CLKLO (*(volatile unsigned char *)(0xFFE0C310))
#endif
#endif
/*********************************************************************************************************
END FILE
*********************************************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -