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

📄 salvolib.h

📁 嵌入式操作系统Salvo 在单片机C8051F350上的移植
💻 H
📖 第 1 页 / 共 3 页
字号:
/************************************************************ 
The contents of this file are subject to the Pumpkin Salvo
License (the "License").  You may not use this file except
in compliance with the License. You may obtain a copy of
the License at http://www.pumpkininc.com, or from
warranty@pumpkininc.com.

Software distributed under the License is distributed on an
"AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express
or implied. See the License for specific language governing
the warranty and the rights and limitations under the
License.

The Original Code is Salvo - The RTOS that runs in tiny
places(TM). Copyright (C) 1995-2002 Pumpkin, Inc. and its
Licensor(s). All Rights Reserved.

$Source: C:\\RCS\\d\\salvo\\inc\\salvolib.h,v $
$Author: aek $
$Revision: 3.50 $
$Date: 2003-07-17 23:47:18-07 $

Salvo configuration file for generating and using freeware 
and standard libraries.

NOTE:      This file is used in place of salvocfg.h when
         building libraries.

WARNING:   Users -- DO NOT EDIT THIS FILE! To build your
         own custom libraries from the supplied libraries,
         please see the end of this file.

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


#if    (OSCOMPILER == OSHT_PICC) \
  ||   (OSCOMPILER == OSHT_V8C) \
  ||   (OSCOMPILER == OSHT_8051C) \
  ||   (OSCOMPILER == OSGCC) \
  ||   (OSCOMPILER == OSKEIL_C51) \
  ||   (OSCOMPILER == OSMW_CW) \
  ||   (OSCOMPILER == OSMPLAB_C18) \
  ||   (OSCOMPILER == OSAQ_430) \
  || ( (OSCOMPILER == OSGCC_AVR) )                                      \
  || ( (OSCOMPILER == OSIAR_ICC)        && (OSTARGET == OSMSP430)     ) \
  || ( (OSCOMPILER == OSIAR_ICC)        && (OSTARGET == OSPIC18)      ) \
  || ( (OSCOMPILER == OSIMAGECRAFT)     && (OSTARGET == OSAVR)        ) \
  || ( (OSCOMPILER == OSIMAGECRAFT)     && (OSTARGET == OSM68HC11)    ) \
  || ( (OSCOMPILER == OSIMAGECRAFT)     && (OSTARGET == OSMSP430)     ) \
  || ( (OSCOMPILER == OSRA_CROSSSTUDIO) && (OSTARGET == OSMSP430)     ) \
  || ( (OSCOMPILER == OSZILOG_ZDSII)    && (OSTARGET == OSEZ8)        ) \
  || ( (OSCOMPILER == OSTI_DSP_CCS)     && (OSTARGET == OSTMS320C24X) ) \
  || ( (OSCOMPILER == OSTI_DSP_CCS)     && (OSTARGET == OSTMS320C28X) ) 
  

//#error salvolib.h: compiler:OSCOMPILER target:OSTARGET
//#error salvolib.h: type:OSLIBRARY_TYPE config:OSLIBRARY_CONFIG

/************************************************************/
/************************************************************/
/*                                                          */
/* pick up these config options from command line:          */
/*        OSMAKE_LIBRARY:    TRUE if generating library     */
/*        OSLIBRARY_TYPE:    library-dependent              */
/*        OSLIBRARY_CONFIG:  library-dependent              */
/*        OSLIBRARY_VARIANT: library-dependent              */
/*                                                          */
/*                                                          */
/* when _building_ libraries, we need to pick up the        */
/*  generic header file. When _using_ libraries, the user   */
/*  must #include the target-specific header file in the    */
/*  project's salvocfg.h. (Not always true ...)             */
/*                                                          */
#if OSMAKE_LIBRARY
                                        
#undef  OSUSE_LIBRARY
#define OSUSE_LIBRARY                   FALSE

/* non-Win32 compilers need / use shorter command lines ... */
#if  (OSCOMPILER == OSHT_V8C)
#define OSLIBRARY_TYPE                  OSL_T
#define OSLIBRARY_GLOBALS               OSL_G
#define OSLIBRARY_CONFIG                OSL_C
#define OSLIBRARY_VARIANT               OSL_V
#define OSCUSTOM_LIBRARY_CONFIG			OSCLC
#endif

#endif /* #if OSMAKE_LIBRARY */

