?? config.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 PLL_MValue ((Fcco/Fin)*PLL_NValue/2) // 推算M值
#define Fin 12000000
/* System frequence,should be less than 80MHz. */
#define Fcclk (Fin*6) // 為了計算合適的M值,Fcclk最好為Fosc的偶數倍,且小于80M
#define Fcco (Fcclk*4) // Fcco是Fcclk在275~550M之間的最小倍數
// 如果用了USB,則Fcco是Fcclk與Fusbclk在275~550M之間的最小公倍數
/* 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 + -