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

📄 salvoprg.h

📁 这是AVR单片机上能跑的嵌入式操作系统salvo
💻 H
字号:
/************************************************************ 
Copyright (C) 1995-2002 Pumpkin, Inc. and its
Licensor(s). Freely distributable.

$Source: C:\\RCS\\d\\salvo\\inc\\salvoprg.h,v $
$Author: aek $
$Revision: 3.7 $
$Date: 2004-01-06 10:55:29-08 $

This file is used to include / inject compiler-specific 
pragmas where needed in the Salvo code. 
    
See comments in salvomcg.h on why this file doesn't have
include guards.


************************************************************/


/************************************************************
****                                                     ****
**                                                         **
MPLAB-C18 requires an explicitly defined segment. Can only
do all-or-nothing -- that's why OSLOC_ALL cannot be used.


ICCAVR users can force Salvo's global objects into a unique
program area called salvoram. When used, specify the start
and end addresses of this program area via:  
          
 	-bsalvoram:0xstart.0xend    
                       
as a linker option. Otherwise the salvoram program area will
simply follow the data program area (default). 

**                                                         **
****                                                     ****
************************************************************/
#if defined(__OSMEM_C) 

	/* prevent Salvo global objects from being  		*/
	/*  initialized. This "lasts" for just the 			*/
	/*  immediately-following object.					*/
	#if   ( OSCOMPILER == OSIAR_ICC ) && ( OSTARGET == OSPIC18 ) 
	
	    #pragma object_attribute=OSIAR_PIC18_ATTR_ALL
	    
	    #if !defined(OSIAR_PIC18_ATTR_ALL)
		    #error salvoprg.h: OSIAR_PIC18_ATTR_ALL undefined.
	    #endif
    
    #endif
    
    /* for MPLAB-C18, force the Salvo vars into the		*/
    /*  access bank, or into unique banks as req'd by 	*/
    /*  the Salvo arrays								*/
    #if (OSCOMPILER == OSMPLAB_C18)
    
    	#if (OSMPLAB_C18_LOC_ALL_NEAR == TRUE) 
    	
			#pragma udata access OSVars
			
		#else
		
			#if   defined(__OSTCBAREA_MEM_C)
			#pragma udata OSVarsTcbArea
			#elif defined(__OSECBAREA_MEM_C)
			#pragma udata OSVarsEcbArea
			#elif defined(__OSEFCBAREA_MEM_C)
			#pragma udata OSVarsEfcbArea
			#elif defined(__OSMQCBAREA_MEM_C)
			#pragma udata OSVarsMqcbArea
			#else
			#pragma udata OSVars
			#endif
			
		#endif
		
	#endif
	
    /* for ICCAVR, place each Salvo global object in	*/
    /*  the <salvoram> data area						*/
	#if ( (OSCOMPILER == OSIMAGECRAFT) && (OSTARGET == OSAVR) )
	
		#if !defined(__OSENDSALVOVARS_MEM_C)
			#pragma data:salvoram 
		#else
			#pragma data:data
		#endif
	 
	#endif  
    
#endif 

⌨️ 快捷键说明

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