/************************************************************/
/************************************************************/
/*                                                          */
/* some compiler & target combos do not have variants       */
/*                                                          */
#if   (OSCOMPILER == OSAQ_430) \
 ||   (OSCOMPILER == OSMPLAB_C18) \
 || ( (OSCOMPILER == OSGCC_AVR) )                                      \
 || ( (OSCOMPILER == OSIAR_ICC)        && (OSTARGET == OSMSP430)     ) \
 || ( (OSCOMPILER == OSIAR_ICC)        && (OSTARGET == OSPIC18)      ) \
 || ( (OSCOMPILER == OSIMAGECRAFT)     && (OSTARGET == OSAVR)        ) \
 || ( (OSCOMPILER == OSIMAGECRAFT)     && (OSTARGET == OSM68HC11)    ) \
 || ( (OSCOMPILER == OSIMAGECRAFT)     && (OSTARGET == OSMSP430)     ) \
 || ( (OSCOMPILER == OSRA_CROSSSTUDIO) && (OSTARGET == OSMSP430)     ) \
 || ( (OSCOMPILER == OSTI_DSP_CCS)     && (OSTARGET == OSTMS320C24X) ) \
 || ( (OSCOMPILER == OSTI_DSP_CCS)     && (OSTARGET == OSTMS320C28X) ) \
 || ( (OSCOMPILER == OSZILOG_ZDSII)    && (OSTARGET == OSEZ8)        ) 
#if defined(OSLIBRARY_VARIANT)
#undef  OSLIBRARY_VARIANT
#endif
#define OSLIBRARY_VARIANT                OSNONE
#endif


/************************************************************/
/************************************************************/
/*                                                          */
/* ensure configuration options are specified, either from  */
/*  above (when generating) or when using the library.      */
/*                                                          */
#if !defined(OSUSE_LIBRARY)
#error salvolib.h: Library generate/use not specified -- aborting. 
#endif

#if !defined(OSLIBRARY_TYPE)
#error salvolib.h: Library type not specified -- aborting.
#endif

#if !defined(OSLIBRARY_CONFIG)
#error salvolib.h: Library configuration not specified -- aborting.
#endif

#if !defined(OSLIBRARY_VARIANT)
#error salvolib.h: Library variant not specified -- aborting. 
#endif

#if     (OSCOMPILER == OSKEIL_C51) \
   ||   (OSCOMPILER == OSMPLAB_C18) \
   ||   (OSCOMPILER == OSHT_8051C) \
   || ( (OSCOMPILER == OSIAR_ICC) && (OSTARGET == OSPIC18) )
#if !defined(OSLIBRARY_GLOBALS)
#error salvolib.h: Library memory type for globals not specified -- aborting. 
#endif
#endif



/************************************************************/
/************************************************************/
/*                                                          */
/* common across all libraries                              */
/*                                                          */
#define OSCOMBINE_EVENT_SERVICES        FALSE
#define OSENABLE_EVENT_TRYING           TRUE
                                        

/************************************************************/
/************************************************************/
/*                                                          */
/* Set configuration options based on OSLIBRARY_TYPE,       */
/*  OSLIBRARY_CONFIG and OSLIBRARY_VARIANT.                 */
/*                                                          */

/************************************************************/
/*                                                          */
/* OSLIBRARY_TYPE settings -- types differ by limits only   */
/*  freeware libraries have set limits. Since SE libraries  */
/*  have limits that exceed the defaults, a special check   */
/*  is required for them, whereas none is required for tiny,*/
/*  LE and Pro libs (unlimited).                            */
/*                                                          */
/* All libraries are built with the same size mem.o object. */
/*                                                          */
#if   (OSLIBRARY_TYPE == OSF)

#define OSSET_LIMITS                    TRUE


#elif (OSLIBRARY_TYPE == OSL)

#if   (OSLIBRARY_CONFIG == OSS)
#define OSSET_LIMITS                    TRUE
#else
#define OSSET_LIMITS                    FALSE
#endif

#else

#error salvolib.h: Unknown library type -- aborting.

#endif


/************************************************************/
/*                                                          */
/* OSLIBRARY_CONFIG settings --                             */
/*                                                          */
/*                                                          */
/* multitasking-with-delays-and-events libraries            */
/*                                                          */
#if   (OSLIBRARY_CONFIG == OSA)

#define OSBYTES_OF_DELAYS               1
#define OSBYTES_OF_TICKS                4
#define OSDISABLE_TASK_PRIORITIES       FALSE
#define OSENABLE_BINARY_SEMAPHORES      TRUE
#define OSENABLE_CYCLIC_TIMERS          FALSE
#define OSENABLE_EVENT_FLAGS            TRUE
#define OSENABLE_IDLING_HOOK            TRUE
#define OSENABLE_MESSAGES               TRUE
#define OSENABLE_MESSAGE_QUEUES         TRUE
#define OSENABLE_SEMAPHORES             TRUE
#define OSENABLE_TIMEOUTS               FALSE


/*                                                          */
/* multitasking-with-delays libraries                       */
/*                                                          */
#elif (OSLIBRARY_CONFIG == OSD)

#define OSBYTES_OF_DELAYS               1
#define OSBYTES_OF_TICKS                4
#define OSDISABLE_TASK_PRIORITIES       FALSE
#define OSENABLE_BINARY_SEMAPHORES      FALSE
#define OSENABLE_CYCLIC_TIMERS          FALSE
#define OSENABLE_EVENT_FLAGS            FALSE
#define OSENABLE_IDLING_HOOK            TRUE
#define OSENABLE_MESSAGES               FALSE
#define OSENABLE_MESSAGE_QUEUES         FALSE
#define OSENABLE_SEMAPHORES             FALSE
#define OSENABLE_TIMEOUTS               FALSE


/*                                                          */
/* multitasking-with-events libraries                       */
/*                                                          */
#elif (OSLIBRARY_CONFIG == OSE)

#define OSBYTES_OF_DELAYS               0
#define OSBYTES_OF_TICKS                4
#define OSDISABLE_TASK_PRIORITIES       FALSE
#define OSENABLE_BINARY_SEMAPHORES      TRUE
#define OSENABLE_CYCLIC_TIMERS          FALSE
#define OSENABLE_EVENT_FLAGS            TRUE
#define OSENABLE_IDLING_HOOK            TRUE
#define OSENABLE_MESSAGES               TRUE
#define OSENABLE_MESSAGE_QUEUES         TRUE
#define OSENABLE_SEMAPHORES             TRUE
#define OSENABLE_TIMEOUTS               FALSE
                                        

/*                                                          */
/* multitasking-only libraries                              */
/*                                                          */
#elif (OSLIBRARY_CONFIG == OSM)
                                                                            
#define OSBYTES_OF_DELAYS               0
#define OSBYTES_OF_TICKS                4
#define OSDISABLE_TASK_PRIORITIES       TRUE
#define OSENABLE_BINARY_SEMAPHORES      FALSE
#define OSENABLE_CYCLIC_TIMERS          FALSE
#define OSENABLE_EVENT_FLAGS            FALSE
#define OSENABLE_IDLING_HOOK            FALSE
#define OSENABLE_MESSAGES               FALSE
#define OSENABLE_MESSAGE_QUEUES         FALSE
#define OSENABLE_SEMAPHORES             FALSE
#define OSENABLE_TIMEOUTS               FALSE


/*                                                          */
/* SE (bundled-only version) libraries                      */
/*                                                          */
#elif (OSLIBRARY_CONFIG == OSS)

#define OSBYTES_OF_DELAYS               1
#define OSBYTES_OF_TICKS                4
#define OSDISABLE_TASK_PRIORITIES       FALSE
#define OSENABLE_BINARY_SEMAPHORES      TRUE
#define OSENABLE_CYCLIC_TIMERS          FALSE
#define OSENABLE_EVENT_FLAGS            FALSE
#define OSENABLE_IDLING_HOOK            TRUE
#define OSENABLE_MESSAGES               TRUE
#define OSENABLE_MESSAGE_QUEUES         FALSE
#define OSENABLE_SEMAPHORES             TRUE
#define OSENABLE_TIMEOUTS               FALSE


/*                                                          */
/* multitasking-with-delays-and-events-and-timeouts         */
/*  libraries                                               */
/*                                                          */
#elif (OSLIBRARY_CONFIG == OST)

#define OSBYTES_OF_DELAYS               1
#define OSBYTES_OF_TICKS                4
#define OSDISABLE_TASK_PRIORITIES       FALSE
#define OSENABLE_BINARY_SEMAPHORES      TRUE
#define OSENABLE_CYCLIC_TIMERS          TRUE
#define OSENABLE_EVENT_FLAGS            TRUE
#define OSENABLE_IDLING_HOOK            TRUE
#define OSENABLE_MESSAGES               TRUE
#define OSENABLE_MESSAGE_QUEUES         TRUE
#define OSENABLE_SEMAPHORES             TRUE

⌨️ 快捷键说明

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