⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 st7lib_config.h

📁 ST7很实用的例子
💻 H
字号:
/******************************************************************************
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

#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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -