femtoos_headers/femtoos_constants.h File Reference

#include "femtoos_device.h"
#include "config_application.h"
#include "femtoos_check.h"

Include dependency graph for femtoos_constants.h:

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

Go to the source code of this file.

Defines

#define cfgFalse   0x0100U
 General definition of true and false for configuration options.
#define cfgTrue   0x0101U
#define cfgUndefined   0x0108U
 Other singular constants.
#define cfgOverrideNon   0xFF01U
#define cfgShared   0x8000U
#define cfgGlobSet   0x0201U
 Definitions for the initial setting of the interrupts.
#define cfgGlobClear   0x0200U
#define cfgTickSet   0x0210U
#define cfgTickClear   0x0200U
#define cfgExclude   0x0800U
 Definitions for the initial start of a task.
#define cfgStartSuspended   0x0900U
#define cfgStartSleeping   0x0940U
#define cfgStartRunning   0x09C0U
#define cfgUseAsWait   0x0A01U
 Definitions for the different types to fill the slot with.
#define cfgUseAsMutex   0x0A02U
#define cfgUseAsQueu   0x0A03U
#define cfgUseAsNon   0x0A04U
#define cfgSyncSingleSlot   0x0C01U
 Definitions for the different utilizations of the slotstacks.
#define cfgSyncSingleBlock   0x0C02U
#define cfgSyncDoubleBlock   0x0C03U
#define cfgSyncNon   0x0C04U
#define cfgKeep   0x0102U
 Definitions for the way gcc should handle generated startup code.
#define cfgOverride   0x0103U
#define cfgReplace   0x0104U
#define cfgNaked   0x0B02U
 Definitions for the way gcc should handle pro/epiloge's.
#define cfgBikini   0x0B03U
#define cfgComplete   0x0B04U
#define cfgCapNon   0x0D00
 Definitions for capabilities Note that the timeout capability also includes a delay since the timeout is kept in the delay variables, which thus must be present.
#define cfgCapWatchdog   0x0D01
#define cfgCapEvent   0x0D02
#define cfgCapCritical   0x0D04
#define cfgCapSynchronization   0x0D08
#define cfgCapFileSystem   0x0D10
#define cfgCapDelay   0x0D20
#define cfgCapTimeout   0x0D60
#define cfgCapAll   0x0D7F
#define registersNon   0x00
 Definitions to define the use of registers (always in pairs of 4).
#define r00r01r02r03   0x01
#define r04r05r06r07   0x02
#define r08r09r10r11   0x04
#define r12r13r14r15   0x08
#define r16r17r18r19   0x10
#define r20r21r22r23   0x20
#define r24r25r26r27   0x40
#define r28r29r30r31   0x80
#define r00_upto_r07   0x03
#define r08_upto_r15   0x0C
#define r16_upto_r23   0x30
#define r24_upto_r31   0xC0
#define r00_upto_r15   0x0F
#define r16_upto_r31   0xF0
#define registersAll   0xFF
#define defSysOptimized   (cfgSysOptimized)
 This enables the control of the optimization switch from outside, if it is defined it overrides the internal setting, if it is not defined, the internal is used.
#define defSysGCCstartup   (cfgSysGCCstartup)
 This enables the control of the startup switch from outside, if it is defined it overrides the internal setting, if it is not defined, the internal is used.
#define defSysZeroPageStack   (cfgSysZeroPageStack)
 This enables the control of the zero page setting from outside, if it is defined it overrides the internal setting, if it is not defined, the internal is used.
#define _SFR_IO8(arg)   (arg)
 Determine the location of some registers for optimization and/or consistency checking.
#define _SFR_MEM8(arg)   (arg)
#define defTIMSKinIO   cfgTrue
#define defAuxSysRegLowIO   cfgTrue
#define defAuxEventRegLowIO   cfgTrue
#define _SFR_IO8(arg)   ( _MMIO_BYTE((arg) + 0x20) )
 Determine the location of some registers for optimization and/or consistency checking.
#define _SFR_MEM8(arg)   ( _MMIO_BYTE(arg) )
#define defThreeByteAddress   cfgFalse
 You may use defThreeByteStackAdd in the configuration files to distinguish between a situation where the stack is increased to or three bytes at call pc push.
#define defThreeByteStackAdd   0
#define defAddressSize   2
#define defUseBoolReturns   cfgUseTimeout
#define defTaskSaveSizeSync   0
 Because we need the sizes of the structs defined above at preprocessor level, we define defTaskSaveSize.
#define defTaskSaveSizeBase   7
#define defTaskSaveSize   (defTaskSaveSizeBase + defTaskSaveSizeSync)
#define defTaskStackMinimum   (2*defAddressSize)
 This holds the absolute minimum of bytes the task stack must contain.
#define defTaskStackGround   (defAddressSize + 1)
 The number of bytes taken by saving one (return) address and the status register.
#define defSysReduceProEpilogue
 This enables the control of the proEpilog setting from outside, if it is defined it overrides the internal setting, if it is not defined, the internal is used.
#define defSysWrapperEpilogue   __attribute__ ( ( naked , noinline) )
 The wrapper epilog is used for those methods that do a context switch before executing its actions.


Define Documentation

#define _SFR_IO8 ( arg   )     ( _MMIO_BYTE((arg) + 0x20) )

Determine the location of some registers for optimization and/or consistency checking.

Definition at line 198 of file femtoos_constants.h.

#define _SFR_IO8 ( arg   )     (arg)

Determine the location of some registers for optimization and/or consistency checking.

Definition at line 198 of file femtoos_constants.h.

#define _SFR_MEM8 ( arg   )     ( _MMIO_BYTE(arg) )

Definition at line 199 of file femtoos_constants.h.

#define _SFR_MEM8 ( arg   )     (arg)

Definition at line 199 of file femtoos_constants.h.

#define cfgBikini   0x0B03U

Definition at line 90 of file femtoos_constants.h.

#define cfgCapAll   0x0D7F

Definition at line 107 of file femtoos_constants.h.

#define cfgCapCritical   0x0D04

Definition at line 102 of file femtoos_constants.h.

Referenced by taskEnterGlobalCritical(), taskEnterSwitchCritical(), taskEnterTickCritical(), taskExitGlobalCritical(), taskExitSwitchCritical(), and taskExitTickCritical().

#define cfgCapDelay   0x0D20

Definition at line 105 of file femtoos_constants.h.

Referenced by privDelayFromNowBody(), privDelayFromWakeBody(), and privRestartBody().

#define cfgCapEvent   0x0D02

Definition at line 101 of file femtoos_constants.h.

Referenced by privWaitForEventBody().

#define cfgCapFileSystem   0x0D10

Definition at line 104 of file femtoos_constants.h.

Referenced by privFileCloseBody(), privFileOpenBody(), taskFileAppendByte(), taskFileFormat(), taskFileGetSize(), taskFileReadBuffer(), taskFileReadByte(), taskFileReadPipe(), taskFileSetSize(), taskFileWriteBuffer(), taskFileWriteByte(), and taskFileWritePipe().

#define cfgCapNon   0x0D00

Definitions for capabilities Note that the timeout capability also includes a delay since the timeout is kept in the delay variables, which thus must be present.

Definition at line 99 of file femtoos_constants.h.

#define cfgCapSynchronization   0x0D08

Definition at line 103 of file femtoos_constants.h.

#define cfgCapTimeout   0x0D60

Definition at line 106 of file femtoos_constants.h.

Referenced by privFileOpenBody(), and privWaitForEventBody().

#define cfgCapWatchdog   0x0D01

Definition at line 100 of file femtoos_constants.h.

Referenced by taskFeedWatchdog(), and taskKillWatchdog().

#define cfgComplete   0x0B04U

Definition at line 91 of file femtoos_constants.h.

#define cfgExclude   0x0800U

Definitions for the initial start of a task.

Definition at line 58 of file femtoos_constants.h.

#define cfgFalse   0x0100U

General definition of true and false for configuration options.

We do not use the standard true and false, for we cannot easily check these reliably. Undefined is used for constants that are undefined, but that must be reliably undefined, not just because we forget to set them.

Definition at line 37 of file femtoos_constants.h.

Referenced by privSwitchContext().

#define cfgGlobClear   0x0200U

Definition at line 51 of file femtoos_constants.h.

#define cfgGlobSet   0x0201U

Definitions for the initial setting of the interrupts.

Definition at line 50 of file femtoos_constants.h.

Referenced by portInitContext().

#define cfgKeep   0x0102U

Definitions for the way gcc should handle generated startup code.

Definition at line 82 of file femtoos_constants.h.

#define cfgNaked   0x0B02U

Definitions for the way gcc should handle pro/epiloge's.

Definition at line 89 of file femtoos_constants.h.

#define cfgOverride   0x0103U

Definition at line 83 of file femtoos_constants.h.

#define cfgOverrideNon   0xFF01U

Definition at line 44 of file femtoos_constants.h.

#define cfgReplace   0x0104U

Definition at line 84 of file femtoos_constants.h.

#define cfgShared   0x8000U

Definition at line 45 of file femtoos_constants.h.

#define cfgStartRunning   0x09C0U

Definition at line 61 of file femtoos_constants.h.

#define cfgStartSleeping   0x0940U

Definition at line 60 of file femtoos_constants.h.

#define cfgStartSuspended   0x0900U

Definition at line 59 of file femtoos_constants.h.

#define cfgSyncDoubleBlock   0x0C03U

Definition at line 76 of file femtoos_constants.h.

#define cfgSyncNon   0x0C04U

Definition at line 77 of file femtoos_constants.h.

Referenced by privSwitchContext().

#define cfgSyncSingleBlock   0x0C02U

Definition at line 75 of file femtoos_constants.h.

#define cfgSyncSingleSlot   0x0C01U

Definitions for the different utilizations of the slotstacks.

Definition at line 74 of file femtoos_constants.h.

#define cfgTickClear   0x0200U

Definition at line 53 of file femtoos_constants.h.

#define cfgTickSet   0x0210U

Definition at line 52 of file femtoos_constants.h.

Referenced by portInitContext().

#define cfgTrue   0x0101U

Definition at line 38 of file femtoos_constants.h.

Referenced by privMakeTasksRunable(), privPutAllTasksToSleep(), privSuspendBody(), privSwitchContext(), and privWakeupFromLowPower().

#define cfgUndefined   0x0108U

Other singular constants.

Do not alter these values without checking their exact function. They signal a special state of a user variable

Definition at line 43 of file femtoos_constants.h.

#define cfgUseAsMutex   0x0A02U

Definition at line 67 of file femtoos_constants.h.

#define cfgUseAsNon   0x0A04U

Definition at line 69 of file femtoos_constants.h.

#define cfgUseAsQueu   0x0A03U

Definition at line 68 of file femtoos_constants.h.

#define cfgUseAsWait   0x0A01U

Definitions for the different types to fill the slot with.

Definition at line 66 of file femtoos_constants.h.

#define defAddressSize   2

Definition at line 215 of file femtoos_constants.h.

#define defAuxEventRegLowIO   cfgTrue

Definition at line 191 of file femtoos_constants.h.

#define defAuxSysRegLowIO   cfgTrue

Definition at line 185 of file femtoos_constants.h.

#define defSysGCCstartup   (cfgSysGCCstartup)

This enables the control of the startup switch from outside, if it is defined it overrides the internal setting, if it is not defined, the internal is used.

Definition at line 149 of file femtoos_constants.h.

#define defSysOptimized   (cfgSysOptimized)

This enables the control of the optimization switch from outside, if it is defined it overrides the internal setting, if it is not defined, the internal is used.

Definition at line 138 of file femtoos_constants.h.

#define defSysReduceProEpilogue

This enables the control of the proEpilog setting from outside, if it is defined it overrides the internal setting, if it is not defined, the internal is used.

From GCC 4.3.2 onwards we assume you use the patched version where the OS_task attribute has been included. This replaces the need for a backend gcc hack. It does the same, leaves the frame pointer intact, but does not return or save any unused registers.

Definition at line 290 of file femtoos_constants.h.

#define defSysWrapperEpilogue   __attribute__ ( ( naked , noinline) )

The wrapper epilog is used for those methods that do a context switch before executing its actions.

These are the so-called swtiching methods.

Definition at line 299 of file femtoos_constants.h.

#define defSysZeroPageStack   (cfgSysZeroPageStack)

This enables the control of the zero page setting from outside, if it is defined it overrides the internal setting, if it is not defined, the internal is used.

Definition at line 160 of file femtoos_constants.h.

#define defTaskSaveSize   (defTaskSaveSizeBase + defTaskSaveSizeSync)

Definition at line 242 of file femtoos_constants.h.

#define defTaskSaveSizeBase   7

Definition at line 239 of file femtoos_constants.h.

#define defTaskSaveSizeSync   0

Because we need the sizes of the structs defined above at preprocessor level, we define defTaskSaveSize.

Please make sure that any changes to that struct are reflected here.

Definition at line 233 of file femtoos_constants.h.

#define defTaskStackGround   (defAddressSize + 1)

The number of bytes taken by saving one (return) address and the status register.

Definition at line 254 of file femtoos_constants.h.

#define defTaskStackMinimum   (2*defAddressSize)

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

In the present setup this number equals 4 or 6 because the stack must at least accommodate two return addresses. Although the last address is not stored in the context save, it is temporarily needed.

Definition at line 249 of file femtoos_constants.h.

#define defThreeByteAddress   cfgFalse

You may use defThreeByteStackAdd in the configuration files to distinguish between a situation where the stack is increased to or three bytes at call pc push.

For example, the required stack space may depend on it.

Definition at line 213 of file femtoos_constants.h.

#define defThreeByteStackAdd   0

Definition at line 214 of file femtoos_constants.h.

#define defTIMSKinIO   cfgTrue

Definition at line 179 of file femtoos_constants.h.

#define defUseBoolReturns   cfgUseTimeout

Definition at line 223 of file femtoos_constants.h.

#define r00_upto_r07   0x03

Definition at line 122 of file femtoos_constants.h.

#define r00_upto_r15   0x0F

Definition at line 126 of file femtoos_constants.h.

#define r00r01r02r03   0x01

Definition at line 114 of file femtoos_constants.h.

#define r04r05r06r07   0x02

Definition at line 115 of file femtoos_constants.h.

#define r08_upto_r15   0x0C

Definition at line 123 of file femtoos_constants.h.

#define r08r09r10r11   0x04

Definition at line 116 of file femtoos_constants.h.

#define r12r13r14r15   0x08

Definition at line 117 of file femtoos_constants.h.

#define r16_upto_r23   0x30

Definition at line 124 of file femtoos_constants.h.

#define r16_upto_r31   0xF0

Definition at line 127 of file femtoos_constants.h.

#define r16r17r18r19   0x10

Definition at line 118 of file femtoos_constants.h.

#define r20r21r22r23   0x20

Definition at line 119 of file femtoos_constants.h.

#define r24_upto_r31   0xC0

Definition at line 125 of file femtoos_constants.h.

#define r24r25r26r27   0x40

Definition at line 120 of file femtoos_constants.h.

#define r28r29r30r31   0x80

Definition at line 121 of file femtoos_constants.h.

#define registersAll   0xFF

Definition at line 128 of file femtoos_constants.h.

#define registersNon   0x00

Definitions to define the use of registers (always in pairs of 4).

Definition at line 113 of file femtoos_constants.h.


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