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

📄 ml2011usersdef.h

📁 OkiML2011Driver
💻 H
字号:
/******************************************************************************
*
*	Oki Sound Library for ML2011
*		ML2011 Driver (ML2011usersdef.c)
*		 Oki Electric Industry Co.,Ltd.
*		 Software Development Department
*
*		 2006, 6, 30 released
*	----------------------------------------------
*	UsersDefinition for ML2011.
******************************************************************************/
#ifndef ML2011_USERSDEF_H
#define ML2011_USERSDEF_H


/*******************************************************************************
*	2. USERS DEFINITION(Port IO)
*	---------------------------------------------------
*	DEFAULT PORT SETUP	(CUSTOMIZE!)
*******************************************************************************/
#define DEFAULT_PORTIO_REGISTER  	0x21	/* Port IO		0:Input	1:Output */
#define DEFAULT_PULLUP_REGISTER  	0x21	/* Port PullUp	0:ON	1:OFF  */
#define DEFAULT_PORT_REGISTER		0x00
#define DEFAULT_PORTENA_REGISTER	0x00	/* Port Enable	0:Enable 1:Disable (Except for ML2860/2870)*/

/******************************************************************************
*	3. USERS DEFINITION(PWM)	(CUSTOMIZE!)
*	--------------------------------------------------------------------------
*	These parameter is default PWM register parameter.
*	----------------------------------------------------
*	<PWM mode Register>
*	 [-|-|WVM|WPM|WDM|WCM|WBM|WAM]
*		WAM:PWMA pin mode
*		WBM:PWMB pin mode
*		WCM:PWMC pin mode
*		WDM:PWMD pin mode
*		WPM:PWM for panel
*		WVM:PWM for vibrator
*	ML2011 has only PWMA and VIB.
*	If Ports are connected to PWM, Port IO must be Output Mode.
******************************************************************************/
#define DEFAULT_PWMOUTSEL_REGISTER		0x21		/* PWM Output Select 0:Port=GPIO 1:Port=PWM */


/******************************************************************************
*	4. USERS DEFINITION(IRQ polality)
*	---------------------------------------------------
*	Set ISS bit here.
******************************************************************************/
#define DEFAULT_ISS_BIT		ISS_POS		/* "ISS_POS":low-active  or  "ISS_NEG":high-active */

/******************************************************************************
*	5. USERS DEFINITION(CLOCK)
*	--------------------------------------------------------------
*	These parameter can be calculated by your input clock frequency.
******************************************************************************/
/* 26MHz */
#define DEFAULT_CLK_REGISTER							0x44//0x6b
#define DEFAULT_PLL2CLKDIV_REGISTER					0x04//	0x0b
#define DEFAULT_PLL64ACLKDIV_REGISTER					0x19//0x0f
#define DEFAULT_PLL64ACLKMLT_REGISTER				0x20//	0x1a
#define DEFAULT_PLL88ACLKDIV_REGISTER					0x11//0x0d
#define DEFAULT_PLL88ACLKMLT_REGISTER				0x1e//	0x1f
#define DEFAULT_PLL96ACLKDIV_REGISTER					0x0d//0x0a
#define DEFAULT_PLL96ACLKMLT_REGISTER				0x19//	0x1a
#define DEFAULT_EXTCLKCTRL_REGISTER					0x00

#define WAIT_tCLOCK1	1	//Capacitor 100pF:0.5ms	1000pF:5ms 0.01mF:50ms 0.1mF:500ms
#define WAIT_tCLOCK2	2	//

#endif /*ML28XX_USERSDEF_H*/

⌨️ 快捷键说明

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