?? config.h
字號:
/****************************************Copyright (c)**************************************************
** Guangzhou ZHIYUAN electronics Co.,LTD.
**
** http://www.embedtools.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: LinEnqiang
** Modified date: 2007-05-15
** Version: 1.0
** Descriptions: Modified for NXP23xx
**
********************************************************************************************************/
#ifndef __CONFIG_H
#define __CONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
//這一段無需改動
//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) 單精度浮點數(shù)(32位長度)
typedef double fp64; // double precision floating point variable (64bits) 雙精度浮點數(shù)(64位長度)
#define GLOBAL extern
/********************************/
/* ARM的特殊代碼 */
/* ARM specital code */
/********************************/
//這一段無需改動
//This segment should not be modify
#include "LPC23xx.h"
/********************************/
/* 應用程序配置 */
/*Application Program Configurations*/
/********************************/
//以下根據(jù)需要改動
//This segment could be modified as needed.
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <setjmp.h>
#include <rt_misc.h>
#include "target.h" //This line may not be deleted 這一句不能刪除
#include "SST25VF016BDrv.h"
/********************************/
/* 本例程的配置 */
/*Configuration of the example */
/********************************/
// If the value of(USE_RTC_OSC) is as same as the USE_MAIN_OSC,the anterior(USE_RTC_OSC) is selected acquiescently
#define USE_USB 1
#define Fosc 12000000 // OSC = 12MHz
#if USE_USB
#define Fusbclk 48000000
// System configuration .Fcclk、Fpclk must be defined
// 系統(tǒng)設置,Fcclk、Fpclk必須定義
#define Fcclk (Fosc * 4) // 主頻 Fcclk = 48MHz
#define Fcco (Fusbclk * (USBCLKDivValue+1)) // 如果用了USB,則Fcco是Fcclk與Fusbclk在275~550M之間的最小公倍數(shù)
// Fcco是Fcclk在275~550M之間的最小倍數(shù)
#define Fpclk (Fcclk / 2)
#define PLL_NValue 1
#define PLL_MValue (((Fcco/Fosc)*(PLL_NValue+1)/2)-1)
#define CCLKDivValue (Fcco/Fcclk-1)
#define USBCLKDivValue 5
#else
#define Fcclk (Fosc * 4) // 主頻 Fcclk = 48MHz
#define Fcco (Fcclk* 6)
#define Fpclk (Fcclk / 4)
#define PLL_NValue 1
#define PLL_MValue (((Fcco/Fosc)*(PLL_NValue+1)/2)-1)
#define CCLKDivValue (Fcco/Fcclk-1)
#define USBCLKDivValue 254
#endif
#define BUZZER 1 << 27 // P1.27控制蜂鳴器,低電平蜂鳴
#define BUZZER_Set() PINSEL3&=0xFFCFFFFF,IO1DIR|=(1<<27),IO1CLR|=(1<<27) // 開蜂鳴器
#define BUZZER_Clr() IO1SET|=(1<<27)
#ifdef __cplusplus
}
#endif
#endif
/*********************************************************************************************************
** End Of File
********************************************************************************************************/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -