📄 salvomcg.h
字号:
|| defined(__OSCREATEEVENT_EVENT_C) \
|| defined(__OSCREATEMSG_MSG_C) \
|| defined(__OSCREATEMSGQ_MSGQ_C) \
|| defined(__OSCREATESEM_SEM_C)
#undef OSBeginCriticalSection
#undef OSEndCriticalSection
#if OSCALL_OSCREATEEVENT == OSFROM_BACKGROUND
#define OSBeginCriticalSection() OSEnterCritical()
#define OSEndCriticalSection() OSLeaveCritical()
#elif OSCALL_OSCREATEEVENT == OSFROM_FOREGROUND
#define OSBeginCriticalSection()
#define OSEndCriticalSection()
#elif OSCALL_OSCREATEEVENT == OSFROM_ANYWHERE
#include <salvolvl.h>
#define OSBeginCriticalSection()
#define OSEndCriticalSection()
#endif
/* OSGetPrioTask() */
#elif defined(__OSGETPRIOTASK_PRIO_C)
#undef OSBeginCriticalSection
#undef OSEndCriticalSection
#if OSCALL_OSGETPRIOTASK == OSFROM_BACKGROUND
#define OSBeginCriticalSection() OSEnterCritical()
#define OSEndCriticalSection() OSLeaveCritical()
#elif OSCALL_OSGETPRIOTASK == OSFROM_FOREGROUND
#define OSBeginCriticalSection()
#define OSEndCriticalSection()
#elif OSCALL_OSGETPRIOTASK == OSFROM_ANYWHERE
#include <salvolvl.h>
#define OSBeginCriticalSection()
#define OSEndCriticalSection()
#endif
/* OSGetStateTask() */
#elif defined(__OSGETSTATETASK_TASK5_C)
#undef OSBeginCriticalSection
#undef OSEndCriticalSection
#if OSCALL_OSGETSTATETASK == OSFROM_BACKGROUND
#define OSBeginCriticalSection() OSEnterCritical()
#define OSEndCriticalSection() OSLeaveCritical()
#elif OSCALL_OSGETSTATETASK == OSFROM_FOREGROUND
#define OSBeginCriticalSection()
#define OSEndCriticalSection()
#elif OSCALL_OSGETSTATETASK == OSFROM_ANYWHERE
#include <salvolvl.h>
#define OSBeginCriticalSection()
#define OSEndCriticalSection()
#endif
/* OSMsgQCount() */
#elif defined(__OSMSGQCOUNT_MSGQ4_C)
#undef OSBeginCriticalSection
#undef OSEndCriticalSection
#if OSCALL_OSMSGQCOUNT == OSFROM_BACKGROUND
#define OSBeginCriticalSection() OSEnterCritical()
#define OSEndCriticalSection() OSLeaveCritical()
#elif OSCALL_OSMSGQCOUNT == OSFROM_FOREGROUND
#define OSBeginCriticalSection()
#define OSEndCriticalSection()
#elif OSCALL_OSMSGQCOUNT == OSFROM_ANYWHERE
#include <salvolvl.h>
#define OSBeginCriticalSection()
#define OSEndCriticalSection()
#endif
/* OSMsgQEmpty() */
#elif defined(__OSMSGQEMPTY_MSGQ3_C)
#undef OSBeginCriticalSection
#undef OSEndCriticalSection
#if OSCALL_OSMSGQEMPTY == OSFROM_BACKGROUND
#define OSBeginCriticalSection() OSEnterCritical()
#define OSEndCriticalSection() OSLeaveCritical()
#elif OSCALL_OSMSGQEMPTY == OSFROM_FOREGROUND
#define OSBeginCriticalSection()
#define OSEndCriticalSection()
#elif OSCALL_OSMSGQEMPTY == OSFROM_ANYWHERE
#include <salvolvl.h>
#define OSBeginCriticalSection()
#define OSEndCriticalSection()
#endif
/* OSReturnBinSem/EFlag/Msg/MsgQ/Sem() */
#elif defined(__OSRETURNBINSEM_BINSEM2_C) \
|| defined(__OSRETURNEFLAG_EFLAG2_C) \
|| defined(__OSRETURNMSG_MSG2_C) \
|| defined(__OSRETURNMSGQ_MSGQ2_C) \
|| defined(__OSRETURNSEM_SEM2_C)
#undef OSBeginCriticalSection
#undef OSEndCriticalSection
#if OSCALL_OSRETURNEVENT == OSFROM_BACKGROUND
#define OSBeginCriticalSection() OSEnterCritical()
#define OSEndCriticalSection() OSLeaveCritical()
#elif OSCALL_OSRETURNEVENT == OSFROM_FOREGROUND
#define OSBeginCriticalSection()
#define OSEndCriticalSection()
#elif OSCALL_OSRETURNEVENT == OSFROM_ANYWHERE
#include <salvolvl.h>
#define OSBeginCriticalSection()
#define OSEndCriticalSection()
#endif
/* OSSignalEvent() and OSSignalBinSem/EFlag/Msg/MsgQ/Sem() */
#elif defined(__OSSIGNALBINSEM_BINSEM_C) \
|| defined(__OSSIGNALEFLAG_EFLAG_C) \
|| defined(__OSSIGNALEVENT_EVENT_C) \
|| defined(__OSSIGNALMSG_MSG_C) \
|| defined(__OSSIGNALMSGQ_MSGQ_C) \
|| defined(__OSSIGNALSEM_SEM_C)
#undef OSBeginCriticalSection
#undef OSEndCriticalSection
#if OSCALL_OSSIGNALEVENT == OSFROM_BACKGROUND
#define OSBeginCriticalSection() OSEnterCritical()
#define OSEndCriticalSection() OSLeaveCritical()
#elif OSCALL_OSSIGNALEVENT == OSFROM_FOREGROUND
#define OSBeginCriticalSection()
#define OSEndCriticalSection()
#elif OSCALL_OSSIGNALEVENT == OSFROM_ANYWHERE
#include <salvolvl.h>
#define OSBeginCriticalSection()
#define OSEndCriticalSection()
#endif
/* OSStartTask() */
#elif defined(__OSSTARTTASK_TASK_C)
#undef OSBeginCriticalSection
#undef OSEndCriticalSection
#if OSCALL_OSSTARTTASK == OSFROM_BACKGROUND
#define OSBeginCriticalSection() OSEnterCritical()
#define OSEndCriticalSection() OSLeaveCritical()
#elif OSCALL_OSSTARTTASK == OSFROM_FOREGROUND
#define OSBeginCriticalSection()
#define OSEndCriticalSection()
#elif OSCALL_OSSTARTTASK == OSFROM_ANYWHERE
#include <salvolvl.h>
#define OSBeginCriticalSection()
#define OSEndCriticalSection()
#endif
#endif /* #if ... #elif ... */
/************************************************************
**** ****
** **
ImageCraft compilers.
ICC requires the function name be listed on the same
line as the pragma, so we can't use the OSMONITOR_KEYWORD_PRE
version like IAR430 and AQ430.
** **
**** ****
************************************************************/
#elif ( (OSCOMPILER == OSIMAGECRAFT) \
&& (OSMONITOR_KEYWORD_EXISTS == TRUE) )
/* common to ICC430 and ICCAVR */
#if ( (OSTARGET == OSMSP430 ) || (OSTARGET == OSAVR) )
#if defined(__OSCREATEBINSEM_BINSEM_C)
#pragma monitor OSCreateBinSem
#elif defined(__OSWAITBINSEM_BINSEM_C)
#pragma monitor OSWaitBinSem
#elif defined(__OSSIGNALBINSEM_BINSEM_C)
#pragma monitor OSSignalBinSem
#elif defined(__OSCREATECYCTMR_CYCLIC_C)
#pragma monitor OSCreateCycTmr
#elif defined(__OSSTARTCYCTMR_CYCLIC2_C)
#pragma monitor OSStartCycTmr
#elif defined(__OSSTOPCYCTMR_CYCLIC3_C)
#pragma monitor OSStopCycTmr
#elif defined(__OSDESTROYCYCTMR_CYCLIC4_C)
#pragma monitor OSDestroyCycTmr
#elif defined(__OSSETCYCTMRPERIOD_CYCLIC5_C)
#pragma monitor OSSetCycTmrPeriod
#elif defined(__OSRESETCYCTMR_CYCLIC6_C)
#pragma monitor OSResetCycTmr
#elif defined(__OSCYCTMRRUNNING_CYCLIC7_C)
#pragma monitor OSCycTmrRunning
#elif defined(__OSRETURNBINSEM_BINSEM2_C)
#pragma monitor OSReturnBinSem
#elif defined(__OSDELAY_DELAY_C)
#pragma monitor OSDelay
#elif defined(__OSSYNCTSTASK_DELAY2_C)
#pragma monitor OSSyncTSTask
#elif defined(__OSGETTSTASK_DELAY3_C)
#pragma monitor OSGetTSTask
#elif defined(__OSSETTSTASK_DELAY3_C)
#pragma monitor OSSetTSTask
#elif defined(__OSDESTROY_DESTROY_C)
#pragma monitor OSDestroy
#elif defined(__OSCREATEEFLAG_EFLAG_C)
#pragma monitor OSCreateEFlag
#elif defined(__OSWAITEFLAG_EFLAG_C)
#pragma monitor OSWaitEFlag
#elif defined(__OSSIGNALEFLAG_EFLAG_C)
#pragma monitor OSSignalEFlag
#elif defined(__OSRETURNEFLAG_EFLAG2_C)
#pragma monitor OSReturnEFlag
#elif defined(__OSCREATEEVENT_EVENT_C)
#pragma monitor OSCreateEvent
#elif defined(__OSSIGNALEVENT_EVENT_C)
#pragma monitor OSSignalEvent
#elif defined(__OSWAITEVENT_EVENT_C)
#pragma monitor OSWaitEvent
#elif defined(__OSCREATETASK_INITTASK_C)
#pragma monitor OSCreateTask
#elif defined(__OSCREATEMSG_MSG_C)
#pragma monitor OSCreateMsg
#elif defined(__OSWAITMSG_MSG_C)
#pragma monitor OSWaitMsg
#elif defined(__OSSIGNALMSG_MSG_C)
#pragma monitor OSSignalMsg
#elif defined(__OSRETURNMSG_MSG2_C)
#pragma monitor OSReturnMsg
#elif defined(__OSCREATEMSGQ_MSGQ_C)
#pragma monitor OSCreateMsgQ
#elif defined(__OSWAITMSGQ_MSGQ_C)
#pragma monitor OSWaitMsgQ
#elif defined(__OSSIGNALMSGQ_MSGQ_C)
#pragma monitor OSSignalMsgQ
#elif defined(__OSRETURNMSGQ_MSGQ2_C)
#pragma monitor OSReturnMsgQ
#elif defined(__OSMSGQCOUNT_MSGQ4_C)
#pragma monitor OSMsgQCount
#elif defined(__OSMSGQEMPTY_MSGQ3_C)
#pragma monitor OSMsgQEmpty
#elif defined(__OSSETPRIO_PRIO_C)
#pragma monitor OSSetPrio
#elif defined(__OSSCHED_SCHED_C)
#pragma monitor OSSched
#elif defined(__OSCREATESEM_SEM_C)
#pragma monitor OSCreateSem
#elif defined(__OSWAITSEM_SEM_C)
#pragma monitor OSWaitSem
#elif defined(__OSSIGNALSEM_SEM_C)
#pragma monitor OSSignalSem
#elif defined(__OSRETURNSEM_SEM2_C)
#pragma monitor OSReturnSem
#elif defined(__OSSTOP_STOP_C)
#pragma monitor OSStop
#elif defined(__OSSTARTTASK_TASK_C)
#pragma monitor OSStartTask
#elif defined(__OSSTOPTASK_TASK2_C)
#pragma monitor OSStopTask
#elif defined(__OSDESTROYTASK_TASK3_C)
#pragma monitor OSDestroyTask
#elif defined(__OSGETSTATETASK_TASK5_C)
#pragma monitor OSGetStateTask
#elif defined(__OSSETPRIOTASK_TASK6_C)
#pragma monitor OSSetPrioTask
#elif defined(__OSGETTICKS_TICK_C)
#pragma monitor OSGetTicks
#elif defined(__OSSETTICKS_TICK_C)
#pragma monitor OSSetTicks
#elif defined(__OSSAVERTNADDR_UTIL_C)
#pragma monitor OSSaveRtnAddr
#endif /* common to ICC430 and ICCAVR */
#endif /* #if ... #elif ... */
#endif /* #if OSCOMPILER */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -