st7lib_config.h

来自「st7单片机关于can总线设计的源程序,使用ST7单片机的很有用」· C头文件 代码 · 共 91 行

H
91
字号
/******************************************************************************
COPYRIGHT 2003 STMicroelectronics
Source File Name : st7lib_config.h  
Group            : MicroController Group
Author           : MCD Application Team
Date First Issued: 25/11/03
********************************Documentation**********************************
General Purpose - This file is used to select the device and the communication 
				  mode.
********************************Revision History*******************************
_______________________________________________________________________________
Date : 25/11/03              Release: 1.0   		 
******************************************************************************/

#ifndef	ST7LIB_CONFIG_H
#define	ST7LIB_CONFIG_H

#include "st72f561_periph.h"                                              

#endif 

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

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

/*****************************Non User Part***********************************/

#if defined (ST72F561_periph_H)
  #include"st72f561_reg.h"
#endif

/*-----------------------Select the mode of communication--------------------*/

//#define SCI2_POLLING_TX                         /* Polling mode transmission*/
#define SCI2_POLLING_RX                         /* Polling mode reception */                    
#define SCI2_ITDRV_WITHOUTBUF_TX    

/*---------------Selection of Slave mode transmission configuration ---------*/
/* #define SPI_SLAVE_CONFIG  */
#define SPI_POLLING_TX                         /* Polling mode transmission */                   
#define SPI_POLLING_RX 
//#define SPI_ITDRV_WITHOUTBUF_TX
//#define SPI_ITDRV_WITHOUTBUF_RX   


/*-------------------------------Select the TIMER----------------------------*/

#define USE_TIMERA    
            
/*----------------------------Enumerated data type---------------------------*/
#ifndef enum_type
#define enum_type
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 + -
显示快捷键?