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

📄 hal_intf.h

📁 linux下的usb开发
💻 H
📖 第 1 页 / 共 2 页
字号:
/************************************************************* * Philips ISP1362 hardware access interface header file * * (c) 2002 Koninklijke Philips Electronics N.V., All rights reserved *  * This  source code and any compilation or derivative thereof is the * proprietary information of Koninklijke Philips Electronics N.V. * and is confidential in nature. * Under no circumstances is this software to be exposed to or placed * under an Open Source License of any type without the expressed * written permission of Koninklijke Philips Electronics N.V. * * File Name:	hal_intf.h * * History:	 * *	Version	Date		Author		Comments * ------------------------------------------------- * 	1.0		09/23/02	SYARRA		Initial Creation * * Note: use tab space 4 *************************************************************/#ifndef __HAL_INTF_H__#define __HAL_INTF_H__/* Values for id_flags filed of isp1362_driver_t */#define		ISP1362_HC				0		/* Host Controller Driver */#define		ISP1362_DC				1		/* Device Controller Driver */#define		ISP1362_OTG				2		/* Otg Controller Driver */#define		ISP1362_LAST_DEV		(ISP1362_OTG+1)#define		ISP1362_1ST_DEV			(ISP1362_HC)/* Registers accessed by Interface functions *//***** HC Registers *****/#define		HC_REVISION_REG			0x00	/* Revision Register (read only) */#define		HC_CONTROL_REG			0x01	/* Control Register */#define		HC_CMD_STS_REG			0x02	/* Command Status Register */#define		HC_INT_STS_REG			0x03	/* interrupt status Register 										   (ohci compatible) */#define		HC_INT_EN_REG			0x04	/* INterrupt Enable Register */#define		HC_INT_DIS_REG			0x05	/* Interrupt Disable Register */#define		HC_FM_INTL_REG			0x0D	/* Frame Interval Register */#define		HC_FM_REM_REG			0x0E	/* Frame Remaininig Register */#define		HC_FN_REG				0x0F	/* Frame number register */#define		HC_LSTH_REG				0x11	/* LS Threshold Register */#define		HC_RH_DESC_A_REG		0x12	/* Root Hub Descriptor A */#define		HC_RH_DESC_B_REG		0x13	/* Root Hub Descriptor B */#define		HC_RH_STATUS_REG		0x14	/* Root Hub Status Register */#define		HC_RH_PORT1_STS_REG		0x15	/* Root hub port 1 status register */#define		HC_RH_PORT2_STS_REG		0x12	/* Root hub port 2 status register */#define 	HC_HW_CNFG_REG			0x20	/* Hardware Configuration										   register */#define		HC_DMA_CNFG_REG			0x21	/* DMA configuration register										   */#define		HC_TXFR_CNTR_REG		0x22	/* Transfer counter register */#define		HC_MP_INT_REG			0x24	/* Hw specific interrupt 										  register */#define		HC_MP_INT_EN_REG		0x25	/* hw specific Interrupt 										   Enable Register */#define		HC_CHIP_ID_REG			0x27	/* Chip Id register (r/w) */#define		HC_SCRATCH_REG			0x28	/* Scratch Register */#define		HC_SW_RESET_REG			0xA9	/* Software Reset Register */#define		HC_BUFF_STS_REG			0x2C	/* Buffer Status Register */#define		HC_DIR_ADDR_LEN_REG		0x32	/* Direct addr length register */#define		HC_DIR_ADDR_PORT_REG	0x45	/* Direct addr port register */#define		HC_ISTL_BUFF_SIZE_REG	0x30	/* ISTL0/ISTL1 buffer size register */#define		HC_ISTL0_BUFF_PORT_REG	0x40	/* ISTL0 buffer port register */#define		HC_ISTL1_BUFF_PORT_REG	0x42	/* ISTL1 buffer port register */#define		HC_ISTL_TOGGLE_RATE_REG	0x47	/* ISTL buffer toggle rate register */#define		HC_INTL_BUFF_SIZE_REG	0x30	/* INTL buffer size register */#define		HC_INTL_BUFF_PORT_REG	0x40	/* INTL buffer port register */#define		HC_INTL_BLK_SIZE_REG	0x53	/* INTL block payload size register */#define		HC_INTL_DONE_MAP_REG	0x17	/* PTD Done Map register for INTL											   (Read Only) */#define		HC_INTL_LAST_PTD_REG	0x19	/* INTL last PTD register */#define		HC_INTL_CUR_ACT_PTD_REG	0x1A	/* Current Active PTD in INTL List */#define		HC_ATL_BUFF_SIZE_REG	0x30	/* INTL buffer size register */#define		HC_ATL_BUFF_PORT_REG	0x40	/* INTL buffer port register */#define		HC_ATL_BLK_SIZE_REG		0x53	/* INTL block payload size register */#define		HC_ATLL_DONE_MAP_REG	0x17	/* PTD Done Map register for INTL											   (Read Only) */#define		HC_ATL_LAST_PTD_REG		0x19	/* INTL last PTD register */#define		HC_ATL_CUR_ACT_PTD_REG	0x1A	/* Current Active PTD in INTL List *//* HC Registers Bit positions definitions *//* HC_HW_CNFG_REG (16 bit) */#define 	HC_INT_PIN_ENABLE		0X0001		/* Bit 0    */#define 	HC_INT_PIN_TRIGGER		0X0002		/* Bit 1    */#define 	HC_INT_OUTPUT_POLARITY	0X0004		/* Bit 2    */#define 	HC_DATA_BUS_WIDTH		0X0018		/* Bit 4..3 */#define		HC_DREQ_OUT_POLARITY	0x0020		/* Bit 5	*/#define		HC_DACK_IN_POLARITY		0x0040		/* Bit 6	*/#define		HC_ONE_DMA				0x0080		/* Bit 7	*/#define		HC_DACK_MODE			0x0100		/* Bit 8	*/#define		HC_ONE_INT				0x0200		/* Bit 9	*/#define		HC_ANALOG_OC_ENABLE		0x0400		/* Bit 10 	*/#define		HC_SUSPEND_CLK_NOT_STOP	0x0800		/* Bit 11 	*/#define		HC_CONNECT_PLDN_15K_DS1	0x1000		/* Bit 12   */#define		HC_CONNECT_PLDN_15K_DS2	0x2000		/* Bit 13   */#define		HC_DATA_BUS_16BIT_WIDTH	0x0008		/* 16 Bit data bus width *//* HC_MP_INT_REG  */#define		HC_SOF_INT				0X0001		/* Bit 0: SOF interrupts */#define		HC_ISTL_0_INT			0X0002		/* Bit 1: ISTL 0 interrupt */#define		HC_ISTL_1_INT			0X0004		/* Bit 2: ISTL 1 interrupt */#define		HC_EOT_INT				0X0008		/* Bit 3: End of transfer int.*/#define		HC_OPR_INT				0X0010		/* Bit 4: HCOR int. */#define		HC_SUSPEND_INT			0X0020		/* Bit 5 Suspend Interrrupt */#define		HC_RESUME_INT			0X0040		/* Bit 6 Resume Interrupt */#define		HC_INTL_INT				0X0080		/* Bit 7: INTL interrupt */#define		HC_ATL_INT				0X0100		/* Bit 8: ALT interrupt */#define		HC_OTG_INT				0X0200		/* Bit 9: OTG interrupt *//***** DC Registers *****/#define		DC_READ_EP_REG			0x00	/* Read endpoint buffer */#define		DC_WRITE_EP_REG			0x10	/* Write Endpoing buffer */											/* The range 0x00->0x0F &											 * 0x10->0x1F are allocated											 * for different endpoints */#define		DC_RD_EP_CNFG_REG		0x20	/* Read Endpoint Configuration Register											   the range 0x20->0x2F are for 											   differnt endpoints (read) */#define		DC_WR_EP_CNFG_REG		0x30	/* Write endpoint configuration register											   the range 0x30->0x3F are for											   differnt endpoints */#define		DC_EP_STATUS_REG		0x50	/* Read Endpoint Status */											/* Read only */											/* The range 0x50->0x5F are											 * allocated for different eps*/#define		DC_STALL_EP_REG			0x40	/* Stall endpoint */											/* 0x40-0x4F are for endpoints 0-15 */#define		DC_UNSTALL_EP_REG		0x80	/* Stall endpoint */											/* 0x40-0x4F are for endpoints											 * 0-15 */#define		DC_VALIDATE_EP_WR_REG	0x61	/* Validate EP buffer (write) */#define		DC_VALIDATE_EP_RD_REG	0x6F	/* Validate EP buffer (read) */#define		DC_CLR_EP_BUFF_REG		0x70	/* Clear endpoint buffers											   the range 0x70->0x7F (except 0x71)											   are for different end points */#define		DC_CHK_EP_STS_REG		0xD0	/* Check endpoint stateus register											   the range 0xD0->0xDF are for 											   the differnt end points */#define		DC_EP_ERR_CODE_REG		0xA0	/* EP end point error code 											   Register (Read Only) */											/* The range from A0->AF are 											 * reserved for different end 											 * points */#define		DC_UNLOCK_DEV_REG		0xB0	/* Unlock device Register (write)*/#define		DC_SCRATCH_REG			0xB3	/* Scratch Register B3 (read)										 					B2 (write) */#define		DC_FN_REG				0xB4	/* Frame Number Register (read) */#define		DC_CHIP_ID_REG			0xB5	/* Chip Id register (read) */#define		DC_DEV_ADDR_REG			0xB7	/* device address register B7 (read)										 						   B6 (write) */#define		DC_MODE_REG				0xB9	/* Mode register B9 (read)										 				 B8 (write) */#define		DC_HW_CNFG_REG			0xBB	/* Hardware Configuration											   register */#define		DC_INT_REG				0xC0	/* Interrupt status Register */#define		DC_INT_EN_REG			0xC3	/* Interrupt Enable Register */#define		DC_DMA_CNFG_REG			0xF1	/* DMA configuration register */#define		DC_DMA_CNTR_REG			0xF3	/* DMA counter register */#define		DC_ACK_SETUP_REG		0xF4	/* Acknowledge setup */#define		DC_SW_RESET_REG			0xF6	/* softwre reset device *//* DC_HW_CNFG_REG */#define		DC_INT_POLARITY			0x0001	/* bit 0:Int polarity High */#define		DC_INT_LEVEL			0x0002	/* bit 1:Int level pulsed */

⌨️ 快捷键说明

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