📄 config.h
字号:
/****************************************Copyright (c)**************************************************
** Guangzhou ZHIYUAN electronics Co.,LTD.
**
** http://www.zyinside.com
**
**--------------File Info-------------------------------------------------------------------------------
** File Name: config.h
** Last modified Date: 2006-8-10
** Last Version: v1.1
** Descriptions: 用户配置头文件
**
**------------------------------------------------------------------------------------------------------
** Created By: 黄绍斌
** Created date: 2005-12-31
** Version: v1.0
** Descriptions:
**
**------------------------------------------------------------------------------------------------------
** Modified by: 黄绍斌
** Modified date: 2006-8-10
** Version: v1.1
** Descriptions: 针对PXA27x进行修改
**
********************************************************************************************************/
#ifndef __CONFIG_H
#define __CONFIG_H
//------------------------------------------------------------------------------------------------------
/********************************************************************************************************
** "以下为系统配置"
** system configs in here
********************************************************************************************************/
// 这一段无需改动
#ifndef TRUE
#define TRUE 1
#endif
#ifndef FALSE
#define FALSE 0
#endif
#ifndef NULL
#define NULL (void *)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位长度) */
/*********************************************************************************************************
** "以下为程序配置"
** project configs in here
********************************************************************************************************/
// 这一段无需改动
#include "pxa27x.h"
#include "target.h"
#include "uart.h"
#include <stdio.h>
#include <ctype.h>
#include <stdlib.h>
// IRQ中断向量地址表
extern uint32 VICVectAddr[];
// 使能/禁能IRQ、FIQ中断
__swi(0x00) void SwiHandle1(int Handle);
#define IRQDisable() SwiHandle1(0)
#define IRQEnable() SwiHandle1(1)
#define FIQDisable() SwiHandle1(2)
#define FIQEnable() SwiHandle1(3)
// 定义外部总线配置值
// RTx配置
#define NB_FLASH 0
#define SRAM 1
#define B4_FLASH 2
#define B8_FLASH 3
#define VLIO 4
// RBWx配置
#define W32 0
#define W16 1
// RBUFFx配置
#define SLOWER 0
#define FASTER 1
// RRRx配置,0--7
// RDNx配置,0--15
// RDFx配置,0--15
// MSCx寄存器控制域定义
#define RT0 (0)
#define RBW0 (3)
#define RDF0 (4)
#define RDN0 (8)
#define RRR0 (12)
#define RBUFF0 (15)
#define RT1 (0+16)
#define RBW1 (3+16)
#define RDF1 (4+16)
#define RDN1 (8+16)
#define RRR1 (12+16)
#define RBUFF1 (15+16)
/*********************************************************************************************************
** "以下为应用程序配置"
** project configs in here
********************************************************************************************************/
// 以下根据需要改动
/**** 外部总线配置,用户可根据实际需要修改 ****/
#define B0_CON (SLOWER<<RBUFF0) | (W32<<RBW0) | (NB_FLASH<<RT0) | (7<<RRR0) | (15<<RDN0) | (15<<RDF0)
#define B1_CON (SLOWER<<RBUFF1) | (W32<<RBW1) | ( VLIO<<RT1) | (7<<RRR1) | (15<<RDN1) | (15<<RDF1)
#define B2_CON (SLOWER<<RBUFF0) | (W32<<RBW0) | ( VLIO<<RT0) | (7<<RRR0) | (15<<RDN0) | (15<<RDF0)
#define B3_CON (SLOWER<<RBUFF1) | (W32<<RBW1) | ( VLIO<<RT1) | (7<<RRR1) | (15<<RDN1) | (15<<RDF1)
#define B4_CON (SLOWER<<RBUFF0) | (W32<<RBW0) | ( VLIO<<RT0) | (7<<RRR0) | (15<<RDN0) | (15<<RDF0)
#define B5_CON (SLOWER<<RBUFF1) | (W32<<RBW1) | ( VLIO<<RT1) | (7<<RRR1) | (15<<RDN1) | (15<<RDF1)
// 是否使能520MHz内核心时钟
#define EN_CLK520MHz 0
/*------------------------------------------------------------------------------------------------------*/
/* 其它包含文件在这里 */
/* header files in here */
#include "I2C.h"
//------------------------------------------------------------------------------------------------------
/* 程序自己定义的内容 */
/* other project configs in here */
//------------------------------------------------------------------------------------------------------
#endif // __CONFIG_H
/*********************************************************************************************************
** End Of File
********************************************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -