?? 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 : V1.00
** Descriptions : User Configurable File
**
**------------------------------------------------------------------------------------------------------
** Created By : Chenmingji
** Created date : 2004-09-17
** Version : V1.00
** Descriptions : First version
**
**------------------------------------------------------------------------------------------------------
** Modified by : LinEnqiang
** Modified date : 2007-05-15
** Version : V1.01
** Descriptions : Modified for LPC23xx
**
********************************************************************************************************/
#ifndef __CONFIG_H
#define __CONFIG_H
#ifdef __cplusplus
extern "C" {
#endif
//這一段無需改動
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
typedef unsigned char uint8; // 無符號8位整型變量
typedef signed char int8; // 有符號8位整型變量
typedef unsigned short uint16; // 無符號16位整型變量
typedef signed short int16; // 有符號16位整型變量
typedef unsigned int uint32; // 無符號32位整型變量
typedef signed int int32; // 有符號32位整型變量
typedef float fp32; // 單精度浮點數(32位長度)
typedef double fp64; // 雙精度浮點數(64位長度)
#define GLOBAL extern
/********************************
** uC/OS-II的特殊代碼
********************************/
#define USER_USING_MODE 0x10 // 用戶模式,ARM代碼
// 只能是0x10,0x30,0x1f,0x3f之一
#include "Includes.h"
/********************************
** ARM的特殊代碼
*********************************/
//這一段無需改動
#include "LPC23xx.h"
/********************************
** 應用程序配置
*********************************/
//以下根據需要改動
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <setjmp.h>
#include <rt_misc.h>
#include "target.h" //這一句不能刪除
#include "VIC_Control.h" //這一句不能刪除
/* SD/MMC 模塊頭文件 */
#include "sdconfig.h"
/* 數據隊列配置 */
#define QUEUE_DATA_TYPE uint8
#include "\queue\queue.h"
#define EN_QUEUE_WRITE 1 // 禁止(0)或使能(1)FIFO發送數據
#define EN_QUEUE_WRITE_FRONT 0 // 禁止(0)或使能(1)LIFO發送數據
#define EN_QUEUE_NDATA 1 // 禁止(0)或使能(1)取得隊列數據數目
#define EN_QUEUE_SIZE 1 // 禁止(0)或使能(1)取得隊列數據總容量
#define EN_QUEUE_FLUSH 0 // 禁止(0)或使能(1)清空隊列
/* UART0 配置 */
#include "uart0.h"
#define UART0_SEND_QUEUE_LENGTH 60 // 給UART0發送數據隊列分配的空間大小
/********************************
** 本例程的配置
*********************************/
#define USE_USB 1
#define Fosc 12000000 // OSC = 12MHz
#if USE_USB
#define Fusbclk 48000000
#define Fcclk (Fosc * 4) // 主頻 Fcclk = 48MHz
#define Fcco (Fusbclk * (USBCLKDivValue+1)) // 如果用了USB,則Fcco是Fcclk與Fusbclk在275~550M之間的最小公倍數
// Fcco是Fcclk在275~550M之間的最小倍數
#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
#ifdef __cplusplus
}
#endif
#endif
/*********************************************************************************************************
** End Of File
********************************************************************************************************/
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -