target.h

来源:百度知道 编辑:UC知道 时间:2024/06/15 21:17:58
作用是什么?

这就是一个启动代码,
这个代码的源码如下:
#ifndef __TARGET_H
#define __TARGET_H

#ifdef __cplusplus
extern "C" {
#endif

#ifndef IN_TARGET
extern void Reset(void);
extern void TargetInit(void);
#endif

#ifdef __cplusplus
}
#endif
#endif

可以看出,这个文件本身就是做了一些配置信息,函数声明什么的,
并没有什么特殊的作用。

但是,该文件用户可根据自己需要修改。
下面就是一个修改的实例:
/********************************************************************/
/* target.h: Philips LPC214x家族微控制器定义系统时钟的头文件*/
/********************************************************************/#ifndef __TARGET_H
#define __TARGET_H

#include
#include
#include
#include

#include "LPC214x.h"
#include "type.h"
#include "irq.h"
#include "timer.h"
#include "uart.h"
#include "..\OSsrc\ucos