femtoos_headers/femtoos_locals.h File Reference

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define OSstackFirstByte   (1 + defThreeByteStackAdd)
#define OSstackSecondByte   (0 + defThreeByteStackAdd)
#define OSstackThirdByte   (0)
#define OSstackStart   (2 + defThreeByteStackAdd)
#define OSstackInit   (0)
#define ISRstackSPH   (0)
#define ISRstackSPL   (1)
#define ISRstackFirstByte   (3 + defThreeByteStackAdd)
#define ISRstackSecondByte   (2 + defThreeByteStackAdd)
#define ISRstackThirdByte   (1 + defThreeByteStackAdd)
#define ISRstackStart   (4 + defThreeByteStackAdd)
#define ISRstackLastByte   ((StackSizeISR)-1)
#define ISRstackInit   (0)
#define SHRstackFirstByte   (1 + defThreeByteStackAdd)
#define SHRstackSecondByte   (0 + defThreeByteStackAdd)
#define SHRstackThirdByte   (0)
#define SHRstackStart   (2 + defThreeByteStackAdd)
#define SHRstackInit   (0)
#define defConditionalInline   __attribute__ (( always_inline ))
 Using one switch it is possible to make several methods (particularly those who use a lot of stack space) inline.
#define defTickFrequency   (devClockFrequency / cfgSysClockDivider / cfgSysSubTickDivider/ cfgSysSubTicksPerFullTick )
 For sleep time calculations we need to know the tick frequency, This is found from the ClockFrequency (assume it has been correctly defined), the Prescaler value and the number of subticks per tick.
#define defSleepInfinite   0xFF
#define defSleepMaximum   0xFE
#define defSleepTickBlockTime   (32000 / (defTickFrequency/8))
#define defSleepThreshold   ((((cfgNumSleepThreshold + (defSleepTickBlockTime/2)) / 256) < defSleepInfinite) ? ((cfgNumSleepThreshold + (defSleepTickBlockTime/2)) / 256) : defSleepMaximum)
#define defSleepDivider   ( (((2*defSleepRealPeriod) / defSleepTickBlockTime)+1) / 2 )
#define defOsStackMinimum   (sizeof(TtaskSave))
 This holds the absolute minimum of bytes the OS stack must contain.
#define defSubTicksMax   0xFF
 The maximum of the subtick counter.
#define defNumberOfPriorities   8
 The maximum number of the priorities.
#define defStackClean   cfgTrue
 defStackClean is true if we want to clean or initialize the stack before use.
#define defCurrentTaskMask   0x80
#define defStackEmpty   (cfgShared & MaxStackSize_Task)
#define defBaseStopStateGetMask   0x80
#define defBaseModeGetMask   0x40
#define defBaseBlockStateGetMask   0x20
#define defBaseDelayStateGetMask   0x10
#define defBasePrioGetMask   0x0E
#define defBaseDressGetMask   0x01
#define defBaseSuspendedGetMask   0xE0
#define defBaseTerminatedGetMask   0xF0
#define defBaseSleepingGetMask   0xC0
#define defBaseRestartGetMask   0xC0
#define defBaseRunningGetMask   0xF0
#define defBaseNoBlocksGetMask   0xE0
#define defBaseSyncBlockedGetMask   0xE0
#define defBaseFileBlockedGetMask   0xE0
#define defBaseSharedGetMask   0xE0
#define defBaseRunOrSharedGetMask   0xA0
#define defBaseStopStateSetMask   (~defBaseStopStateGetMask)
#define defBaseModeSetMask   (~defBaseModeGetMask)
#define defBaseBlockStateSetMask   (~defBaseBlockStateGetMask)
#define defBaseDelayStateSetMask   (~defBaseDelayStateGetMask)
#define defBasePrioSetMask   (~defBasePrioGetMask)
#define defBaseDressSetMask   (~defBaseDressGetMask)
#define defBaseSuspendedSetMask   (~defBaseSuspendedGetMask)
#define defBaseTerminatedSetMask   (~defBaseTerminatedGetMask)
#define defBaseSleepingSetMask   (~defBaseSleepingGetMask)
#define defBaseRestartSetMask   (~defBaseRestartGetMask)
#define defBaseRunningSetMask   (~defBaseRunningGetMask)
#define defBaseNoBlocksSetMask   (~defBaseNoBlocksGetMask)
#define defBaseSyncBlockedSetMask   (~defBaseSyncBlockedGetMask)
#define defBaseFileBlockedSetMask   (~defBaseFileBlockedGetMask)
#define defBaseSharedSetMask   (~defBaseSharedGetMask)
#define defBaseStopStateGo   0x80
#define defBaseStopStateHalt   0x00
#define defBaseModeSleep   0x40
#define defBaseModeSuspend   0x00
#define defBaseModeSync   0x40
#define defBaseModeAccess   0x00
#define defBaseModeRun   0x40
#define defBaseModeShared   0x00
#define defBaseBlockStateFree   0x20
#define defBaseBlockStateBlocked   0x00
#define defBaseDelayStateWake   0x10
#define defBaseDelayStateDelayed   0x00
#define defBaseDressRunable   0x01
#define defBaseDressDone   0x00
#define defBaseDressSlot   0x01
#define defBaseDressEvent   0x00
#define defBaseDressRead   0x01
#define defBaseDressWrite   0x00
#define defBaseRunningTask   0xF0
#define defBaseNoBlocksTask   0xE0
#define defBaseSyncBlockedTask   0xC0
#define defBaseSharedTask   0xA0
#define defBaseFileBlockedTask   0x80
#define defBaseSleepingTask   0x40
#define defBaseSuspendedTask   0x20
#define defBaseTerminatedTask   0x10
#define defBasePrioShift   1
#define defInitialStartGetMask   0xC0
#define defInitialSharedGetMask   0x20
#define defInitialInterruptGetMask   0x11
#define defInitialPriorityGetMask   0x0E
#define defInitialStartSetMask   (~defInitialStartGetMask)
#define defInitialSharedSetMask   (~defInitialSharedGetMask)
#define defInitialInterruptSetMask   (~defInitialInterruptGetMask)
#define defInitialPrioritySetMask   (~defInitialPriorityGetMask)
#define defInitialInterruptAbsent   0x00
#define defInitialSharePresent   0x20
#define defInitialShareAbsent   0x00
#define defInitContextGetMask   0x20
#define defInitProcessGetMask   0x10
#define defInitSharedGetMask   0x08
#define defInitStatusCopyGetMask   0x04
#define defInitStatusPrioGetMask   0x02
#define defInitLockGetMask   0x01
#define defInitStatusStartSetMask   (~defInitStatusStartGetMask)
#define defInitStatusCopySetMask   (~defInitStatusCopyGetMask)
#define defInitContextSetMask   (~defInitContextGetMask)
#define defInitProcessSetMask   (~defInitProcessGetMask)
#define defInitStatusPrioSetMask   (~defInitStatusPrioGetMask)
#define defInitLockSetMask   (~defInitLockGetMask)
#define defInitContextRenew   0x20
#define defInitContextKeep   0x00
#define defInitProcessAll   0x10
#define defInitProcessSharedOnly   0x00
#define defInitSharedActive   0x08
#define defInitSharedPassive   0x00
#define defInitStatusCopyDo   0x04
#define defInitStatusCopyDont   0x00
#define defInitStatusPrioRenew   0x02
#define defInitStatusPrioKeep   0x00
#define defInitLockRelease   0x01
#define defInitLockKeep   0x00
#define defFsReadBlockGetMask   0x80
#define defFsWriteBlockGetMask   0x40
#define defFsSleepRequestGetMask   0x20
#define defFsBurnBlockGetMask   0x10
#define defFsWriteNumberGetMask   0x0F
#define defFsReadCountGetMask   0x0F
#define defFsFreeGetMask   (~defFsSleepRequestGetMask)
#define defFsReadBlockSetMask   (~defFsReadBlockGetMask)
#define defFsWriteBlockSetMask   (~defFsWriteBlockGetMask)
#define defFsSleepRequestSetMask   (~defFsSleepRequestGetMask)
#define defFsBurnBlockSetMask   (~defFsBurnBlockGetMask)
#define defFsWriteNumberSetMask   (~defFsWriteNumberGetMask)
#define defFsReadCountSetMask   (~defFsReadCountGetMask)
#define defFsFreeSetMask   (~defFsFreeGetMask)
#define defFsReadBlockActive   0x80
#define defFsReadBlockReleaseRequest   0x80
#define defFsWriteBlockActive   0x40
#define defFsSleepRequestActive   0x20
#define defFsBurnBlockActive   0x10
#define defFsReadBlockClear   0x00
#define defFsWriteBlockClear   0x00
#define defFsSleepRequestClear   0x00
#define defFsBurnBlockClear   0x00
#define defFsFree   0x00
#define defFsSetReleaseRequest   (defFsReadBlockReleaseRequest | defFsWriteBlockActive | defFsBurnBlockActive)
#define defFsReadInc   0x01
#define defFsField   uiTaskMonitor
#define defFsReadGetMask   0x80
#define defFsWriteGetMask   0x40
#define defFsReadSetMask   (~defFsReadGetMask)
#define defFsWriteSetMask   (~defFsWriteGetMask)
#define defFsReadActive   0x80
#define defFsReadClear   0x00
#define defFsWriteActive   0x40
#define defFsWriteClear   0x00
#define defDogField   uiTaskMonitor
#define defRetField   uiTaskMonitor
#define defSusField   uiTaskMonitor
#define defDogGetMask   0x0C
#define defRetGetMask   0x03
#define defSusGetMask   0x20
#define defRetSetMask   (~defRetGetMask)
#define defDogSetMask   (~defDogGetMask)
#define defSusSetMask   (~defSusGetMask)
#define defDogDead   0x00
#define defDogBark   0x04
#define defDogWake   0x08
#define defDogSleep   0x0C
#define defRetFalse   0x00
#define defRetTrue   0x01
#define defRetLoop   0x02
#define defRetNon   0x03
#define defSusRequest   0x20
#define defSusClear   0x00
#define defRetShift   0
#define defDogShift   2
#define defRet0   0
#define defRet1   1
#define defDogDec   0x04
#define defSuspendNowGetMask   0x01
#define defSuspendCheckGetMask   0x02
#define defSuspendClearGetMask   0x04
#define defNumGlobWidth   (cfgNumGlobWidth + cfgNumTickWidth)
#define defNumTickWidth   (0)
#define defNumSwitchWidth   (cfgNumSwitchWidth)
#define defGlobField   uiTaskLevels
#define defGlobShift   (0)
#define defGlobGetMask   (( (1 << defNumGlobWidth) - 1) << defGlobShift)
#define defGlobSetMask   (~defGlobGetMask)
#define defGlobInc   (1 << defGlobShift)
#define defGlobMax   (defGlobGetMask)
#define defGlobMin   (0x00)
#define defTickField   uiTaskLevels
#define defTickShift   (defNumGlobWidth)
#define defTickGetMask   (( (1 << defNumTickWidth) - 1) << defTickShift)
#define defTickSetMask   (~defTickGetMask)
#define defTickInc   (1 << defTickShift)
#define defTickMax   (defTickGetMask)
#define defTickMin   (0x00)
#define defSwitchField   uiTaskLevels
#define defSwitchShift   (defNumGlobWidth + defNumTickWidth)
#define defSwitchGetMask   (( (1 << defNumSwitchWidth) - 1) << defSwitchShift)
#define defSwitchSetMask   (~defSwitchGetMask)
#define defSwitchInc   (1 << defSwitchShift)
#define defSwitchMax   (defSwitchGetMask)
#define defSwitchMin   (0x00)
#define defTaskMonitorInit   ( defFsReadClear | defFsWriteClear | defSusClear | defDogDead | defRetNon )
#define defTaskLevelsInit   ( defGlobMin | defSwitchMin )
#define defInitCPUStatusRegister   (portInitCPUStatusRegister & ~((1 << portInitModeInterruptLoc) | (1 << portInitGlobalInterruptLoc) | (1 << portInitTickInterruptLoc)) )
 Define how the CPU status must be setup.
#define defQueuFillingWriteEmpty   0x00
#define defQueuFillingReadEmpty   0x00
#define defQueuFillingGetMask   0x80
#define defQueuFillingSetMask   (~defQueuFillingGetMask)
#define defQueuFillingStateFull   0x80
#define defQueuFillingStateNotFull   0x00
#define defContextGetMask   0xC0
#define defNearWakeStateGetMask   0x20
#define defShareStateGetMask   0x10
#define defTaskNumberGetMask   0x0F
#define defContextSetMask   (~defContextGetMask)
#define defNearWakeStateSetMask   (~defNearWakeStateGetMask)
#define defShareStateSetMask   (~defShareStateGetMask)
#define defTaskNumberSetMask   (~defTaskNumberGetMask)
#define defContextStateSaveBit   7
#define defContextStateSleep   0xC0
#define defContextStateIsr   0xC0
#define defContextStateIdle   0x80
#define defContextStateTask   0x40
#define defContextStateOs   0x00
#define defNearWakeStatePresent   0x20
#define defNearWakeStateAbsent   0x00
#define defShareStateRunning   0x10
#define defShareStateAbsent   0x00
#define defOsTaskNumberShift   0
#define defFsTaskNumberShift   0
#define defFsCounterShift   0
#define defAssignmentSleep   0x80
#define defAssignmentIdle   0x40
#define defAssignmentTask   0x00
#define defAssignmentWatchdog   0x10
#define defAssignmentAbsent   0x00
#define defParaLockMask   0x40
#define defParaLockStateUnlock   0x40
#define defParaLockStateKeep   0x00
#define defParaRetMask   0x30
#define defParaRetStateNon   0x30
#define defParaRetStateLoop   0x20
#define defParaRetStateTrue   0x10
#define defParaRetStateFalse   0x00
#define defParaRetToRetShift   4
#define defSlotLoopBlockMask   defBaseBlockStateGetMask
#define defSlotLoopSearchMask   defBaseDelayStateGetMask
#define defSlotLoopBlockBlocked   defBaseBlockStateBlocked
#define defSlotLoopBlockNon   defBaseBlockStateFree
#define defSlotLoopSearchActive   defBaseDelayStateWake
#define defSlotLoopSearchNon   defBaseDelayStateDelayed
#define defSlotOperateIncreaseMask   0x10
#define defSlotOperateDecreaseMask   0x20
#define defSlotOperateSQMMask   0x40
#define defSlotOperateSFreeMask   0x80
#define defSlotOperateIncreaseAction   0x10
#define defSlotOperateDecreaseAction   0x20
#define defSlotOperateNoAction   0x00
#define defSlotOperateSearchDefault   0x00
#define defSlotOperateQMAbsent   0x40
#define defSlotOperateSearchFree   0x80
#define defSlotLeftGetMask   0xF0
#define defSlotRightGetMask   0x0F
#define defSlotLeftSetMask   (~defSlotLeftGetMask)
#define defSlotRightSetMask   (~defSlotRightGetMask)
#define defSlotLeftShift   4
#define defSlotRightShift   0
#define defSlotFree   0x00
#define defSlotLeftFree   0x00
#define defSlotRightFree   0x00
#define defSlotDepthMask   0x07
#define defSlotDepthAbsent   0x00
#define defCheckStackBit   7
#define defCheckStackGetMask   0x80
#define defCheckStackStateError   0x80
#define defCheckStackStateOK   0x00
#define defActionNone   0x00
#define defActionTaskGetMask   0x01
#define defActionTickGetMask   0x02
#define defActionRunGetMask   (defContextStateTask)
#define defActionTaskStateSwitch   0x01
#define defActionTaskStateKeep   0x00
#define defActionTickStateTick   0x02
#define defActionTickStateNone   0x00
#define defActionRunStateIdle   (defContextStateTask)
#define defActionRunStateTask   0x00
#define defCheckSlotTypeError   0xF0
#define defAllEventsSet   0xFF
#define defAllEventsReset   0x00
#define errSignLeft   7
#define errSignRight   6
#define errTaskStateGetMask   0x80
#define errOsStateGetMask   0x40
#define errMessageGetMask   0x3F
#define errCallIdGetMask   0x3F
#define errTaskStateCurrent   0x80
#define errTaskStateNon   0x00
#define errTaskStateInfo   0x00
#define errOsStateForce   0x40
#define errOsStateAsIs   0x00
#define errTaskNumberGetMask   0x0F
#define errInfoNumberGetMask   0xF0
#define errSignGetMask   0xC0
#define errTaskNumberSetMask   (~errTaskNumberGetMask)
#define errInfoNumberSetMask   (~errInfoNumberGetMask)
#define errSignSetMask   (~errSignGetMask)
#define errFatalError   0x20
#define errNoInfo   0x00
#define errCurrentTask   0x00
#define errTaskNumberShift   0
#define errInfoNumberShift   4
#define errTraceErrorBase   0xC0
#define privEnableGlobalInterrupts()   portEnableGlobalInterrupts()
#define privDisableGlobalInterrupts()   portDisableGlobalInterrupts()
#define privEnableTickInterrupts()   portEnableTickInterrupts()
#define privDisableTickInterrupts()   portDisableTickInterrupts()
#define privEnterGlobalCritical()   portEnterGlobalInterrupts()
#define privExitGlobalCritical()   portExitGlobalInterrupts()
#define privEnterSysCritical()   portEnterGlobalInterrupts()
#define privExitSysCritical()   portExitGlobalInterrupts()
#define privInitStack   portSetFullStack
#define privSetStack   portSetFullStack
#define privGetStack   portGetFullStack
#define privTrace(Event)   portTrace(Event)
#define privTraceAPI(CallID)   portTrace((traceAPIcallBase | CallID))
#define privShowReset()   do { portTrace(traceReset); portShowReset(); } while(false)


Define Documentation

#define defActionNone   0x00

Definition at line 684 of file femtoos_locals.h.

#define defActionRunGetMask   (defContextStateTask)

Definition at line 687 of file femtoos_locals.h.

#define defActionRunStateIdle   (defContextStateTask)

Definition at line 692 of file femtoos_locals.h.

#define defActionRunStateTask   0x00

Definition at line 693 of file femtoos_locals.h.

#define defActionTaskGetMask   0x01

Definition at line 685 of file femtoos_locals.h.

#define defActionTaskStateKeep   0x00

Definition at line 689 of file femtoos_locals.h.

Referenced by privWaitForFsAccessBody().

#define defActionTaskStateSwitch   0x01

Definition at line 688 of file femtoos_locals.h.

Referenced by main(), privDelayFromNowBody(), privDelayFromWakeBody(), privEnterOS(), privFileCloseBody(), privFileOpenBody(), privIsrExit(), privRecreateBody(), privRestartBody(), privSleepAllBody(), privSleepBody(), privSuspendBody(), privTerminateBody(), privTickYield(), privWaitForEventBody(), and privWaitForFsAccessBody().

#define defActionTickGetMask   0x02

Definition at line 686 of file femtoos_locals.h.

#define defActionTickStateNone   0x00

Definition at line 691 of file femtoos_locals.h.

#define defActionTickStateTick   0x02

Definition at line 690 of file femtoos_locals.h.

#define defAllEventsReset   0x00

Definition at line 700 of file femtoos_locals.h.

Referenced by privEnterOS(), and privUnblockTask().

#define defAllEventsSet   0xFF

Definition at line 699 of file femtoos_locals.h.

#define defAssignmentAbsent   0x00

Definition at line 617 of file femtoos_locals.h.

#define defAssignmentIdle   0x40

Definition at line 614 of file femtoos_locals.h.

#define defAssignmentSleep   0x80

Definition at line 613 of file femtoos_locals.h.

#define defAssignmentTask   0x00

Definition at line 615 of file femtoos_locals.h.

Referenced by privSwitchContext().

#define defAssignmentWatchdog   0x10

Definition at line 616 of file femtoos_locals.h.

Referenced by privSwitchContext().

#define defBaseBlockStateBlocked   0x00

Definition at line 257 of file femtoos_locals.h.

Referenced by privWaitForEventBody(), and privWakeupFromDelay().

#define defBaseBlockStateFree   0x20

Definition at line 256 of file femtoos_locals.h.

Referenced by privTaskInit(), and privUnblockTask().

#define defBaseBlockStateGetMask   0x20

Definition at line 215 of file femtoos_locals.h.

Referenced by privWakeupFromDelay().

#define defBaseBlockStateSetMask   (~defBaseBlockStateGetMask)

Definition at line 233 of file femtoos_locals.h.

Referenced by privTaskInit(), privUnblockTask(), and privWaitForEventBody().

#define defBaseDelayStateDelayed   0x00

Definition at line 259 of file femtoos_locals.h.

Referenced by genAddtoTickCount(), genResume(), privDelayCalc(), and privSwitchContext().

#define defBaseDelayStateGetMask   0x10

Definition at line 216 of file femtoos_locals.h.

Referenced by genAddtoTickCount(), genResume(), privSwitchContext(), and privWakeupFromLowPower().

#define defBaseDelayStateSetMask   (~defBaseDelayStateGetMask)

Definition at line 234 of file femtoos_locals.h.

Referenced by privDelayCalc(), privTaskInit(), privUnblockTask(), and privWakeupFromDelay().

#define defBaseDelayStateWake   0x10

Definition at line 258 of file femtoos_locals.h.

Referenced by privTaskInit(), privUnblockTask(), privWakeupFromDelay(), and privWakeupFromLowPower().

#define defBaseDressDone   0x00

Definition at line 261 of file femtoos_locals.h.

Referenced by privSwitchContext(), privTaskInit(), privUnblockTask(), taskEnableSwitchTask(), and taskExitSwitchCritical().

#define defBaseDressEvent   0x00

Definition at line 263 of file femtoos_locals.h.

Referenced by privWaitForEventBody().

#define defBaseDressGetMask   0x01

Definition at line 218 of file femtoos_locals.h.

Referenced by privFileOpenBody(), privReleaseFileBlocks(), privRestartBody(), privSuspendBody(), privSwitchContext(), privUnblockTask(), privWaitForFsAccessBody(), and privWakeupFromDelay().

#define defBaseDressRead   0x01

Definition at line 264 of file femtoos_locals.h.

Referenced by privFileOpenBody(), and privReleaseFileBlocks().

#define defBaseDressRunable   0x01

Definition at line 260 of file femtoos_locals.h.

Referenced by privFileOpenBody(), privMakeTasksRunable(), privRestartBody(), privSuspendBody(), privSwitchContext(), privWaitForFsAccessBody(), taskDisableSwitchTask(), and taskEnterSwitchCritical().

#define defBaseDressSetMask   (~defBaseDressGetMask)

Definition at line 236 of file femtoos_locals.h.

Referenced by privFileOpenBody(), privMakeTasksRunable(), privSwitchContext(), privTaskInit(), privUnblockTask(), privWaitForEventBody(), privWaitForFsAccessBody(), taskDisableSwitchTask(), taskEnableSwitchTask(), taskEnterSwitchCritical(), and taskExitSwitchCritical().

#define defBaseDressSlot   0x01

Definition at line 262 of file femtoos_locals.h.

Referenced by privUnblockTask(), and privWakeupFromDelay().

#define defBaseDressWrite   0x00

Definition at line 265 of file femtoos_locals.h.

Referenced by privFileOpenBody(), privReleaseFileBlocks(), and privWaitForFsAccessBody().

#define defBaseFileBlockedGetMask   0xE0

Definition at line 226 of file femtoos_locals.h.

Referenced by privReleaseFileBlocks(), and privSwitchContext().

#define defBaseFileBlockedSetMask   (~defBaseFileBlockedGetMask)

Definition at line 244 of file femtoos_locals.h.

Referenced by privFileOpenBody(), and privWaitForFsAccessBody().

#define defBaseFileBlockedTask   0x80

Definition at line 271 of file femtoos_locals.h.

Referenced by privFileOpenBody(), privReleaseFileBlocks(), privSwitchContext(), and privWaitForFsAccessBody().

#define defBaseModeAccess   0x00

Definition at line 253 of file femtoos_locals.h.

Referenced by privUnblockTask(), and privWakeupFromLowPower().

#define defBaseModeGetMask   0x40

Definition at line 214 of file femtoos_locals.h.

Referenced by privSwitchContext(), privUnblockTask(), and privWakeupFromDelay().

#define defBaseModeRun   0x40

Definition at line 254 of file femtoos_locals.h.

#define defBaseModeSetMask   (~defBaseModeGetMask)

Definition at line 232 of file femtoos_locals.h.

Referenced by privTaskInit(), privUnblockTask(), privWaitForEventBody(), and privWakeupFromLowPower().

#define defBaseModeShared   0x00

Definition at line 255 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defBaseModeSleep   0x40

Definition at line 250 of file femtoos_locals.h.

#define defBaseModeSuspend   0x00

Definition at line 251 of file femtoos_locals.h.

#define defBaseModeSync   0x40

Definition at line 252 of file femtoos_locals.h.

Referenced by privSwitchContext(), privUnblockTask(), privWaitForEventBody(), and privWakeupFromDelay().

#define defBaseNoBlocksGetMask   0xE0

Definition at line 224 of file femtoos_locals.h.

Referenced by privSwitchContext().

#define defBaseNoBlocksSetMask   (~defBaseNoBlocksGetMask)

Definition at line 242 of file femtoos_locals.h.

Referenced by genResume().

#define defBaseNoBlocksTask   0xE0

Definition at line 268 of file femtoos_locals.h.

Referenced by genResume(), privMakeTasksRunable(), and privSwitchContext().

#define defBasePrioGetMask   0x0E

Definition at line 217 of file femtoos_locals.h.

Referenced by genGetPriority(), genSetPriority(), privMakeTasksRunable(), and privSwitchContext().

#define defBasePrioSetMask   (~defBasePrioGetMask)

Definition at line 235 of file femtoos_locals.h.

Referenced by genSetPriority().

#define defBasePrioShift   1

Definition at line 277 of file femtoos_locals.h.

Referenced by genGetPriority(), and genSetPriority().

#define defBaseRestartGetMask   0xC0

Definition at line 222 of file femtoos_locals.h.

Referenced by privRestartBody(), and privTaskInit().

#define defBaseRestartSetMask   (~defBaseRestartGetMask)

Definition at line 240 of file femtoos_locals.h.

Referenced by privRestartBody(), and privTaskInit().

#define defBaseRunningGetMask   0xF0

Definition at line 223 of file femtoos_locals.h.

#define defBaseRunningSetMask   (~defBaseRunningGetMask)

Definition at line 241 of file femtoos_locals.h.

#define defBaseRunningTask   0xF0

Definition at line 267 of file femtoos_locals.h.

Referenced by privIncrementTick(), privSelectTask(), and privSwitchContext().

#define defBaseRunOrSharedGetMask   0xA0

Definition at line 228 of file femtoos_locals.h.

#define defBaseSharedGetMask   0xE0

Definition at line 227 of file femtoos_locals.h.

Referenced by genSuspend(), and privSwitchContext().

#define defBaseSharedSetMask   (~defBaseSharedGetMask)

Definition at line 245 of file femtoos_locals.h.

Referenced by genResume().

#define defBaseSharedTask   0xA0

Definition at line 270 of file femtoos_locals.h.

Referenced by genResume(), genSuspend(), and privSwitchContext().

#define defBaseSleepingGetMask   0xC0

Definition at line 221 of file femtoos_locals.h.

Referenced by privWakeupFromLowPower().

#define defBaseSleepingSetMask   (~defBaseSleepingGetMask)

Definition at line 239 of file femtoos_locals.h.

Referenced by privPutAllTasksToSleep(), and privSleepBody().

#define defBaseSleepingTask   0x40

Definition at line 272 of file femtoos_locals.h.

Referenced by genSuspend(), privPutAllTasksToSleep(), privSleepBody(), privUnblockTask(), and privWakeupFromLowPower().

#define defBaseStopStateGetMask   0x80

Definition at line 213 of file femtoos_locals.h.

Referenced by privPutAllTasksToSleep(), privSwitchContext(), and privTaskInit().

#define defBaseStopStateGo   0x80

Definition at line 248 of file femtoos_locals.h.

Referenced by privPutAllTasksToSleep(), privSwitchContext(), privTaskInit(), and privWakeupFromLowPower().

#define defBaseStopStateHalt   0x00

Definition at line 249 of file femtoos_locals.h.

#define defBaseStopStateSetMask   (~defBaseStopStateGetMask)

Definition at line 231 of file femtoos_locals.h.

Referenced by privWakeupFromLowPower().

#define defBaseSuspendedGetMask   0xE0

Definition at line 219 of file femtoos_locals.h.

Referenced by genResume().

#define defBaseSuspendedSetMask   (~defBaseSuspendedGetMask)

Definition at line 237 of file femtoos_locals.h.

Referenced by genSuspend(), and privSuspendBody().

#define defBaseSuspendedTask   0x20

Definition at line 273 of file femtoos_locals.h.

Referenced by genResume(), genSuspend(), and privSuspendBody().

#define defBaseSyncBlockedGetMask   0xE0

Definition at line 225 of file femtoos_locals.h.

#define defBaseSyncBlockedSetMask   (~defBaseSyncBlockedGetMask)

Definition at line 243 of file femtoos_locals.h.

#define defBaseSyncBlockedTask   0xC0

Definition at line 269 of file femtoos_locals.h.

#define defBaseTerminatedGetMask   0xF0

Definition at line 220 of file femtoos_locals.h.

#define defBaseTerminatedSetMask   (~defBaseTerminatedGetMask)

Definition at line 238 of file femtoos_locals.h.

#define defBaseTerminatedTask   0x10

Definition at line 274 of file femtoos_locals.h.

Referenced by privTerminateBody().

#define defCheckSlotTypeError   0xF0

Definition at line 696 of file femtoos_locals.h.

#define defCheckStackBit   7

Definition at line 678 of file femtoos_locals.h.

Referenced by portRestoreContext(), and portSaveContext().

#define defCheckStackGetMask   0x80

Definition at line 679 of file femtoos_locals.h.

Referenced by privInitOs().

#define defCheckStackStateError   0x80

Definition at line 680 of file femtoos_locals.h.

Referenced by privInitOs().

#define defCheckStackStateOK   0x00

Definition at line 681 of file femtoos_locals.h.

#define defConditionalInline   __attribute__ (( always_inline ))

Using one switch it is possible to make several methods (particularly those who use a lot of stack space) inline.

Definition at line 107 of file femtoos_locals.h.

#define defContextGetMask   0xC0

Definition at line 568 of file femtoos_locals.h.

Referenced by genAddtoTickCount(), genGetLastWakeTime(), genGetPriority(), genGetTaskname(), genGetTickCount(), genLogOs(), genLogTask(), genResume(), genSetPriority(), genSuspend(), privCheckCapabilities(), and privInitOs().

#define defContextSetMask   (~defContextGetMask)

Definition at line 574 of file femtoos_locals.h.

Referenced by privEnterIdle(), privEnterOS(), and privEnterSleep().

#define defContextStateIdle   0x80

Definition at line 594 of file femtoos_locals.h.

Referenced by privEnterIdle().

#define defContextStateIsr   0xC0

Definition at line 593 of file femtoos_locals.h.

Referenced by genAddtoTickCount(), genGetLastWakeTime(), genGetPriority(), genGetTaskname(), genGetTickCount(), genLogOs(), genLogTask(), genResume(), genSetPriority(), genSuspend(), portBeginISR(), portEnterISR(), and privCheckCapabilities().

#define defContextStateOs   0x00

Definition at line 596 of file femtoos_locals.h.

Referenced by privEnterOS(), and privInitOs().

#define defContextStateSaveBit   7

Definition at line 591 of file femtoos_locals.h.

Referenced by portSaveContext().

#define defContextStateSleep   0xC0

Definition at line 592 of file femtoos_locals.h.

Referenced by privEnterSleep(), and privInitOs().

#define defContextStateTask   0x40

Definition at line 595 of file femtoos_locals.h.

Referenced by privInitOs().

#define defCurrentTaskMask   0x80

Definition at line 174 of file femtoos_locals.h.

Referenced by privTaskNumber().

#define defDogBark   0x04

Definition at line 455 of file femtoos_locals.h.

Referenced by privIncrementTick(), and privSwitchContext().

#define defDogDead   0x00

Definition at line 454 of file femtoos_locals.h.

Referenced by taskKillWatchdog().

#define defDogDec   0x04

Definition at line 476 of file femtoos_locals.h.

Referenced by privIncrementTick().

#define defDogField   uiTaskMonitor

Definition at line 426 of file femtoos_locals.h.

#define defDogGetMask   0x0C

Definition at line 435 of file femtoos_locals.h.

Referenced by privIncrementTick(), and privSwitchContext().

#define defDogSetMask   (~defDogGetMask)

Definition at line 441 of file femtoos_locals.h.

Referenced by privIncrementTick(), taskFeedWatchdog(), and taskKillWatchdog().

#define defDogShift   2

Definition at line 469 of file femtoos_locals.h.

#define defDogSleep   0x0C

Definition at line 457 of file femtoos_locals.h.

Referenced by taskFeedWatchdog().

#define defDogWake   0x08

Definition at line 456 of file femtoos_locals.h.

#define defFsBurnBlockActive   0x10

Definition at line 390 of file femtoos_locals.h.

Referenced by privWaitForFsAccessBody().

#define defFsBurnBlockClear   0x00

Definition at line 394 of file femtoos_locals.h.

Referenced by privReleaseFileBlocks().

#define defFsBurnBlockGetMask   0x10

Definition at line 373 of file femtoos_locals.h.

#define defFsBurnBlockSetMask   (~defFsBurnBlockGetMask)

Definition at line 381 of file femtoos_locals.h.

Referenced by privReleaseFileBlocks(), and privWaitForFsAccessBody().

#define defFsCounterShift   0

Definition at line 607 of file femtoos_locals.h.

#define defFsField   uiTaskMonitor

Definition at line 400 of file femtoos_locals.h.

#define defFsFree   0x00

Definition at line 395 of file femtoos_locals.h.

Referenced by privPrepareFileClose().

#define defFsFreeGetMask   (~defFsSleepRequestGetMask)

Definition at line 376 of file femtoos_locals.h.

#define defFsFreeSetMask   (~defFsFreeGetMask)

Definition at line 384 of file femtoos_locals.h.

Referenced by privPrepareFileClose().

#define defFsReadActive   0x80

Definition at line 405 of file femtoos_locals.h.

Referenced by privFileOpenBody(), and privPrepareFileClose().

#define defFsReadBlockActive   0x80

Definition at line 386 of file femtoos_locals.h.

Referenced by privFileOpenBody(), privPrepareFileClose(), and privReleaseFileBlocks().

#define defFsReadBlockClear   0x00

Definition at line 391 of file femtoos_locals.h.

Referenced by privPrepareFileClose(), and privReleaseFileBlocks().

#define defFsReadBlockGetMask   0x80

Definition at line 370 of file femtoos_locals.h.

Referenced by privPrepareFileClose(), and privReleaseFileBlocks().

#define defFsReadBlockReleaseRequest   0x80

Definition at line 387 of file femtoos_locals.h.

#define defFsReadBlockSetMask   (~defFsReadBlockGetMask)

Definition at line 378 of file femtoos_locals.h.

Referenced by privFileOpenBody(), privPrepareFileClose(), and privReleaseFileBlocks().

#define defFsReadClear   0x00

Definition at line 406 of file femtoos_locals.h.

Referenced by privCheckFileSpecsReading(), privFileCloseBody(), privFileOpenBody(), privPrepareFileClose(), privPutAllTasksToSleep(), privRestartBody(), and privUnblockTask().

#define defFsReadCountGetMask   0x0F

Definition at line 375 of file femtoos_locals.h.

Referenced by privPrepareFileClose().

#define defFsReadCountSetMask   (~defFsReadCountGetMask)

Definition at line 383 of file femtoos_locals.h.

#define defFsReadGetMask   0x80

Definition at line 401 of file femtoos_locals.h.

Referenced by privCheckFileSpecsReading(), privFileCloseBody(), privFileOpenBody(), privPrepareFileClose(), privPutAllTasksToSleep(), and privRestartBody().

#define defFsReadInc   0x01

Definition at line 398 of file femtoos_locals.h.

Referenced by privPrepareFileClose(), and privReleaseFileBlocks().

#define defFsReadSetMask   (~defFsReadGetMask)

Definition at line 403 of file femtoos_locals.h.

Referenced by privFileOpenBody(), privPrepareFileClose(), and privUnblockTask().

#define defFsSetReleaseRequest   (defFsReadBlockReleaseRequest | defFsWriteBlockActive | defFsBurnBlockActive)

Definition at line 397 of file femtoos_locals.h.

Referenced by privPrepareFileClose().

#define defFsSleepRequestActive   0x20

Definition at line 389 of file femtoos_locals.h.

Referenced by privReleaseFileBlocks(), and privSleepAllBody().

#define defFsSleepRequestClear   0x00

Definition at line 393 of file femtoos_locals.h.

Referenced by privEnterSleep().

#define defFsSleepRequestGetMask   0x20

Definition at line 372 of file femtoos_locals.h.

Referenced by privReleaseFileBlocks().

#define defFsSleepRequestSetMask   (~defFsSleepRequestGetMask)

Definition at line 380 of file femtoos_locals.h.

Referenced by privEnterSleep(), and privSleepAllBody().

#define defFsTaskNumberShift   0

Definition at line 606 of file femtoos_locals.h.

Referenced by privPrepareFileClose(), and privReleaseFileBlocks().

#define defFsWriteActive   0x40

Definition at line 407 of file femtoos_locals.h.

Referenced by privFileOpenBody(), privPrepareFileClose(), and privSleepBody().

#define defFsWriteBlockActive   0x40

Definition at line 388 of file femtoos_locals.h.

Referenced by privFileOpenBody(), privPrepareFileClose(), privReleaseFileBlocks(), and privSwitchContext().

#define defFsWriteBlockClear   0x00

Definition at line 392 of file femtoos_locals.h.

Referenced by privPutAllTasksToSleep(), and privReleaseFileBlocks().

#define defFsWriteBlockGetMask   0x40

Definition at line 371 of file femtoos_locals.h.

Referenced by privPrepareFileClose(), privPutAllTasksToSleep(), privReleaseFileBlocks(), and privSwitchContext().

#define defFsWriteBlockSetMask   (~defFsWriteBlockGetMask)

Definition at line 379 of file femtoos_locals.h.

Referenced by privFileOpenBody(), and privReleaseFileBlocks().

#define defFsWriteClear   0x00

Definition at line 408 of file femtoos_locals.h.

Referenced by privCheckFileSpecsReading(), privCheckFileSpecsWriting(), privFileCloseBody(), privFileOpenBody(), privPrepareFileClose(), privPutAllTasksToSleep(), privRestartBody(), privUnblockTask(), and taskFileFormat().

#define defFsWriteGetMask   0x40

Definition at line 402 of file femtoos_locals.h.

Referenced by privCheckFileSpecsReading(), privCheckFileSpecsWriting(), privFileCloseBody(), privFileOpenBody(), privPrepareFileClose(), privPutAllTasksToSleep(), privRestartBody(), privSleepBody(), and taskFileFormat().

#define defFsWriteNumberGetMask   0x0F

Definition at line 374 of file femtoos_locals.h.

Referenced by privPrepareFileClose().

#define defFsWriteNumberSetMask   (~defFsWriteNumberGetMask)

Definition at line 382 of file femtoos_locals.h.

Referenced by privReleaseFileBlocks().

#define defFsWriteSetMask   (~defFsWriteGetMask)

Definition at line 404 of file femtoos_locals.h.

Referenced by privFileOpenBody(), privPrepareFileClose(), and privUnblockTask().

#define defGlobField   uiTaskLevels

Definition at line 503 of file femtoos_locals.h.

#define defGlobGetMask   (( (1 << defNumGlobWidth) - 1) << defGlobShift)

Definition at line 505 of file femtoos_locals.h.

Referenced by taskEnterGlobalCritical(), and taskExitGlobalCritical().

#define defGlobInc   (1 << defGlobShift)

Definition at line 507 of file femtoos_locals.h.

Referenced by taskEnterGlobalCritical(), and taskExitGlobalCritical().

#define defGlobMax   (defGlobGetMask)

Definition at line 508 of file femtoos_locals.h.

Referenced by taskEnterGlobalCritical().

#define defGlobMin   (0x00)

Definition at line 509 of file femtoos_locals.h.

Referenced by taskExitGlobalCritical().

#define defGlobSetMask   (~defGlobGetMask)

Definition at line 506 of file femtoos_locals.h.

#define defGlobShift   (0)

Definition at line 504 of file femtoos_locals.h.

#define defInitContextGetMask   0x20

Definition at line 328 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defInitContextKeep   0x00

Definition at line 343 of file femtoos_locals.h.

Referenced by privTaskInit(), and privTerminateBody().

#define defInitContextRenew   0x20

Definition at line 342 of file femtoos_locals.h.

Referenced by main(), privRecreateBody(), privRestartBody(), privSleepBody(), privSwitchContext(), and privTaskInit().

#define defInitContextSetMask   (~defInitContextGetMask)

Definition at line 337 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defInitCPUStatusRegister   (portInitCPUStatusRegister & ~((1 << portInitModeInterruptLoc) | (1 << portInitGlobalInterruptLoc) | (1 << portInitTickInterruptLoc)) )

Define how the CPU status must be setup.

Definition at line 543 of file femtoos_locals.h.

Referenced by portInitContext().

#define defInitialInterruptAbsent   0x00

Definition at line 317 of file femtoos_locals.h.

Referenced by portInitContext().

#define defInitialInterruptGetMask   0x11

Definition at line 309 of file femtoos_locals.h.

Referenced by portInitContext().

#define defInitialInterruptSetMask   (~defInitialInterruptGetMask)

Definition at line 314 of file femtoos_locals.h.

#define defInitialPriorityGetMask   0x0E

Definition at line 310 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defInitialPrioritySetMask   (~defInitialPriorityGetMask)

Definition at line 315 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defInitialShareAbsent   0x00

Definition at line 319 of file femtoos_locals.h.

#define defInitialSharedGetMask   0x20

Definition at line 308 of file femtoos_locals.h.

#define defInitialSharedSetMask   (~defInitialSharedGetMask)

Definition at line 313 of file femtoos_locals.h.

#define defInitialSharePresent   0x20

Definition at line 318 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defInitialStartGetMask   0xC0

Definition at line 307 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defInitialStartSetMask   (~defInitialStartGetMask)

Definition at line 312 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defInitLockGetMask   0x01

Definition at line 333 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defInitLockKeep   0x00

Definition at line 353 of file femtoos_locals.h.

Referenced by main(), privRestartBody(), privSleepBody(), and privSwitchContext().

#define defInitLockRelease   0x01

Definition at line 352 of file femtoos_locals.h.

Referenced by privRecreateBody(), privSwitchContext(), privTaskInit(), and privTerminateBody().

#define defInitLockSetMask   (~defInitLockGetMask)

Definition at line 340 of file femtoos_locals.h.

#define defInitProcessAll   0x10

Definition at line 344 of file femtoos_locals.h.

Referenced by main(), privRecreateBody(), privRestartBody(), privSwitchContext(), and privTerminateBody().

#define defInitProcessGetMask   0x10

Definition at line 329 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defInitProcessSetMask   (~defInitProcessGetMask)

Definition at line 338 of file femtoos_locals.h.

#define defInitProcessSharedOnly   0x00

Definition at line 345 of file femtoos_locals.h.

Referenced by privSleepBody(), and privTaskInit().

#define defInitSharedActive   0x08

Definition at line 346 of file femtoos_locals.h.

Referenced by privSwitchContext(), and privTaskInit().

#define defInitSharedGetMask   0x08

Definition at line 330 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defInitSharedPassive   0x00

Definition at line 347 of file femtoos_locals.h.

Referenced by main(), privRecreateBody(), privRestartBody(), privSleepBody(), privSwitchContext(), and privTerminateBody().

#define defInitStatusCopyDo   0x04

Definition at line 348 of file femtoos_locals.h.

Referenced by privRestartBody(), privSleepBody(), privSwitchContext(), and privTaskInit().

#define defInitStatusCopyDont   0x00

Definition at line 349 of file femtoos_locals.h.

Referenced by main(), privRecreateBody(), privSwitchContext(), privTaskInit(), and privTerminateBody().

#define defInitStatusCopyGetMask   0x04

Definition at line 331 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defInitStatusCopySetMask   (~defInitStatusCopyGetMask)

Definition at line 336 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defInitStatusPrioGetMask   0x02

Definition at line 332 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defInitStatusPrioKeep   0x00

Definition at line 351 of file femtoos_locals.h.

Referenced by privRestartBody(), privSleepBody(), privSwitchContext(), privTaskInit(), and privTerminateBody().

#define defInitStatusPrioRenew   0x02

Definition at line 350 of file femtoos_locals.h.

Referenced by main(), privRecreateBody(), and privTaskInit().

#define defInitStatusPrioSetMask   (~defInitStatusPrioGetMask)

Definition at line 339 of file femtoos_locals.h.

#define defInitStatusStartSetMask   (~defInitStatusStartGetMask)

Definition at line 335 of file femtoos_locals.h.

#define defNearWakeStateAbsent   0x00

Definition at line 600 of file femtoos_locals.h.

#define defNearWakeStateGetMask   0x20

Definition at line 569 of file femtoos_locals.h.

#define defNearWakeStatePresent   0x20

Definition at line 599 of file femtoos_locals.h.

Referenced by privDelayCalc(), and privIncrementTick().

#define defNearWakeStateSetMask   (~defNearWakeStateGetMask)

Definition at line 575 of file femtoos_locals.h.

Referenced by privDelayCalc(), and privIncrementTick().

#define defNumberOfPriorities   8

The maximum number of the priorities.

The range is 0..7. It is stored in three bits in the task status.

Definition at line 152 of file femtoos_locals.h.

Referenced by genSetPriority().

#define defNumGlobWidth   (cfgNumGlobWidth + cfgNumTickWidth)

Definition at line 494 of file femtoos_locals.h.

Referenced by genLogTask().

#define defNumSwitchWidth   (cfgNumSwitchWidth)

Definition at line 496 of file femtoos_locals.h.

#define defNumTickWidth   (0)

Definition at line 495 of file femtoos_locals.h.

Referenced by genLogTask().

#define defOsStackMinimum   (sizeof(TtaskSave))

This holds the absolute minimum of bytes the OS stack must contain.

In the present setup this number equals the size of the background variables structure.

Definition at line 141 of file femtoos_locals.h.

Referenced by main().

#define defOsTaskNumberShift   0

Definition at line 605 of file femtoos_locals.h.

Referenced by privCheckCapabilities(), privSwitchContext(), and privTaskNumber().

#define defParaLockMask   0x40

Definition at line 622 of file femtoos_locals.h.

Referenced by privUnblockTask().

#define defParaLockStateKeep   0x00

Definition at line 624 of file femtoos_locals.h.

Referenced by privReleaseFileBlocks().

#define defParaLockStateUnlock   0x40

Definition at line 623 of file femtoos_locals.h.

Referenced by privEnterOS(), privUnblockTask(), and privWakeupFromDelay().

#define defParaRetMask   0x30

Definition at line 625 of file femtoos_locals.h.

Referenced by privUnblockTask().

#define defParaRetStateFalse   0x00

Definition at line 629 of file femtoos_locals.h.

Referenced by privWakeupFromDelay().

#define defParaRetStateLoop   0x20

Definition at line 627 of file femtoos_locals.h.

#define defParaRetStateNon   0x30

Definition at line 626 of file femtoos_locals.h.

#define defParaRetStateTrue   0x10

Definition at line 628 of file femtoos_locals.h.

Referenced by privEnterOS(), and privReleaseFileBlocks().

#define defParaRetToRetShift   4

Definition at line 630 of file femtoos_locals.h.

Referenced by privUnblockTask().

#define defQueuFillingGetMask   0x80

Definition at line 553 of file femtoos_locals.h.

#define defQueuFillingReadEmpty   0x00

Definition at line 552 of file femtoos_locals.h.

#define defQueuFillingSetMask   (~defQueuFillingGetMask)

Definition at line 554 of file femtoos_locals.h.

#define defQueuFillingStateFull   0x80

Definition at line 555 of file femtoos_locals.h.

#define defQueuFillingStateNotFull   0x00

Definition at line 556 of file femtoos_locals.h.

#define defQueuFillingWriteEmpty   0x00

Definition at line 551 of file femtoos_locals.h.

#define defRet0   0

Definition at line 472 of file femtoos_locals.h.

Referenced by portRestoreContext().

#define defRet1   1

Definition at line 473 of file femtoos_locals.h.

Referenced by portRestoreContext().

#define defRetFalse   0x00

Definition at line 458 of file femtoos_locals.h.

#define defRetField   uiTaskMonitor

Definition at line 427 of file femtoos_locals.h.

#define defRetGetMask   0x03

Definition at line 436 of file femtoos_locals.h.

#define defRetLoop   0x02

Definition at line 460 of file femtoos_locals.h.

#define defRetNon   0x03

Definition at line 461 of file femtoos_locals.h.

Referenced by privInitOs().

#define defRetSetMask   (~defRetGetMask)

Definition at line 440 of file femtoos_locals.h.

Referenced by privInitOs(), and privUnblockTask().

#define defRetShift   0

Definition at line 468 of file femtoos_locals.h.

#define defRetTrue   0x01

Definition at line 459 of file femtoos_locals.h.

#define defShareStateAbsent   0x00

Definition at line 602 of file femtoos_locals.h.

Referenced by privSwitchContext(), and privTaskInit().

#define defShareStateGetMask   0x10

Definition at line 570 of file femtoos_locals.h.

Referenced by privSwitchContext().

#define defShareStateRunning   0x10

Definition at line 601 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defShareStateSetMask   (~defShareStateGetMask)

Definition at line 576 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defSleepDivider   ( (((2*defSleepRealPeriod) / defSleepTickBlockTime)+1) / 2 )

Definition at line 135 of file femtoos_locals.h.

Referenced by portSleep().

#define defSleepInfinite   0xFF

Definition at line 131 of file femtoos_locals.h.

Referenced by portSleep().

#define defSleepMaximum   0xFE

Definition at line 132 of file femtoos_locals.h.

Referenced by privSwitchContext().

#define defSleepThreshold   ((((cfgNumSleepThreshold + (defSleepTickBlockTime/2)) / 256) < defSleepInfinite) ? ((cfgNumSleepThreshold + (defSleepTickBlockTime/2)) / 256) : defSleepMaximum)

Definition at line 134 of file femtoos_locals.h.

Referenced by privSwitchContext().

#define defSleepTickBlockTime   (32000 / (defTickFrequency/8))

Definition at line 133 of file femtoos_locals.h.

#define defSlotDepthAbsent   0x00

Definition at line 671 of file femtoos_locals.h.

#define defSlotDepthMask   0x07

Definition at line 670 of file femtoos_locals.h.

#define defSlotFree   0x00

Definition at line 665 of file femtoos_locals.h.

Referenced by privUnblockTask().

#define defSlotLeftFree   0x00

Definition at line 666 of file femtoos_locals.h.

#define defSlotLeftGetMask   0xF0

Definition at line 657 of file femtoos_locals.h.

#define defSlotLeftSetMask   (~defSlotLeftGetMask)

Definition at line 659 of file femtoos_locals.h.

#define defSlotLeftShift   4

Definition at line 661 of file femtoos_locals.h.

#define defSlotLoopBlockBlocked   defBaseBlockStateBlocked

Definition at line 639 of file femtoos_locals.h.

Referenced by privOperateSlotStack().

#define defSlotLoopBlockMask   defBaseBlockStateGetMask

Definition at line 637 of file femtoos_locals.h.

Referenced by privOperateSlotStack().

#define defSlotLoopBlockNon   defBaseBlockStateFree

Definition at line 640 of file femtoos_locals.h.

#define defSlotLoopSearchActive   defBaseDelayStateWake

Definition at line 641 of file femtoos_locals.h.

#define defSlotLoopSearchMask   defBaseDelayStateGetMask

Definition at line 638 of file femtoos_locals.h.

#define defSlotLoopSearchNon   defBaseDelayStateDelayed

Definition at line 642 of file femtoos_locals.h.

#define defSlotOperateDecreaseAction   0x20

Definition at line 650 of file femtoos_locals.h.

Referenced by privOperateSlotStack().

#define defSlotOperateDecreaseMask   0x20

Definition at line 646 of file femtoos_locals.h.

Referenced by privOperateSlotStack().

#define defSlotOperateIncreaseAction   0x10

Definition at line 649 of file femtoos_locals.h.

Referenced by privOperateSlotStack().

#define defSlotOperateIncreaseMask   0x10

Definition at line 645 of file femtoos_locals.h.

Referenced by privOperateSlotStack().

#define defSlotOperateNoAction   0x00

Definition at line 651 of file femtoos_locals.h.

#define defSlotOperateQMAbsent   0x40

Definition at line 653 of file femtoos_locals.h.

Referenced by privOperateSlotStack().

#define defSlotOperateSearchDefault   0x00

Definition at line 652 of file femtoos_locals.h.

#define defSlotOperateSearchFree   0x80

Definition at line 654 of file femtoos_locals.h.

Referenced by privOperateSlotStack().

#define defSlotOperateSFreeMask   0x80

Definition at line 648 of file femtoos_locals.h.

Referenced by privOperateSlotStack().

#define defSlotOperateSQMMask   0x40

Definition at line 647 of file femtoos_locals.h.

Referenced by privOperateSlotStack().

#define defSlotRightFree   0x00

Definition at line 667 of file femtoos_locals.h.

Referenced by privCleanSlotStack(), privOperateSlotStack(), and privUnblockTask().

#define defSlotRightGetMask   0x0F

Definition at line 658 of file femtoos_locals.h.

#define defSlotRightSetMask   (~defSlotRightGetMask)

Definition at line 660 of file femtoos_locals.h.

Referenced by privUnblockTask().

#define defSlotRightShift   0

Definition at line 662 of file femtoos_locals.h.

#define defStackClean   cfgTrue

defStackClean is true if we want to clean or initialize the stack before use.

If this indeed is the case we must consider the following: (1) Due to the section clear .bss all stacks are automatically filled by zero (2) Gcc expects r1 to be cleared at all times, and does not check it any further (3) Filling the stack up with other values (than zero) is sensible only for rigorous watermark checking, but dangerous due to the fact we must have r1 zero. Thus, make sure defStackInitByte == 0 or know what you are doing. (4) The tasks do not have startup parameters which must be taken into account. (5) If we re-initialize the stack it is not clean and so we cannot rely on .bss and must clean manually

Definition at line 168 of file femtoos_locals.h.

#define defStackEmpty   (cfgShared & MaxStackSize_Task)

Definition at line 181 of file femtoos_locals.h.

Referenced by genResume(), privTaskInit(), and privWakeupFromLowPower().

#define defSubTicksMax   0xFF

The maximum of the subtick counter.

Definition at line 146 of file femtoos_locals.h.

Referenced by privWakeupFromLowPower().

#define defSusClear   0x00

Definition at line 465 of file femtoos_locals.h.

Referenced by genResume(), and privSuspendBody().

#define defSusField   uiTaskMonitor

Definition at line 428 of file femtoos_locals.h.

#define defSusGetMask   0x20

Definition at line 437 of file femtoos_locals.h.

Referenced by privSuspendBody(), and privTaskInit().

#define defSuspendCheckGetMask   0x02

Definition at line 481 of file femtoos_locals.h.

Referenced by privSuspendBody().

#define defSuspendClearGetMask   0x04

Definition at line 482 of file femtoos_locals.h.

#define defSuspendNowGetMask   0x01

Definition at line 480 of file femtoos_locals.h.

Referenced by privSuspendBody().

#define defSusRequest   0x20

Definition at line 464 of file femtoos_locals.h.

Referenced by genSuspend(), privSuspendBody(), and privTaskInit().

#define defSusSetMask   (~defSusGetMask)

Definition at line 442 of file femtoos_locals.h.

Referenced by genResume(), genSuspend(), and privSuspendBody().

#define defSwitchField   uiTaskLevels

Definition at line 519 of file femtoos_locals.h.

#define defSwitchGetMask   (( (1 << defNumSwitchWidth) - 1) << defSwitchShift)

Definition at line 521 of file femtoos_locals.h.

Referenced by taskEnterSwitchCritical(), and taskExitSwitchCritical().

#define defSwitchInc   (1 << defSwitchShift)

Definition at line 523 of file femtoos_locals.h.

Referenced by taskEnterSwitchCritical(), and taskExitSwitchCritical().

#define defSwitchMax   (defSwitchGetMask)

Definition at line 524 of file femtoos_locals.h.

Referenced by taskEnterSwitchCritical().

#define defSwitchMin   (0x00)

Definition at line 525 of file femtoos_locals.h.

Referenced by taskExitSwitchCritical().

#define defSwitchSetMask   (~defSwitchGetMask)

Definition at line 522 of file femtoos_locals.h.

#define defSwitchShift   (defNumGlobWidth + defNumTickWidth)

Definition at line 520 of file femtoos_locals.h.

#define defTaskLevelsInit   ( defGlobMin | defSwitchMin )

Definition at line 537 of file femtoos_locals.h.

Referenced by privRestartBody(), and privTaskInit().

#define defTaskMonitorInit   ( defFsReadClear | defFsWriteClear | defSusClear | defDogDead | defRetNon )

Definition at line 531 of file femtoos_locals.h.

Referenced by privTaskInit().

#define defTaskNumberGetMask   0x0F

Definition at line 571 of file femtoos_locals.h.

Referenced by privCheckCapabilities(), privOperateSlotStack(), and privTaskNumber().

#define defTaskNumberSetMask   (~defTaskNumberGetMask)

Definition at line 577 of file femtoos_locals.h.

Referenced by privSwitchContext().

#define defTickField   uiTaskLevels

Definition at line 511 of file femtoos_locals.h.

#define defTickFrequency   (devClockFrequency / cfgSysClockDivider / cfgSysSubTickDivider/ cfgSysSubTicksPerFullTick )

For sleep time calculations we need to know the tick frequency, This is found from the ClockFrequency (assume it has been correctly defined), the Prescaler value and the number of subticks per tick.

The cfgNumSleepThreshold is given in milliseconds so we must calculate how may tickblocks that is, taking into account that it may never exceed defSleepMaximum. A sleepbit is used in the devAuxSysReg to indicate that the device was wkoken by the watchdog interrupt, and should continue its sleep.

Exact calculation of the time the Watchdog may sleep based on the requested number of tickblocks that is available for sleep is possible, but requires 16 bit division which is extremely lengthy on the AVR. Therefore we do a lot of rounding and accept less accurate results. See also the documentation on cfgUseLowPowerOnDelay. We keep it down to one 8 bit division, and if you choose your tickfrequency such that the real time of 256 ticks divide the choosen sleeptime of the watchdog, no integer division is needed, but this can be coded as a shift operation. (The compiler does that for you)

Definition at line 130 of file femtoos_locals.h.

#define defTickGetMask   (( (1 << defNumTickWidth) - 1) << defTickShift)

Definition at line 513 of file femtoos_locals.h.

Referenced by taskEnterTickCritical(), and taskExitTickCritical().

#define defTickInc   (1 << defTickShift)

Definition at line 515 of file femtoos_locals.h.

Referenced by taskEnterTickCritical(), and taskExitTickCritical().

#define defTickMax   (defTickGetMask)

Definition at line 516 of file femtoos_locals.h.

Referenced by taskEnterTickCritical().

#define defTickMin   (0x00)

Definition at line 517 of file femtoos_locals.h.

Referenced by taskExitTickCritical().

#define defTickSetMask   (~defTickGetMask)

Definition at line 514 of file femtoos_locals.h.

#define defTickShift   (defNumGlobWidth)

Definition at line 512 of file femtoos_locals.h.

#define errCallIdGetMask   0x3F

Definition at line 709 of file femtoos_locals.h.

#define errCurrentTask   0x00

Definition at line 728 of file femtoos_locals.h.

Referenced by genCountEventBlocks(), genFireEvent(), genGetLastWakeTime(), genGetPriority(), genGetTaskname(), genLogTask(), genResume(), genSetPriority(), genSuspend(), privCheckFileSpecsReading(), privCheckFileSpecsWriting(), privDelayCalc(), privDelayFromNowBody(), privDelayFromWakeBody(), privFileCloseBody(), privFileOpenBody(), privInitOs(), privRecreateBody(), privRestartBody(), privSleepBody(), privSubtickOverflow(), privSuspendBody(), privTerminateBody(), privWaitForEventBody(), taskEnterGlobalCritical(), taskEnterSwitchCritical(), taskEnterTickCritical(), taskExitGlobalCritical(), taskExitSwitchCritical(), taskExitTickCritical(), taskFileFormat(), and taskStackCheck().

#define errFatalError   0x20

Definition at line 726 of file femtoos_locals.h.

#define errInfoNumberGetMask   0xF0

Definition at line 720 of file femtoos_locals.h.

#define errInfoNumberSetMask   (~errInfoNumberGetMask)

Definition at line 723 of file femtoos_locals.h.

#define errInfoNumberShift   4

Definition at line 730 of file femtoos_locals.h.

Referenced by privCheckCapabilities(), privInitOs(), and privOperateSlotStack().

#define errMessageGetMask   0x3F

Definition at line 708 of file femtoos_locals.h.

#define errNoInfo   0x00

Definition at line 727 of file femtoos_locals.h.

Referenced by genAddtoTickCount(), genGetLastWakeTime(), genGetPriority(), genGetTaskname(), genGetTickCount(), genLogOs(), genLogTask(), genResume(), genSetPriority(), genSuspend(), isrStackCheck(), main(), and privCheckOsStackLevel().

#define errOsStateAsIs   0x00

Definition at line 715 of file femtoos_locals.h.

Referenced by privCheckCapabilities(), privDelayCalc(), privDelayFromNowBody(), privDelayFromWakeBody(), privFileCloseBody(), privFileOpenBody(), privRestartBody(), privSleepBody(), privSuspendBody(), and privWaitForEventBody().

#define errOsStateForce   0x40

Definition at line 714 of file femtoos_locals.h.

Referenced by privOperateSlotStack().

#define errOsStateGetMask   0x40

Definition at line 707 of file femtoos_locals.h.

#define errSignGetMask   0xC0

Definition at line 721 of file femtoos_locals.h.

#define errSignLeft   7

Definition at line 704 of file femtoos_locals.h.

#define errSignRight   6

Definition at line 705 of file femtoos_locals.h.

#define errSignSetMask   (~errSignGetMask)

Definition at line 724 of file femtoos_locals.h.

#define errTaskNumberGetMask   0x0F

Definition at line 719 of file femtoos_locals.h.

#define errTaskNumberSetMask   (~errTaskNumberGetMask)

Definition at line 722 of file femtoos_locals.h.

#define errTaskNumberShift   0

Definition at line 729 of file femtoos_locals.h.

Referenced by privCheckCapabilities(), and privOperateSlotStack().

#define errTaskStateCurrent   0x80

Definition at line 711 of file femtoos_locals.h.

Referenced by genCountEventBlocks(), genFireEvent(), genGetLastWakeTime(), genGetPriority(), genGetTaskname(), genLogTask(), genResume(), genSetPriority(), genSuspend(), privCheckFileSpecsReading(), privCheckFileSpecsWriting(), privDelayCalc(), privDelayFromNowBody(), privDelayFromWakeBody(), privFileCloseBody(), privFileOpenBody(), privInitOs(), privRecreateBody(), privRestartBody(), privSleepBody(), privSubtickOverflow(), privSuspendBody(), privTerminateBody(), privWaitForEventBody(), taskEnterGlobalCritical(), taskEnterSwitchCritical(), taskEnterTickCritical(), taskExitGlobalCritical(), taskExitSwitchCritical(), taskExitTickCritical(), taskFileFormat(), and taskStackCheck().

#define errTaskStateGetMask   0x80

Definition at line 706 of file femtoos_locals.h.

#define errTaskStateInfo   0x00

Definition at line 713 of file femtoos_locals.h.

Referenced by privCheckCapabilities(), and privOperateSlotStack().

#define errTaskStateNon   0x00

Definition at line 712 of file femtoos_locals.h.

Referenced by genAddtoTickCount(), genGetLastWakeTime(), genGetPriority(), genGetTaskname(), genGetTickCount(), genLogOs(), genLogTask(), genResume(), genSetPriority(), genSuspend(), isrStackCheck(), main(), and privCheckOsStackLevel().

#define errTraceErrorBase   0xC0

Definition at line 731 of file femtoos_locals.h.

#define ISRstackFirstByte   (3 + defThreeByteStackAdd)

Definition at line 69 of file femtoos_locals.h.

Referenced by portBeginISR(), and portEnterISR().

#define ISRstackInit   (0)

Definition at line 74 of file femtoos_locals.h.

#define ISRstackLastByte   ((StackSizeISR)-1)

Definition at line 73 of file femtoos_locals.h.

Referenced by portBeginISR(), portReturnISR(), and portYieldISR().

#define ISRstackSecondByte   (2 + defThreeByteStackAdd)

Definition at line 70 of file femtoos_locals.h.

Referenced by portBeginISR(), and portEnterISR().

#define ISRstackSPH   (0)

Definition at line 67 of file femtoos_locals.h.

Referenced by portBeginISR(), portReturnISR(), and portYieldISR().

#define ISRstackSPL   (1)

Definition at line 68 of file femtoos_locals.h.

Referenced by portBeginISR(), portReturnISR(), and portYieldISR().

#define ISRstackStart   (4 + defThreeByteStackAdd)

Definition at line 72 of file femtoos_locals.h.

Referenced by portBeginISR(), and portEnterISR().

#define ISRstackThirdByte   (1 + defThreeByteStackAdd)

Definition at line 71 of file femtoos_locals.h.

Referenced by portBeginISR(), and portEnterISR().

#define OSstackFirstByte   (1 + defThreeByteStackAdd)

Definition at line 46 of file femtoos_locals.h.

Referenced by portSaveContext().

#define OSstackInit   (0)

Definition at line 50 of file femtoos_locals.h.

Referenced by privEnterIdle(), privEnterSleep(), and privIsrExit().

#define OSstackSecondByte   (0 + defThreeByteStackAdd)

Definition at line 47 of file femtoos_locals.h.

Referenced by portSaveContext().

#define OSstackStart   (2 + defThreeByteStackAdd)

Definition at line 49 of file femtoos_locals.h.

Referenced by portSaveContext().

#define OSstackThirdByte   (0)

Definition at line 48 of file femtoos_locals.h.

Referenced by portSaveContext().

 
#define privDisableGlobalInterrupts (  )     portDisableGlobalInterrupts()

Definition at line 739 of file femtoos_locals.h.

Referenced by genReboot(), portReadAndResetTimer(), privEnterIdle(), privEnterOS(), privEnterSleep(), and taskEnterGlobalCritical().

 
#define privDisableTickInterrupts (  )     portDisableTickInterrupts()

Definition at line 741 of file femtoos_locals.h.

Referenced by taskEnterTickCritical().

 
#define privEnableGlobalInterrupts (  )     portEnableGlobalInterrupts()

Definition at line 738 of file femtoos_locals.h.

Referenced by portReadAndResetTimer(), privEnterIdle(), privInitOs(), and taskExitGlobalCritical().

 
#define privEnableTickInterrupts (  )     portEnableTickInterrupts()

Definition at line 740 of file femtoos_locals.h.

Referenced by taskExitTickCritical().

 
#define privEnterGlobalCritical (  )     portEnterGlobalInterrupts()

Definition at line 742 of file femtoos_locals.h.

Referenced by genCountEventBlocks(), genFireEvent(), and genFireEventSet().

 
#define privEnterSysCritical (  )     portEnterGlobalInterrupts()

Definition at line 746 of file femtoos_locals.h.

Referenced by genAddtoTickCount(), genGetLastWakeTime(), genGetPriority(), genGetTaskname(), genGetTickCount(), genLogOs(), genLogTask(), genResume(), genSetPriority(), genSuspend(), genTraceByteInfo(), genTraceMarker(), genTraceWordInfo(), taskDisableSwitchTask(), taskEnableSwitchTask(), taskEnterSwitchCritical(), taskExitSwitchCritical(), taskFeedWatchdog(), taskFileAppendByte(), taskFileFormat(), taskFileGetSize(), taskFileReadBuffer(), taskFileReadByte(), taskFileReadPipe(), taskFileSetSize(), taskFileWriteBuffer(), taskFileWriteByte(), taskFileWritePipe(), and taskKillWatchdog().

 
#define privExitGlobalCritical (  )     portExitGlobalInterrupts()

Definition at line 743 of file femtoos_locals.h.

Referenced by genFireEvent(), and genFireEventSet().

 
#define privExitSysCritical (  )     portExitGlobalInterrupts()

Definition at line 747 of file femtoos_locals.h.

Referenced by genGetLastWakeTime(), genGetPriority(), genGetTaskname(), genGetTickCount(), genLogOs(), genLogTask(), genResume(), genSetPriority(), genSuspend(), genTraceByteInfo(), genTraceMarker(), genTraceWordInfo(), taskDisableSwitchTask(), taskEnableSwitchTask(), taskEnterSwitchCritical(), taskExitSwitchCritical(), taskFeedWatchdog(), taskFileAppendByte(), taskFileFormat(), taskFileGetSize(), taskFileReadBuffer(), taskFileReadByte(), taskFileReadPipe(), taskFileSetSize(), taskFileWriteBuffer(), taskFileWriteByte(), taskFileWritePipe(), and taskKillWatchdog().

#define privGetStack   portGetFullStack

Definition at line 760 of file femtoos_locals.h.

Referenced by isrStackCheck(), privCheckOsStackLevel(), and taskStackCheck().

#define privInitStack   portSetFullStack

Definition at line 758 of file femtoos_locals.h.

#define privSetStack   portSetFullStack

Definition at line 759 of file femtoos_locals.h.

Referenced by privEnterIdle(), privEnterSleep(), and privIsrExit().

 
#define privShowReset (  )     do { portTrace(traceReset); portShowReset(); } while(false)

Definition at line 771 of file femtoos_locals.h.

Referenced by main().

#define privTrace ( Event   )     portTrace(Event)

Definition at line 769 of file femtoos_locals.h.

Referenced by genFireEvent(), genTraceByteInfo(), genTraceMarker(), genTraceWordInfo(), privCopyLoad(), privEnterIdle(), privEnterOS(), privEnterSleep(), privOperateSlotStack(), privPrepareFileClose(), privSwitchContext(), privTaskInit(), privTickYield(), privTraceWatermarks(), privUnblockTask(), and privWaitForFsAccessBody().

#define privTraceAPI ( CallID   )     portTrace((traceAPIcallBase | CallID))

Definition at line 770 of file femtoos_locals.h.

Referenced by genAddtoTickCount(), genCountEventBlocks(), genFireEventSet(), genGetLastWakeTime(), genGetPriority(), genGetTaskname(), genGetTickCount(), genLogOs(), genLogTask(), genPassFlashString(), genReboot(), genResume(), genSetPriority(), genSuspend(), privDelayFromNowBody(), privDelayFromWakeBody(), privFileCloseBody(), privFileOpenBody(), privRecreateBody(), privRestartBody(), privSleepAllBody(), privSleepBody(), privSuspendBody(), privTerminateBody(), privWaitForEventBody(), taskDisableSwitchTask(), taskEnableSwitchTask(), taskEnterGlobalCritical(), taskEnterSwitchCritical(), taskEnterTickCritical(), taskExitGlobalCritical(), taskExitSwitchCritical(), taskExitTickCritical(), taskFeedWatchdog(), taskFileAppendByte(), taskFileFormat(), taskFileGetSize(), taskFileReadBuffer(), taskFileReadByte(), taskFileReadPipe(), taskFileSetSize(), taskFileWriteBuffer(), taskFileWriteByte(), taskFileWritePipe(), and taskKillWatchdog().

#define SHRstackFirstByte   (1 + defThreeByteStackAdd)

Definition at line 88 of file femtoos_locals.h.

#define SHRstackInit   (0)

Definition at line 92 of file femtoos_locals.h.

#define SHRstackSecondByte   (0 + defThreeByteStackAdd)

Definition at line 89 of file femtoos_locals.h.

#define SHRstackStart   (2 + defThreeByteStackAdd)

Definition at line 91 of file femtoos_locals.h.

#define SHRstackThirdByte   (0)

Definition at line 90 of file femtoos_locals.h.


Generated on Fri Oct 16 00:05:29 2009 for FemtoOS by  doxygen 1.5.2