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

📄 init.h

📁 使用ISP1362芯片的USB_OTG参考设计源代码比较新的版本
💻 H
字号:
/*
**  WASABI-Hot! version 1.2c   
**
**
**      -- copyright (c) 2001-2004 by Philips Japan, Ltd. -- All rights reserved --
**
**
**      ** This code has been made to check/learn                          ** 
**      **                             the ISP1362/ISP1363 functionalities **
**      ** Release 06-Aug-2004                                             **
**
**      OKANO, Akifumi
**      
**		Application Laboratory, Mobile and Connectivity
**      Semiconductors Div, Philips Japan Ltd.
**      akifumi.okano@philips.com
**      +81-3-3740-4668 
*/

/****************************************************************************/
/*	includes																*/
/****************************************************************************/

#include		"general.h"
#include		"class_dr/audio/sing.h"


/****************************************************************************/
/*	constants																*/
/****************************************************************************/

//#define		NO_AUDIO
//#define		NO_AUDIO

#define			INTL_PAYLOAD_SIZE			8
#define			INTL_NUM_OF_BLKs			7
#define			ATL_PAYLOAD_SIZE			64


#ifdef	NO_AUDIO
#undef			ATL_PAYLOAD_SIZE
#define			ATL_PAYLOAD_SIZE			960
#endif
#ifdef	SMALLER_ISO_BUFFER
#undef			ATL_PAYLOAD_SIZE
#define			ATL_PAYLOAD_SIZE			512
#undef			INTL_NUM_OF_BLKs
#define			INTL_NUM_OF_BLKs			10
#endif




/*
**		register init values
*/
#define		InitVal_HcInterruptDisable				0xFFFFFFFF
#define		InitVal_HcInterruptEnable				0x80000060
#define		InitVal_HcHcInterruptStatus				0xFFFFFFFF

//#define		InitVal_HcHardwareConfiguration			0x042C
//#define		InitVal_HcHardwareConfiguration			0x242C				// Ken 02-12-24
#define		InitVal_HcHardwareConfiguration			0x842C	//	Setting (0x8000 | Config) is for the hardware which has WAKEUP ping tied to LOW permanently
															//	##	version1.2c

#define		InitVal_HcFmInterval					(0x2EDF | (0x2778L << 16))


#ifdef	PER_PORT_POWER_SWITCHING

//#define	InitVal_HcRhDescriptorA					0x20001902
#define		InitVal_HcRhDescriptorA					0x20000902	//	##	version1.2c
#define		InitVal_HcRhDescriptorB					0x00060000
#define		InitVal_HcRhStatus     					0x00000001
#define		InitVal_HcRhPortStatus1					0x00000108
#define		InitVal_HcRhPortStatus2					0x00000108

										//	To turn ON  a port set "0x00000100" to  HcRhPortStatusN
										//	To turn OFF a port set "0x00000200" to  HcRhPortStatusN

#else

#define		InitVal_HcRhDescriptorA					0x20000202
#define		InitVal_HcRhDescriptorB					0x00000001
#define		InitVal_HcRhStatus						0x00080001
#define		InitVal_HcRhPortStatus1					0x00000008
#define		InitVal_HcRhPortStatus2					0x00000008

#endif	// PER_PORT_POWER_SWITCHING



#define		InitVal_HcControl						0x00000600	/*  into USB RESET state	*/
//#define		InitVal_HcuPInterruptEnable				0x0397
#define		InitVal_HcuPInterruptEnable				0x03B7		//	##	version1.2c

#define		InitVal_HcBufferStatus					0x0000

#ifdef	NO_AUDIO
#undef		MEMORY_FILLING_SIZE_TO_1362
#define		MEMORY_FILLING_SIZE_TO_1362				0
#endif

#define		InitVal_HcISTLBufferSize				(MEMORY_FILLING_SIZE_TO_1362 << 1)		//	"<< 1" means size conversion from short to char

#define		InitVal_HcISTLToggleRate				0

#define		InitVal_HcINTLBlkSize					INTL_PAYLOAD_SIZE

#define		InitVal_HcATLBlkSize					ATL_PAYLOAD_SIZE
#define		InitVal_HcATLPTDDoneThresholdCount		1
#define		InitVal_HcATLPTDDoneThresholdTimeOut	5


/****************************************************************************/
/*	function prototypes														*/
/****************************************************************************/


void		init_HC_initialize( void );
void		init_check_1362_connection( void );
void		init_chip_software_reset( void );






⌨️ 快捷键说明

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