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

📄 config.h

📁 这是周立功LPC2200开发板的实验程序
💻 H
字号:
/****************************************Copyright (c)**************************************************
**                               Guangzou ZLG-MCU Development Co.,LTD.
**                                      graduate school
**                                 http://www.zlgmcu.com
**
**--------------File Info-------------------------------------------------------------------------------
** File Name: config.h
** Last modified Date:  2004-09-17
** Last Version: 1.0
** Descriptions: User Configurable File
**
**------------------------------------------------------------------------------------------------------
** Created By: Chenmingji
** Created date:   2004-09-17
** Version: 1.0
** Descriptions: First version
**
**------------------------------------------------------------------------------------------------------
** Modified by: 	daimaobo
** Modified date: 	2006-12-20
** Version:
** Descriptions:  	Modified for LPC23XX
**
********************************************************************************************************/
#ifndef __CONFIG_H 
#define __CONFIG_H

//This segment should not be modified
#ifndef TRUE
#define TRUE  1
#endif

#ifndef FALSE
#define FALSE 0
#endif

typedef unsigned char  uint8;                   /* defined for unsigned 8-bits integer variable 	无符号8位整型变量  */
typedef signed   char  int8;                    /* defined for signed 8-bits integer variable		有符号8位整型变量  */
typedef unsigned short uint16;                  /* defined for unsigned 16-bits integer variable 	无符号16位整型变量 */
typedef signed   short int16;                   /* defined for signed 16-bits integer variable 		有符号16位整型变量 */
typedef unsigned int   uint32;                  /* defined for unsigned 32-bits integer variable 	无符号32位整型变量 */
typedef signed   int   int32;                   /* defined for signed 32-bits integer variable 		有符号32位整型变量 */
typedef float          fp32;                    /* single precision floating point variable (32bits) 单精度浮点数(32位长度) */
typedef double         fp64;                    /* double precision floating point variable (64bits) 双精度浮点数(64位长度) */

/********************************/
/*      ARM specital code      */
/*      ARM的特殊代码           */
/********************************/
//This segment should not be modify
//这一段无需改动

#include    "LPC23xx.h"

/********************************/
/*Application Program Configurations*/
/*     应用程序配置             */
/********************************/
//This segment could be modified as needed.
//以下根据需要改动


/********************************/
/*Configuration of the example */
/*     本例子的配置             */ 
/********************************/
/* System configuration .Fosc、Fcclk、Fcco、Fpclk must be defined */
#define	USE_USB				1

#define PLL_NValue			1			// Fcco/Fosc = 2M/N, 为减低功耗,N值越小越好,所以可以先设定N值
#define Fin	                12000000	//OSC = 12MHz				
 					
/* System frequence,should be less than 80MHz. */
#define Fcclk	(Fin*4)			        // 为了计算合适的M值,Fcclk最好为Fosc的偶数倍,且小于80M
#define Fcco	(Fcclk*6)			    // Fcco是Fcclk在275~550M之间的最小倍数
									    // 如果用了USB,则Fcco是Fcclk与Fusbclk在275~550M之间的最小公倍数
									
									
#define PLL_MValue   (((Fcco/Fin)*PLL_NValue)/2) // 推算M值

/* APB clock frequence , must be 1/2/4 multiples of ( Fcclk/4 ). */
/* If USB is enabled, the minimum APB must be greater than 16Mhz */ 
#if USE_USB
#define Fpclk	(Fcclk / 2)
#define Fusbclk	48000000	
#else
#define Fpclk	(Fcclk / 4)
#endif				
			

#include    "target.h"             

#endif
/*********************************************************************************************************
**                            End Of File
********************************************************************************************************/

⌨️ 快捷键说明

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