IAR For AVR 关于 comp_a90.h 头文件的使用
/**************************************************************
** - INAVR.H -
**
** Backwards compatibility macros for iccAVR
**
** Used with iccAVR.
**
** Copyright IAR Systems 1999. All rights reserved.
**
** File version: $Revision: 1.3 $
**
**************************************************************/
#ifdef __IAR_SYSTEMS_ICC__
#ifndef _SYSTEM_BUILD
#pragma system_include
#endif
#endif
#ifndef __COMP_A90_H
#define __COMP_A90_H
#ifdef __ICCAVR__
#define tiny __tiny
#define near __near
#define far __far
#define huge __huge
#define flash const __flash
#define farflash const __farflash
#define nearfunc __nearfunc
#define farfunc __farfunc
#define sfrb int int int Cannot use sfrb keyword in iccAVR;
#define sfrw int int int Cannot use sfrw keyword in iccAVR;
#define monitor __monitor
#define C_task __C_task
#define no_init __no_init
#ifndef _CLI
#define_CLI()__disable_interrupt() //清总中断
#endif
#ifndef disable_interrupt
#define disable_interrupt() __disable_interrupt()
#endif
#ifndef _SEI
#define_SEI()__enable_interrupt()//开总中断
#endif
#ifndef enable_interrupt
#define enable_interrupt() __enable_interrupt()
#endif
#ifndef _NOP
#define_NOP()__no_operation()//一个时钟周期的延时
#endif
#ifndef _SLEEP
#define_SLEEP()__sleep()#endif//芯片进入休眠
#ifndef _LPM
#define _LPM(ADDR) __load_program_memory(ADDR)
#endif
#ifdef __HAS_ELPM__
#ifndef _ELPM
#define _ELPM(ADDR) __extended_load_program_memory(ADDR)
#endif
#endif
#ifndef _WDR
#define_WDR()__watchdog_reset()//喂狗
#endif
#ifndef _OPC
#define _OPC(opCode) __insert_opcode(opCode)
#endif
#ifndef _EEPUT
#define_EEPUT(V,A)__EEPUT(V,A)//写EEPROM
#endif
#ifndef _EEGET
#define_EEGET(V,A)__EEGET(V,A) //读EEPROM
#endif
#endif /* __ICCAVR__ */
#endif /* __COMP_A90_H */
IARAVR头文 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)