?? config.h
字號(hào):
/****************************************Copyright (c)**************************************************
** Guangzhou ZHIYUAN electronics Co.,LTD.
** http://www.zyinside.com
**
**--------------File Info-------------------------------------------------------------------------------
** File Name: config.h
** Last modified Date: 2006-02-22
** Last Version: 1.0
** Descriptions: User Configurable File
**
**------------------------------------------------------------------------------------------------------
** Created By: Chenmingji
** Created date: 2006-02-22
** Version: 1.0
** Descriptions: First version
**
**------------------------------------------------------------------------------------------------------
** Modified by:
** Modified date:
** Version:
** Descriptions:
**
********************************************************************************************************/
#ifndef __CONFIG_H
#define __CONFIG_H
//This segment should not be modified
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef NULL
#define NULL 0L
#endif
typedef unsigned char uint8; /* defined for unsigned 8-bits integer variable 無符號(hào)8位整型變量 */
typedef signed char int8; /* defined for signed 8-bits integer variable 有符號(hào)8位整型變量 */
typedef unsigned short uint16; /* defined for unsigned 16-bits integer variable 無符號(hào)16位整型變量 */
typedef signed short int16; /* defined for signed 16-bits integer variable 有符號(hào)16位整型變量 */
typedef unsigned int uint32; /* defined for unsigned 32-bits integer variable 無符號(hào)32位整型變量 */
typedef signed int int32; /* defined for signed 32-bits integer variable 有符號(hào)32位整型變量 */
typedef float fp32; /* single precision floating point variable (32bits) 單精度浮點(diǎn)數(shù)(32位長度) */
typedef double fp64; /* double precision floating point variable (64bits) 雙精度浮點(diǎn)數(shù)(64位長度) */
/********************************/
/* ARM specital code */
/* ARM的特殊代碼 */
/********************************/
//This segment should not be modify
//這一段無需改動(dòng)
#include "LPC2294.h"
#include "target.h"
#include "uart.h"
/********************************/
/* 本例子的配置 */
/*Configuration of the example */
/********************************/
/* System configuration .Fosc、Fcclk、Fcco、Fpclk must be defined */
/* 系統(tǒng)設(shè)置, Fosc、Fcclk、Fcco、Fpclk必須定義*/
#define Fosc 11059200 //Crystal frequence,10MHz~25MHz,should be the same as actual status.
//應(yīng)當(dāng)與實(shí)際一至晶振頻率,10MHz~25MHz,應(yīng)當(dāng)與實(shí)際一至
#define Fcclk (Fosc * 4) //System frequence,should be (1~32)multiples of Fosc,and should be equal or less than 60MHz.
//系統(tǒng)頻率,必須為Fosc的整數(shù)倍(1~32),且<=60MHZ
#define Fcco (Fcclk * 4) //CCO frequence,should be 2、4、8、16 multiples of Fcclk, ranged from 156MHz to 320MHz.
//CCO頻率,必須為Fcclk的2、4、8、16倍,范圍為156MHz~320MHz
#define Fpclk (Fcclk / 4) * 1 //VPB clock frequence , must be 1、2、4 multiples of (Fcclk / 4).
//VPB時(shí)鐘頻率,只能為(Fcclk / 4)的1、2、4倍
#if (Fpclk / (Fcclk / 4)) == 2
#define VPBDIV_DATA 2
#else
#if (Fpclk / (Fcclk / 4)) == 4
#define VPBDIV_DATA 1
#else
#define VPBDIV_DATA 0
#endif
#endif
#if (Fcco / Fcclk) == 2
#define PLLCFG_DATA (((Fcclk / Fosc) - 1) | (0 << 5))
#else
#if (Fcco / Fcclk) == 4
#define PLLCFG_DATA (((Fcclk / Fosc) - 1) | (1 << 5))
#else
#if (Fcco / Fcclk) == 8
#define PLLCFG_DATA (((Fcclk / Fosc) - 1) | (2 << 5))
#else
#if (Fcco / Fcclk) == 16
#define PLLCFG_DATA (((Fcclk / Fosc) - 1) | (3 << 5))
#else
#define PLLCFG_DATA 0x100
#endif
#endif
#endif
#endif
#if Fcclk < 20000000
#define MAMTIM_DATA 1
#else
#if Fcclk < 40000000
#define MAMTIM_DATA 2
#else
#if Fcclk < 60000000
#define MAMTIM_DATA 3
#else
#if Fcclk < 80000000
#define MAMTIM_DATA 4
#else
#if Fcclk < 100000000
#define MAMTIM_DATA 5
#else
#if Fcclk < 120000000
#define MAMTIM_DATA 6
#else
#define MAMTIM_DATA 7
#endif
#endif
#endif
#endif
#endif
#endif
/********************************/
/*Application Program Configurations*/
/* 應(yīng)用程序配置 */
/********************************/
//This segment could be modified as needed.
//以下根據(jù)需要改動(dòng)
#endif
/*********************************************************************************************************
** End Of File
********************************************************************************************************/
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -