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

📄 salvo.h

📁 嵌入式操作系统Salvo 在单片机C8051F350上的移植
💻 H
📖 第 1 页 / 共 5 页
字号:
#include "porticc430.h"
#else
#error salvo.h: Unknown target for ImageCraft compiler.
#endif


/* AVR GCC compiler */
#elif ( (OSCOMPILER == OSAVR_GCC) || (OSCOMPILER == OSGCC_AVR) )

#include "portgccavr.h"

 
/* Keil C51 compiler */
#elif (OSCOMPILER == OSKEIL_C51)

#include "portkc51.h"

 
/* Metrowerks CodeWarrior for i86 */
#elif (OSCOMPILER == OSMW_CW)

#include "portmwcw.h"
  
    
/* Metrowerks CodeWarrior for Motorola DSP56800 */
#elif ( (OSCOMPILER == OSMW_56800) && (OSTARGET == OSDSP56800) )

#include "portmw56800.h"
  
    
/* Microchip MPLAB C-18 Compiler */
#elif (OSCOMPILER == OSMPLAB_C18)

#include "portmcc.h"


/* Mix Power C */
#elif (OSCOMPILER == OSMIX_PC)

#include "portmixc.h"


/* TASKING CC51 compiler */
#elif (OSCOMPILER == OSTASKING_CC51)

#include "portcc51.h"


/* TI Code Composer Studio compiler for TMS320C24x|28x */
#elif (OSCOMPILER == OSTI_DSP_CCS)

#if ( (OSTARGET == OSTMS320C24X) || (OSTARGET == OSTMS320C28X) )
#include "porttic2000.h"
#else
#error salvo.h: Unknown target for TI DSP CCS.
#endif


/* Rowley Associates CrossStudio */
#elif (OSCOMPILER == OSRA_CROSSSTUDIO)

#if (OSTARGET == OSMSP430)
#include "portcs430.h"
#else
#error salvo.h: Unknown target for CrossStudio compiler.
#endif


/* fall-through on undefined or unknown OSCOMPILER */
#else
#error salvo.h: No known porting header file for this OSCOMPILER.


#endif /* #if OSCOMPILER */



/************************************************************
****                                                     ****
**                                                         **
Unsupported, Invalid and/or obsolete configuration options.

**                                                         **
****                                                     ****
************************************************************/
#if defined(OSBIG_MESSAGE_POINTERS) 
#if ( OSCOMPILER == OSHT_PICC )
#if OSBIG_MESSAGE_POINTERS
#define OSMESSAGE_TYPE                  const
#else
#define OSMESSAGE_TYPE                  void
#endif
#else
#error salvo.h: Unsupported or obsolete configuration option: \
OSBIG_MESSAGE_POINTERS. Use OSMESSAGE_TYPE instead.
#endif
#endif

#if defined(OSCALL_OSCREATEBINSEM)
#error salvo.h: Unsupported or obsolete configuration option: \
OSCALL_OSCREATEBINSEM. Use OSCALL_OSCREATEEVENT instead.
#undef OSCALL_OSCREATEBINSEM
#endif

#if defined(OSCALL_OSCREATEMSG)
#error salvo.h: Unsupported or obsolete configuration option: \
OSCALL_OSCREATEMSG. Use OSCALL_OSCREATEEVENT instead.
#undef OSCALL_OSCREATEMSG
#endif

#if defined(OSCALL_OSCREATEMSGQ)
#error salvo.h: Unsupported or obsolete configuration option: \
OSCALL_OSCREATEMSGQ. Use OSCALL_OSCREATEEVENT instead.
#undef OSCALL_OSCREATEMSGQ
#endif

#if defined(OSCALL_OSCREATESEM)
#error salvo.h: Unsupported or obsolete configuration option: \
OSCALL_OSCREATESEM. Use OSCALL_OSCREATEEVENT instead.
#undef OSCALL_OSCREATESEM
#endif

#if defined(OSCALL_OSSIGNALBINSEM)
#error salvo.h: Unsupported or obsolete configuration option: \
OSCALL_OSSIGNALBINSEM. Use OSCALL_OSSIGNALEVENT instead.
#undef OSCALL_OSSIGNALBINSEM
#endif

#if defined(OSCALL_OSSIGNALMSG)
#error salvo.h: Unsupported or obsolete configuration option: \
OSCALL_OSSIGNALMSG. Use OSCALL_OSSIGNALEVENT instead. 
#undef OSCALL_OSSIGNALMSG
#endif

#if defined(OSCALL_OSSIGNALMSGQ)
#error salvo.h: Unsupported or obsolete configuration option: \
OSCALL_OSSIGNALMSGQ. Use OSCALL_OSSIGNALEVENT instead.
#undef OSCALL_OSSIGNALMSGQ
#endif

#if defined(OSCALL_OSSIGNALSEM)
#error salvo.h: Unsupported or obsolete configuration option: \
OSCALL_OSSIGNALSEM. Use OSCALL_OSSIGNALEVENT instead.
#undef OSCALL_OSSIGNALSEM
#endif

#if defined(OSENABLE_IDLE_TASK)
#error salvo.h: Unsupported or obsolete configuration option: \
OSENABLE_IDLE_TASK.
#undef OSENABLE_IDLE_TASK
#endif

#if defined(OSENABLE_IDLE_TASK_HOOK)
#error salvo.h: Unsupported or obsolete configuration option: \
OSENABLE_IDLE_TASK_HOOK.
#undef OSENABLE_IDLE_TASK_HOOK
#endif

#if defined(OSMONITOR_KEYWORD_POST) && !defined(OSMONITOR_KEYWORD_POST_PROTO)
#error salvo.h: OSMONITOR_KEYWORD_POST_PROTO must also be defined.
#undef OSMONITOR_KEYWORD_POST
#endif

#if defined(OSMONITOR_KEYWORD_PRE) && !defined(OSMONITOR_KEYWORD_PRE_PROTO)
#error salvo.h: OSMONITOR_KEYWORD_PRE_PROTO must also be defined.
#undef OSMONITOR_KEYWORD_PRE
#endif

#if defined(OSPIC16_GIE_BUG)
#error salvo.h: Unsupported or obsolete configuration option: \
OSPIC16_GIE_BUG.
#undef OSPIC16_GIE_BUG
#endif

#if defined(OSSUPERTIMER_PRESCALAR)
#error salvo.h: Unsupported or obsolete configuration option: \
OSSUPERTIMER_PRESCALAR.
#undef OSSUPERTIMER_PRESCALAR
#endif

#if OSUSE_ARRAYS
#error salvo.h: Unsupported or obsolete configuration option: \
OSUSE_ARRAYS. Coming to a later version ...
#undef OSUSE_ARRAYS
#define OSUSE_ARRAYS FALSE
#endif

#if defined(OSUSE_LOCAL_ECBP)
#error salvo.h: Unsupported or obsolete configuration option: \
OSUSE_LOCAL_ECBP.
#undef OSUSE_LOCAL_ECBP           
#endif

#if defined(OSUSE_LOCAL_TCBP)
#error salvo.h: Unsupported or obsolete configuration option: \
OSUSE_LOCAL_TCBP.
#undef OSUSE_LOCAL_TCBP           
#endif

#if defined(OSUSE_CIRCULAR_QUEUES)
#error salvo.h: Unsupported or obsolete configuration option: \
OSUSE_CIRCULAR_QUEUES.
#undef OSUSE_CIRCULAR_QUEUES
#endif

#if OSUSE_INLINE_OSSCHED
#if ( OSCOMPILER == OSIAR_ICC ) && ( OSTARGET == OSMSP430 )
#error salvo.h: Option not supported with this compiler: OSUSE_INLINE_OSSCHED.
#endif
#endif

#if defined(OSUSE_INSELIGQ_MACRO)
#error salvo.h: Unsupported or obsolete configuration option: \
OSUSE_INSELIGQ_MACRO. Use OSUSE_INSELIG_MACRO instead.
#undef OSUSE_INSELIGQ_MACRO
#endif

#if defined(OSUSE_SUPERTIMER)
#error salvo.h: Unsupported or obsolete configuration option: \
OSUSE_SUPERTIMER.
#undef OSUSE_SUPERTIMER
#endif

/* The user should not set any of these if the compiler    */
/*  in use doesn't need them.                            */
#if  ( OSCALL_OSCREATEEVENT  != OSFROM_BACKGROUND ) \
  || ( OSCALL_OSGETPRIOTASK  != OSFROM_BACKGROUND ) \
  || ( OSCALL_OSGETSTATETASK != OSFROM_BACKGROUND ) \
  || ( OSCALL_OSMSGQEMPTY    != OSFROM_BACKGROUND ) \
  || ( OSCALL_OSRETURNEVENT  != OSFROM_BACKGROUND ) \
  || ( OSCALL_OSSIGNALEVENT  != OSFROM_BACKGROUND ) \
  || ( OSCALL_OSSTARTTASK    != OSFROM_BACKGROUND )
#if  ( OSCOMPILER != OSHT_PICC )  \
  && ( OSCOMPILER != OSHT_V8C )   \
  && ( OSCOMPILER != OSKEIL_C51 )
#error salvo.h: Unsupported or unnecessary configuration option: OSCALL_OSXYZ.
#endif
#endif

/************************************************************
****                                                     ****
**                                                         **
Packaged defines for dealing with compiler incompatibilities.
Each symbol represents a particular bug found, and is used
to invoke a workaround. These are provided because users
may not have a current revision of the specified compiler.

All workarounds default to FALSE to ensure that the symbols
are always defined.

**                                                         **
****                                                     ****
************************************************************/
/* all workarounds are initially defined as FALSE to avoid */
/*  "unknown identifier" problems with unrelated compilers.*/
#define OSWORKAROUND_HT_PICC_1          FALSE
#define OSWORKAROUND_HT_V8C_2           FALSE


/* now begin compiler-specific workaround section. */
#if ( OSCOMPILER == OSHT_PICC ) || ( OSCOMPILER == OSHT_V8C )

#if !defined(_HTC_VER_MAJOR_)
#define _HTC_VER_MAJOR_                 0
#endif
#if !defined(_HTC_VER_MINOR_)
#define _HTC_VER_MINOR_                 0
#endif
#if !defined(_HTC_VER_PATCH_)
#define _HTC_VER_PATCH_                 0
#endif
#define OSHTC_VER                         (_HTC_VER_MAJOR_*1000) \
                                        + (_HTC_VER_MINOR_*  10) \
                                        + (_HTC_VER_PATCH_*   1)

#endif


/* version tracking for HI-TECH PICC compilers began with   */
/*  v7.87.                                                  */
#if ( OSCOMPILER == OSHT_PICC )
 
/* PICC workaround #1 -- on PIC12, functions that return an */
/*  8-bit value and have parameters MUST return a value     */
/*  immediately after a comparison with one of the param-   */
/*  eters. O/wise undefined symbol:btemp error occurs. This */
/*  bug was present in v7.87 and earlier and has not been   */
/*  fixed, TTBOMK.                                          */
#if ( OSTARGET == OSPIC12 )
#undef  OSWORKAROUND_HT_PICC_1
#define OSWORKAROUND_HT_PICC_1          TRUE
#endif

#endif /* HI-TECH PICC compilers */


/* version tracking for HI-TECH V8C compilers began with    */
/*  v7.85PL1.                                               */
#if ( OSCOMPILER == OSHT_V8C )

 
/* V8C workaround #1. "Can't generate code for this         */
/*  expression" when a pointer parameter is used to point   */
/*  to a field in an rvalue. Rendered obsolete 12/6/02      */
/*  because of the way we were using #define and #undef to  */
/*  implement this solution.                                */
#if OSHTC_VER <= 7850
#error salvo.h You must upgrade to V8C v7.85PL1 or later ...
#endif

/* V8C workaround #2. Doing:                                 */
/*      tcbP->status.bits.prio = prio                       */
/* results in a huge number of incorrect instructions.        */
/* Not yet fixed in V8C.                                    */
#undef  OSWORKAROUND_HT_V8C_2
#define OSWORKAROUND_HT_V8C_2            TRUE

#endif /* HI-TECH V8C compiler */



/************************************************************
****                                                     ****
**                                                         **
#defines that lead to conflicts.

**                                                         **
****                                                     ****
************************************************************/
#if ( OSCOMPILER == OSMIX_PC ) && OSUSE_INLINE_OSTIMER
#error salvo.h: In-lining OSTimer() is not permitted with Mix PC Compiler.
#endif


/************************************************************
****                                                     ****
**                                                         **
Special #defines for creating demo versions.

Hard-coded limits for the number of events, message queues 
and tasks are used in places like OSCreateTask() and 
OSWaitBinSem().

They are enabled when OSSET_LIMITS is TRUE.

Note that these limits do not prevent the creation of large
ecbs, mqcbs and tcbs -- it's just that the code won't allow 
access to the ones beyond the set limits.

**                                                         **
****                                                     ****
************************************************************/
#if OSSET_LIMITS
#undef OSENABLE_BOUNDS_CHECKING
#define OSENABLE_BOUNDS_CHECKING        TRUE
#endif


/************************************************************
****                                                     ****
**                                                         **
Special Salvo configurations.

#defines which override other #defines.

**                                                         **
****                                                     ****
************************************************************/
/* reference the external user function if in use */
#if OSENABLE_INTERRUPT_HOOKS
#define OSDiHook()                      OSDisableIntsHook()
#define OSEiHook()                      OSEnableIntsHook()
#else
#define OSDiHook() 
#define OSEiHook()
#endif
                                        

/* cyclic timers require that timeouts be enabled */
#if OSENABLE_CYCLIC_TIMERS
  #undef OSENABLE_TIMEOUTS
  #define OSENABLE_TIMEOUTS             TRUE
#endif


/* timeouts require that events and delays be enabled */
#if OSENABLE_TIMEOUTS
 #if ( OSBYTES_OF_DELAYS == 0 )
  #undef OSBYTES_OF_DELAYS
  #define OSBYTES_OF_DELAYS             1
 #endif
 #if !OSEVENTS
  #undef OSEVENTS
  #define OSEVENTS                      1
 #endif
#endif


/* must have at least one event flag if they're enabled.    */
/*  An exception exists when using libraries -- you want to */
/*  be able to remove them entirely from your memory map.   */
#if OSENABLE_EVENT_FLAGS && !OSUSE_LIBRARY

⌨️ 快捷键说明

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