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

📄 st7lib_config.h

📁 利用PWM产生高精度正弦波,从PWM引脚输出的脉冲信号经过简单的低通滤波后,可以得到平滑的正弦波,波的频率可以微调
💻 H
字号:
/******************************************************************************
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 + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -