st7lib_config.h

来自「ST7的例子」· C头文件 代码 · 共 75 行

H
75
字号
/******************************************************************************
COPYRIGHT 2003 STMicroelectronics
Source File Name : st7lib_config.h  
Group            : IPSW,CMG - IPDF
Author           : MCD Application Team
Date First Issued: 04/08/20032
********************************Documentation**********************************
General Purpose - This file is used to select the device and the communication 
				  mode.
********************************Revision History*******************************
_______________________________________________________________________________
Date :07/03/2002                  Release:1.0 
Date :23/09/2002                  Release:2.0 		       		 
******************************************************************************/

#ifndef	ST7LIB_CONFIG_H
#define	ST7LIB_CONFIG_H

#define	LT_LITE3  
#include "lt.h"	

#define	IO_LITE3 
#include "io.h" 

#endif /* ST7LIB_CONFIG_H */

/*---------------------------------Define Fcpu-------------------------------*/
#define Fcpu ((unsigned long) 8000000)   
#define Fosc2 ((unsigned long) 8000000)   

/******************************** End of User Part ***************************/


/*****************************Non User Part***********************************/
/*-----------------------------Compiler Selection----------------------------*/     

#ifdef __CSMC__
#define _COSMIC_
#else
#error "Unsupported Compiler!"                 /* Compiler defines not found */
#endif /* __CSMC__ */

#include"st7flite3_reg.h"

/*----------------------------Enumerated data type---------------------------*/
#ifndef enum_type
#define enum_type
#undef TRUE
#undef FALSE
typedef enum {
	FALSE	=(unsigned char) 0x00,			
	TRUE   = !(FALSE)                
        }BOOL; 
#endif /* enum_type */

/*---------------------Macros for Assembly instructions----------------------*/   
#ifdef _HIWARE_
#define EnableInterrupts {asm RIM;}
#define DisableInterrupts {asm SIM;}
#define Nop   {asm nop;}
#define WaitforInterrupt {asm wfi;}
#endif /* _HIWARE_ */

#ifdef _COSMIC_
#define EnableInterrupts {_asm ("RIM");}  
#define DisableInterrupts {_asm ("SIM");} 
#define Nop {_asm ("nop");} 
#define WaitforInterrupt {_asm ("wfi");} 
#endif /* _COSMIC_ */

     
/******************************** End of Non-user Part ***********************/
	
/**** (c) 2003   STMicroelectronics *************************** END OF FILE **/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?