femtoos_headers/femtoos_globals.h File Reference

#include <avr/io.h>
#include <avr/pgmspace.h>
#include <string.h>

Include dependency graph for femtoos_globals.h:

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

Go to the source code of this file.

Defines

#define SystemID   "FemtoOS 0.91"
 Identification string for this OS.
#define true   1
 Our standard 'bools'.
#define false   0
#define Tchar   unsigned char
#define Tbool   Tuint08
#define Taddress   Tchar *
#define Tbyte   uint8_t
#define Tword   uint16_t
#define Tsint08   int8_t
#define Tuint08   uint8_t
#define Tsint16   int16_t
#define Tuint16   uint16_t
#define Tdouble   double
#define Tenum   uint8_t
#define defDelayTimeMax   0xFEFF
 The highest delay time you may use.
#define defDelayTimeZero   0x0000
 The lowest delay time you may use.
#define defLockBlockInfinite   0x0000
 Use in a synchronizing method to specify it may not timeout.
#define defLockDoNotBlock   0x0001
 Use in a synchronizing method to say it must return immediately.
#define defStackInitByte   0x00
 Value with which the stack is filled.
#define defCurrentTaskNumber   0x80
 Value to specify the current task.
#define defCurrentTaskName   defCurrentTaskName
 Literal value to specify the current task.
#define defFromFileStart   0x00
 Literal value to state to start at the beginning of a file.
#define defFromFileEnd   0xFF
 Literal value to state to start at the end of a file.
#define defUntilFileEnd   0xFF
 Literal value to state you want to run up to the end of a file.
#define defReadOnly   0x01
 Literal value to state to open the file system in read only mode.
#define defReadWrite   0x00
 Literal value to state to open the file system in read/write mode.
#define defAllEvents   0xFF
 Literal value to fire all events in the genFireEventSet method.
#define defRestartSuspended   0x00
 Literal value to restart a task in the suspended state.
#define defRestartSleeping   0x40
 Literal value to restart a task in the sleeping state.
#define defRestartDefault   0x80
 Literal value to restart a task in the default state.
#define defRestartShared   0x80
 At this moment this value is for internal use only.
#define defRestartRunning   0xC0
 Literal value to restart a task in the running state.
#define defSuspendNow   0x01
 Literal value to suspend a task directly.
#define defSuspendCheck   0x02
 Literal value to check for a suspend request.
#define defSuspendClear   0x04
 Literal value to reset a suspend request and continue.
#define errUnused_0x00   0x00
 Unused error.
#define errInsufficientCapabilities   0x01
 Task does not allow this operation.
#define errUnused_0x02   0x02
 Unused error.
#define errTaskStackWillOverflow   0x03
 The stack of the task will become too small during execution.
#define errTaskIllegalRegisterUse   0x04
 A register is being used which is not saved on the context.
#define errTaskTakesTooLong   0x05
 Long task, sub tick overflow may occur, leading to missed ticks.
#define errTaskNestingOverflowed   0x06
 Task cannot enter a critical section.
#define errTaskNestingUnderflowed   0x07
 Task cannot exit a critical section.
#define errTaskNestingPresent   0x08
 This call is illegal in nested critical sections.
#define errUnused_0x09   0x09
#define errTaskHoldsNoSlots   0x0A
 Task cannot make use of slot when non was configured.
#define errSlotDoubleUsed   0x0B
 Double slots cannot be used for this task.
#define errQueuOverrun   0x0C
 Writing data to a full queue was forbidden.
#define errQueuUnderrun   0x0D
 Reading data from an empty queue was forbidden.
#define errTaskPriorityTooHigh   0x0E
 Tried to set the priority to a value above 7.
#define errTaskDelayTooLong   0x0F
 Delay equals of exceeds 0xFF00 ticks.
#define errTaskDelayTooShort   0x10
 System cannot handle 'negative' delays.
#define errSlotZeroUsed   0x11
 Slot with number zero is being used, this is forbidden.
#define errSlotTypeMismatch   0x12
 Slot used outside its definition.
#define errSlotTwins   0x13
 Two identical slot numbers cannot be used for locking.
#define errIllegalDominantState   0x14
 Task may not block or restart when in dominant state.
#define errQueuWriteLimit   0x15
 Request to write more data than space available.
#define errQueuReadLimit   0x16
 Request to read more data than space available.
#define errSlotDecreaseFail   0x17
 Trying to remove a slot not present on the slot stack.
#define errSlotIncreaseFail   0x18
 Trying to put more slots on the stack than room for.
#define errFileOpenMode   0x19
 File is open when it is not expected or allowed.
#define errFileInvalidFileNumber   0x1A
 Trying operations on a file which does not exist.
#define errFileOutOfRange   0x1B
 Trying to read or write outside the file.
#define errFileClosedMode   0x1C
 File is closed when it is not expected or allowed.
#define errFileWrongMode   0x1D
 File is in the wrong mode for the requested operation.
#define errInvalidRestartMode   0x1E
 Restart may only be called with a valid mode,.
#define errInvalidSuspendMode   0x1F
 Suspend may only be called with a valid mode,.
#define fatInternalError   0x20
 Error of the OS, please report.
#define fatOsStackUnderMinimum   0x21
 The stack of the OS is under the required minimum.
#define fatOsStackOverflowed   0x22
 Overflow of the OS Stack.
#define fatIllegalEvent   0x23
 An illegal event has been fired.
#define fatTaskStackOverflowed   0x24
 The stack of the task became too small during execution.
#define fatIsrStackOverflowed   0x25
 The stack of the isr became too small during execution.
#define fatOsTickRateTooHigh   0x26
 Ticks come at to short intervals.
#define fatTaskSubtickOverflow   0x27
 The sub tick timer overflowed.
#define fatTaskIllegalTaskNumber   0x28
 A function call used a non existent task number.
#define fatUnused_0x29   0x29
#define fatIllegalCallfromISR   0x2A
 No generic functions from isr without OS interrupt protection.
#define fatUnused_0x2B   0x2B
 Unused fatal error.
#define fatUnused_0x2C   0x2C
 Unused fatal error.
#define fatUnused_0x2D   0x2D
 Unused fatal error.
#define fatUnused_0x2E   0x2E
 Unused fatal error.
#define fatUnused_0x2F   0x2F
 Unused fatal error.
#define traceNull   0x00
 General trace events.
#define traceMarker   0x01
#define traceUserByteMessage   0x02
#define traceUserWordMessage   0x03
#define traceTaskStart   0x10
#define traceOsStart   0x20
#define traceIdleStart   0x21
#define traceSleepStart   0x22
#define traceTickInterrupt   0x23
#define traceWatchdog   0x24
#define traceLockAcquire   0x25
#define traceLockReject   0x26
#define traceReset   0x27
#define traceISR   0x28
#define traceSlotLock   0x30
#define traceSlotUnlock   0x40
#define traceFireEvent   0x50
#define traceWatermarks   0x58
#define traceUnused   0x59
#define traceREGISTERLEAK_5A   0x5A
#define traceBurnLock   0x5B
#define traceBurnFree   0x5C
#define traceCreateContext   0x5D
#define traceLoadInfo   0x5E
#define traceOsTime   0x5F
#define traceTaskInit   0x60
#define traceTaskRelease   0x70
#define traceAPIcallBase   0x80
#define traceAPIcall1   0x90
#define traceAPIcall2   0xA0
#define traceAPIcall3   0xB0
#define traceAPIcall4   0xC0
#define traceErrorBase   0xD0
#define traceError1   0xE0
#define traceError2   0xF0
#define callIdSystem   0x00
 API call ID's.
#define callIdTaskYield   0x01
#define callIdTaskWaitForEvent   0x02
#define callIdTaskDelayFromNow   0x03
#define callIdTaskDelayFromWake   0x04
#define callIdTaskSuspend   0x05
#define callIdTaskSleep   0x06
#define callIdTaskSleepAll   0x07
#define callIdTaskRecreate   0x08
#define callIdTaskFeedWatchdog   0x09
#define callIdTaskKillWatchdog   0x0A
#define callIdTaskRestart   0x0B
#define callIdTaskTerminate   0x0C
#define callIdTaskEnableGlobalInterrupts   0x0D
#define callIdTaskDisableGlobalInterrupts   0x0E
#define callIdTaskEnableTickInterrupts   0x0F
#define callIdTaskDisableTickInterrupts   0x10
#define callIdTaskEnableSwitchTask   0x11
#define callIdTaskDisableSwitchTask   0x12
#define callIdTaskEnterGlobalCritical   0x13
#define callIdTaskExitGlobalCritical   0x14
#define callIdTaskEnterTickCritical   0x15
#define callIdTaskExitTickCritical   0x16
#define callIdTaskEnterSwitchCritical   0x17
#define callIdTaskExitSwitchCritical   0x18
#define callIdTaskFileOpen   0x19
#define callIdTaskFileClose   0x1A
#define callIdTaskFileFormat   0x1B
#define callIdTaskFileGetSize   0x1C
#define callIdTaskFileSetSize   0x1D
#define callIdTaskFileReadByte   0x1E
#define callIdTaskFileWriteByte   0x1F
#define callIdTaskFileAppendByte   0x20
#define callIdTaskFileReadPipe   0x21
#define callIdTaskFileWritePipe   0x22
#define callIdTaskFileReadBuffer   0x23
#define callIdTaskFileWriteBuffer   0x24
#define callIdREGISTERLEAK_A5   0x25
#define callIdTaskWaitForTasks   0x26
#define callIdTaskSyncRequest   0x27
#define callIdTaskSyncRelease   0x28
#define callIdTaskMemMalloc   0x29
#define callIdTaskMemFree   0x2A
#define callIdTaskMemDefrag   0x2B
#define callIdTaskMemPointer   0x2C
#define callIdTaskReserved1   0x2D
#define callIdTaskReserved2   0x2E
#define callIdTaskReserved3   0x2F
#define callIdTaskReserved4   0x30
#define callIdTaskReserved5   0x31
#define callIdTaskReserved6   0x32
#define callIdGenSuspend   0x33
#define callIdGenResume   0x34
#define callIdGenSetPriority   0x35
#define callIdGenGetPriority   0x36
#define callIdGenGetTickCount   0x37
#define callIdGenGetLastWakeTime   0x38
#define callIdGenGetTaskname   0x39
#define callIdGenFireEventSet   0x3A
#define callIdGenReboot   0x3B
#define callIdGenLogTask   0x3C
#define callIdGenLogOs   0x3D
#define callIdGenWaitRelease   0x3E
#define callIdGenQueuWrite   0x3F
#define callIdGenQueuRead   0x40
#define callIdGenQueuPeek   0x41
#define callIdGenQueuReadable   0x42
#define callIdGenQueuWriteable   0x43
#define callIdGenQueuFull   0x44
#define callIdGenQueuEmpty   0x45
#define callIdGenQueuClear   0x46
#define callIdGenAddtoTickCount   0x47
#define callIdGenPassFlashString   0x48
#define callIdGenCountEventBlocks   0x49
#define callIdGenReserved1   0x4A
#define callIdGenReserved2   0x4B
#define callIdGenReserved3   0x4C
#define callIdGenReserved4   0x4D
#define callIdGenReserved5   0x4E
#define callIdGenReserved6   0x4F
#define callIdTaskStackCheck   ----
 API call pseudo ID's.
#define callIdGenPipeInt16   ----
#define callIdGenTraceByteInfo   ----
#define callIdGenTraceWordInfo   ----
#define callIdGenTraceMarker   ----
#define callIdTaskMutexRequestOnName   0x27
#define callIdTaskMutexReleaseOnName   0x27
#define callIdTaskQueuWriteRequestOnName   0x27
#define callIdTaskQueuReadRequestOnName   0x27
#define callIdTaskQueuReleaseOnName   0x28
#define callIdTaskSyncReleaseOnName   0x28
#define callIdTaskSyncWriteWriteRequestOnName   0x27
#define callIdTaskSyncWriteReadRequestOnName   0x27
#define callIdTaskSyncReadWriteRequestOnName   0x27
#define callIdTaskSyncReadReadRequestOnName   0x27
#define callIdTaskWaitForOtherTask   0x26
#define callIdIsrBegin   ----
#define callIdIsrEndReturn   ----
#define callIdIsrEndYield   ----
#define callIdIsrEnter   ----
#define callIdIsrExit   ----
#define callIdIsrStackCheck   ----
#define callIdIsrStartLoad   ----
#define callIdIsrStopLoad   ----
#define callIdIsrFireEvent   ----
#define callIdGenFireEvent   ----
#define callIdTaskFileClear   0x1D
#define callIdTaskFileDirectRead   ----
#define callIdTaskFileDirectWrite   ----
#define defResponseOK   0x01
 Communication bytes.
#define defResponseUnknownCommand   0x02
#define defResponseError   0x03
#define defResponseInvalidTask   0x04
#define defResponseInvalidPriority   0x05
#define defResponseFemtoOs   0x10
#define defResponseLogTask   0x11
#define defResponseLogOs   0x12
#define defResponseTickCount   0x13
#define defResponseDump   0x14
#define defResponseUptime   0x15
#define defResponseFile   0x16
#define defResponseInvalidFileNumber   0x17
#define defRequestFemtoOs   0x90
#define defRequestProcessList   0x91
#define defRequestTickCount   0x93
#define defRequestReboot   0x94
#define defRequestSuspend   0x95
#define defRequestResume   0x96
#define defRequestTerminate   0x97
#define defRequestPriority   0x98
#define defRequestRecreate   0x99
#define defRequestDump   0x9A
#define defRequestStore   0x9B
#define defRequestRecall   0x9C
#define defRequestUptime   0x9D
#define defRequestTest   0x9E
#define defDumpRAM   0x01
#define defDumpEEPROM   0x02
#define defDumpFLASH   0x03


Define Documentation

#define callIdGenAddtoTickCount   0x47

Definition at line 948 of file femtoos_globals.h.

Referenced by genAddtoTickCount().

#define callIdGenCountEventBlocks   0x49

Definition at line 950 of file femtoos_globals.h.

Referenced by genCountEventBlocks().

#define callIdGenFireEvent   ----

Definition at line 986 of file femtoos_globals.h.

#define callIdGenFireEventSet   0x3A

Definition at line 935 of file femtoos_globals.h.

Referenced by genFireEventSet().

#define callIdGenGetLastWakeTime   0x38

Definition at line 933 of file femtoos_globals.h.

Referenced by genGetLastWakeTime().

#define callIdGenGetPriority   0x36

Definition at line 931 of file femtoos_globals.h.

Referenced by genGetPriority().

#define callIdGenGetTaskname   0x39

Definition at line 934 of file femtoos_globals.h.

Referenced by genGetTaskname().

#define callIdGenGetTickCount   0x37

Definition at line 932 of file femtoos_globals.h.

Referenced by genGetTickCount().

#define callIdGenLogOs   0x3D

Definition at line 938 of file femtoos_globals.h.

Referenced by genLogOs().

#define callIdGenLogTask   0x3C

Definition at line 937 of file femtoos_globals.h.

Referenced by genLogTask().

#define callIdGenPassFlashString   0x48

Definition at line 949 of file femtoos_globals.h.

Referenced by genPassFlashString().

#define callIdGenPipeInt16   ----

Definition at line 962 of file femtoos_globals.h.

#define callIdGenQueuClear   0x46

Definition at line 947 of file femtoos_globals.h.

#define callIdGenQueuEmpty   0x45

Definition at line 946 of file femtoos_globals.h.

#define callIdGenQueuFull   0x44

Definition at line 945 of file femtoos_globals.h.

#define callIdGenQueuPeek   0x41

Definition at line 942 of file femtoos_globals.h.

#define callIdGenQueuRead   0x40

Definition at line 941 of file femtoos_globals.h.

#define callIdGenQueuReadable   0x42

Definition at line 943 of file femtoos_globals.h.

#define callIdGenQueuWrite   0x3F

Definition at line 940 of file femtoos_globals.h.

#define callIdGenQueuWriteable   0x43

Definition at line 944 of file femtoos_globals.h.

#define callIdGenReboot   0x3B

Definition at line 936 of file femtoos_globals.h.

Referenced by genReboot().

#define callIdGenReserved1   0x4A

Definition at line 951 of file femtoos_globals.h.

#define callIdGenReserved2   0x4B

Definition at line 952 of file femtoos_globals.h.

#define callIdGenReserved3   0x4C

Definition at line 953 of file femtoos_globals.h.

#define callIdGenReserved4   0x4D

Definition at line 954 of file femtoos_globals.h.

#define callIdGenReserved5   0x4E

Definition at line 955 of file femtoos_globals.h.

#define callIdGenReserved6   0x4F

Definition at line 956 of file femtoos_globals.h.

#define callIdGenResume   0x34

Definition at line 929 of file femtoos_globals.h.

Referenced by genResume().

#define callIdGenSetPriority   0x35

Definition at line 930 of file femtoos_globals.h.

Referenced by genSetPriority().

#define callIdGenSuspend   0x33

Definition at line 928 of file femtoos_globals.h.

Referenced by genSuspend().

#define callIdGenTraceByteInfo   ----

Definition at line 963 of file femtoos_globals.h.

#define callIdGenTraceMarker   ----

Definition at line 965 of file femtoos_globals.h.

#define callIdGenTraceWordInfo   ----

Definition at line 964 of file femtoos_globals.h.

#define callIdGenWaitRelease   0x3E

Definition at line 939 of file femtoos_globals.h.

#define callIdIsrBegin   ----

Definition at line 977 of file femtoos_globals.h.

#define callIdIsrEndReturn   ----

Definition at line 978 of file femtoos_globals.h.

#define callIdIsrEndYield   ----

Definition at line 979 of file femtoos_globals.h.

#define callIdIsrEnter   ----

Definition at line 980 of file femtoos_globals.h.

#define callIdIsrExit   ----

Definition at line 981 of file femtoos_globals.h.

#define callIdIsrFireEvent   ----

Definition at line 985 of file femtoos_globals.h.

#define callIdIsrStackCheck   ----

Definition at line 982 of file femtoos_globals.h.

#define callIdIsrStartLoad   ----

Definition at line 983 of file femtoos_globals.h.

#define callIdIsrStopLoad   ----

Definition at line 984 of file femtoos_globals.h.

#define callIdREGISTERLEAK_A5   0x25

Definition at line 914 of file femtoos_globals.h.

#define callIdSystem   0x00

API call ID's.

Use these to see which method has been called.

Definition at line 877 of file femtoos_globals.h.

Referenced by genFireEvent(), isrStackCheck(), main(), privCheckOsStackLevel(), privDelayCalc(), privInitOs(), privOperateSlotStack(), privSubtickOverflow(), and taskStackCheck().

#define callIdTaskDelayFromNow   0x03

Definition at line 880 of file femtoos_globals.h.

Referenced by privDelayFromNowBody().

#define callIdTaskDelayFromWake   0x04

Definition at line 881 of file femtoos_globals.h.

Referenced by privDelayFromWakeBody().

#define callIdTaskDisableGlobalInterrupts   0x0E

Definition at line 891 of file femtoos_globals.h.

#define callIdTaskDisableSwitchTask   0x12

Definition at line 895 of file femtoos_globals.h.

Referenced by taskDisableSwitchTask().

#define callIdTaskDisableTickInterrupts   0x10

Definition at line 893 of file femtoos_globals.h.

#define callIdTaskEnableGlobalInterrupts   0x0D

Definition at line 890 of file femtoos_globals.h.

#define callIdTaskEnableSwitchTask   0x11

Definition at line 894 of file femtoos_globals.h.

Referenced by taskEnableSwitchTask().

#define callIdTaskEnableTickInterrupts   0x0F

Definition at line 892 of file femtoos_globals.h.

#define callIdTaskEnterGlobalCritical   0x13

Definition at line 896 of file femtoos_globals.h.

Referenced by taskEnterGlobalCritical().

#define callIdTaskEnterSwitchCritical   0x17

Definition at line 900 of file femtoos_globals.h.

Referenced by taskEnterSwitchCritical().

#define callIdTaskEnterTickCritical   0x15

Definition at line 898 of file femtoos_globals.h.

Referenced by taskEnterTickCritical().

#define callIdTaskExitGlobalCritical   0x14

Definition at line 897 of file femtoos_globals.h.

Referenced by taskExitGlobalCritical().

#define callIdTaskExitSwitchCritical   0x18

Definition at line 901 of file femtoos_globals.h.

Referenced by taskExitSwitchCritical().

#define callIdTaskExitTickCritical   0x16

Definition at line 899 of file femtoos_globals.h.

Referenced by taskExitTickCritical().

#define callIdTaskFeedWatchdog   0x09

Definition at line 886 of file femtoos_globals.h.

Referenced by taskFeedWatchdog().

#define callIdTaskFileAppendByte   0x20

Definition at line 909 of file femtoos_globals.h.

Referenced by taskFileAppendByte().

#define callIdTaskFileClear   0x1D

Definition at line 987 of file femtoos_globals.h.

#define callIdTaskFileClose   0x1A

Definition at line 903 of file femtoos_globals.h.

Referenced by privFileCloseBody().

#define callIdTaskFileDirectRead   ----

Definition at line 988 of file femtoos_globals.h.

#define callIdTaskFileDirectWrite   ----

Definition at line 989 of file femtoos_globals.h.

#define callIdTaskFileFormat   0x1B

Definition at line 904 of file femtoos_globals.h.

Referenced by taskFileFormat().

#define callIdTaskFileGetSize   0x1C

Definition at line 905 of file femtoos_globals.h.

Referenced by taskFileGetSize().

#define callIdTaskFileOpen   0x19

Definition at line 902 of file femtoos_globals.h.

Referenced by privFileOpenBody().

#define callIdTaskFileReadBuffer   0x23

Definition at line 912 of file femtoos_globals.h.

Referenced by taskFileReadBuffer().

#define callIdTaskFileReadByte   0x1E

Definition at line 907 of file femtoos_globals.h.

Referenced by taskFileReadByte(), and taskFileReadPipe().

#define callIdTaskFileReadPipe   0x21

Definition at line 910 of file femtoos_globals.h.

Referenced by taskFileReadPipe().

#define callIdTaskFileSetSize   0x1D

Definition at line 906 of file femtoos_globals.h.

Referenced by taskFileSetSize().

#define callIdTaskFileWriteBuffer   0x24

Definition at line 913 of file femtoos_globals.h.

Referenced by taskFileWriteBuffer().

#define callIdTaskFileWriteByte   0x1F

Definition at line 908 of file femtoos_globals.h.

Referenced by taskFileWriteByte().

#define callIdTaskFileWritePipe   0x22

Definition at line 911 of file femtoos_globals.h.

Referenced by taskFileWritePipe().

#define callIdTaskKillWatchdog   0x0A

Definition at line 887 of file femtoos_globals.h.

Referenced by taskKillWatchdog().

#define callIdTaskMemDefrag   0x2B

Definition at line 920 of file femtoos_globals.h.

#define callIdTaskMemFree   0x2A

Definition at line 919 of file femtoos_globals.h.

#define callIdTaskMemMalloc   0x29

Definition at line 918 of file femtoos_globals.h.

#define callIdTaskMemPointer   0x2C

Definition at line 921 of file femtoos_globals.h.

#define callIdTaskMutexReleaseOnName   0x27

Definition at line 967 of file femtoos_globals.h.

#define callIdTaskMutexRequestOnName   0x27

Definition at line 966 of file femtoos_globals.h.

#define callIdTaskQueuReadRequestOnName   0x27

Definition at line 969 of file femtoos_globals.h.

#define callIdTaskQueuReleaseOnName   0x28

Definition at line 970 of file femtoos_globals.h.

#define callIdTaskQueuWriteRequestOnName   0x27

Definition at line 968 of file femtoos_globals.h.

#define callIdTaskRecreate   0x08

Definition at line 885 of file femtoos_globals.h.

Referenced by privRecreateBody().

#define callIdTaskReserved1   0x2D

Definition at line 922 of file femtoos_globals.h.

#define callIdTaskReserved2   0x2E

Definition at line 923 of file femtoos_globals.h.

#define callIdTaskReserved3   0x2F

Definition at line 924 of file femtoos_globals.h.

#define callIdTaskReserved4   0x30

Definition at line 925 of file femtoos_globals.h.

#define callIdTaskReserved5   0x31

Definition at line 926 of file femtoos_globals.h.

#define callIdTaskReserved6   0x32

Definition at line 927 of file femtoos_globals.h.

#define callIdTaskRestart   0x0B

Definition at line 888 of file femtoos_globals.h.

Referenced by privRestartBody().

#define callIdTaskSleep   0x06

Definition at line 883 of file femtoos_globals.h.

Referenced by privSleepBody().

#define callIdTaskSleepAll   0x07

Definition at line 884 of file femtoos_globals.h.

Referenced by privSleepAllBody().

#define callIdTaskStackCheck   ----

API call pseudo ID's.

These are not actually used, or are 'OnName' functions

Definition at line 961 of file femtoos_globals.h.

#define callIdTaskSuspend   0x05

Definition at line 882 of file femtoos_globals.h.

Referenced by privSuspendBody().

#define callIdTaskSyncReadReadRequestOnName   0x27

Definition at line 975 of file femtoos_globals.h.

#define callIdTaskSyncReadWriteRequestOnName   0x27

Definition at line 974 of file femtoos_globals.h.

#define callIdTaskSyncRelease   0x28

Definition at line 917 of file femtoos_globals.h.

#define callIdTaskSyncReleaseOnName   0x28

Definition at line 971 of file femtoos_globals.h.

#define callIdTaskSyncRequest   0x27

Definition at line 916 of file femtoos_globals.h.

#define callIdTaskSyncWriteReadRequestOnName   0x27

Definition at line 973 of file femtoos_globals.h.

#define callIdTaskSyncWriteWriteRequestOnName   0x27

Definition at line 972 of file femtoos_globals.h.

#define callIdTaskTerminate   0x0C

Definition at line 889 of file femtoos_globals.h.

Referenced by privRecreateBody(), and privTerminateBody().

#define callIdTaskWaitForEvent   0x02

Definition at line 879 of file femtoos_globals.h.

Referenced by privWaitForEventBody().

#define callIdTaskWaitForOtherTask   0x26

Definition at line 976 of file femtoos_globals.h.

#define callIdTaskWaitForTasks   0x26

Definition at line 915 of file femtoos_globals.h.

#define callIdTaskYield   0x01

Definition at line 878 of file femtoos_globals.h.

#define defAllEvents   0xFF

Literal value to fire all events in the genFireEventSet method.

If you need to unblock all waiting tasks by firing all all events use this constant in the method genFireEventSet. It makes your intentions clear.

Definition at line 211 of file femtoos_globals.h.

#define defCurrentTaskName   defCurrentTaskName

Literal value to specify the current task.

In all (external) methods accepting the TaskName parameter you can specify defCurrentTask to indicate you want to use it for the current task, if you do not know that name (for example when code is run from different tasks). Never use it as a number in your code Please be absolutely sure you are inside a real task. If you are inside an isr, inside init or bark routines, you are not in task space and the current task may not be what you expect. However, the system cannot warn you for this situation. Thus, only to be used inside code that was called from appLoop_XXX.

Definition at line 154 of file femtoos_globals.h.

#define defCurrentTaskNumber   0x80

Value to specify the current task.

In all (external) methods accepting the uiTaskNumber parameter you can specify defCurrentTaskNumber to indicate you want to use it for the current task, if you do not know that number (for example when code is run from different tasks). Please be absolutely sure you are inside a real task. If you are inside an isr, inside init or bark routines, you are not in task space and the current task may not be what you expect. However, the system cannot warn you for this situation. Thus, only to be used inside code that was called from appLoop_XXX.

Definition at line 140 of file femtoos_globals.h.

Referenced by genGetLastWakeTime(), genGetPriority(), genGetTaskname(), genLogTask(), genResume(), genSetPriority(), genSuspend(), privCheckFileSpecsReading(), privCheckFileSpecsWriting(), privDelayCalc(), privFileCloseBody(), privFileOpenBody(), privInitOs(), privPrepareFileClose(), privRecreateBody(), privRestartBody(), privSleepBody(), privSuspendBody(), privSwitchContext(), privTaskNumber(), privTerminateBody(), privWaitForEventBody(), privWaitForFsAccessBody(), taskDisableSwitchTask(), taskEnableSwitchTask(), taskEnterGlobalCritical(), taskEnterSwitchCritical(), taskEnterTickCritical(), taskExitGlobalCritical(), taskExitSwitchCritical(), taskExitTickCritical(), taskFeedWatchdog(), taskFileFormat(), and taskKillWatchdog().

#define defDelayTimeMax   0xFEFF

The highest delay time you may use.

The highest delay time you may use. If your tick time is 1ms, and since we have a 16 bit tick counter, the maximum delay is about 65 seconds. In my opinion, this is long enough. If you want to delay tasks longer it is better to get a real time signal somewhere else.

Definition at line 89 of file femtoos_globals.h.

Referenced by appLoop_ResetTask(), privDelayFromNowBody(), privDelayFromWakeBody(), privFileOpenBody(), privRestartBody(), and privWaitForEventBody().

#define defDelayTimeZero   0x0000

The lowest delay time you may use.

The lowest delay time you may use, which in practice means no delay at all, but it is better to use this constant than 0 to make your intentions clear.

Definition at line 98 of file femtoos_globals.h.

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

#define defDumpEEPROM   0x02

Definition at line 1028 of file femtoos_globals.h.

Referenced by HandleDump().

#define defDumpFLASH   0x03

Definition at line 1029 of file femtoos_globals.h.

Referenced by HandleDump().

#define defDumpRAM   0x01

Definition at line 1027 of file femtoos_globals.h.

Referenced by HandleDump().

#define defFromFileEnd   0xFF

Literal value to state to start at the end of a file.

In most file operation calls you can specify an offset. Instead of using the real file length (which you must know or obtain), you may use this constant to start writing the new bytes at the end of the file. This constant is only available if cfgUseFileSystemMaintainFAT is activated.

Definition at line 173 of file femtoos_globals.h.

Referenced by taskFileWriteBuffer(), and taskFileWritePipe().

#define defFromFileStart   0x00

Literal value to state to start at the beginning of a file.

In most file operation calls you can specify an offset. Instead of using zero, you may always use this constant to make your intention clear that you want to start reading or writing from the file start.

Definition at line 163 of file femtoos_globals.h.

Referenced by appLoop_SupervisorTask().

#define defLockBlockInfinite   0x0000

Use in a synchronizing method to specify it may not timeout.

Value you can use to indicate that a lock need not to timeout. Use this rather than supply 0 to make your intentions clear.

Definition at line 106 of file femtoos_globals.h.

Referenced by appLoop_AutoStart(), appLoop_Reset(), HandOver(), privFileOpenBody(), and privWaitForEventBody().

#define defLockDoNotBlock   0x0001

Use in a synchronizing method to say it must return immediately.

Value you can use to indicate that a lock need timeout immediately, thus just check if you can obtain the lock, but do not wait for it. Use this rather than supply 1 to make your intentions clear.

Definition at line 115 of file femtoos_globals.h.

Referenced by HandOver().

#define defReadOnly   0x01

Literal value to state to open the file system in read only mode.

If cfgUseFileSystemConcurrentRead is activated, it is required to specify if you want to open the file system in read only mode, or in read/write mode. Although, you can just use a boolean there, you may want to use this constant to make your intentions mode explicit.

Definition at line 193 of file femtoos_globals.h.

Referenced by appLoop_SupervisorTask(), and WorkerProcess().

#define defReadWrite   0x00

Literal value to state to open the file system in read/write mode.

If cfgUseFileSystemConcurrentRead is activated, it is required to specify if you want to open the file system in read only mode, or in read/write mode. Although, you can just use a boolean there, you may want to use this constant to make your intentions mode explicit.

Definition at line 203 of file femtoos_globals.h.

Referenced by appLoop_SupervisorTask(), and WorkerProcess().

#define defRequestDump   0x9A

Definition at line 1021 of file femtoos_globals.h.

Referenced by ExecuteShell().

#define defRequestFemtoOs   0x90

Definition at line 1012 of file femtoos_globals.h.

Referenced by ExecuteShell().

#define defRequestPriority   0x98

Definition at line 1019 of file femtoos_globals.h.

Referenced by ExecuteShell().

#define defRequestProcessList   0x91

Definition at line 1013 of file femtoos_globals.h.

Referenced by ExecuteShell().

#define defRequestReboot   0x94

Definition at line 1015 of file femtoos_globals.h.

Referenced by ExecuteShell().

#define defRequestRecall   0x9C

Definition at line 1023 of file femtoos_globals.h.

Referenced by ExecuteShell().

#define defRequestRecreate   0x99

Definition at line 1020 of file femtoos_globals.h.

Referenced by ExecuteShell().

#define defRequestResume   0x96

Definition at line 1017 of file femtoos_globals.h.

Referenced by ExecuteShell().

#define defRequestStore   0x9B

Definition at line 1022 of file femtoos_globals.h.

Referenced by ExecuteShell().

#define defRequestSuspend   0x95

Definition at line 1016 of file femtoos_globals.h.

Referenced by ExecuteShell().

#define defRequestTerminate   0x97

Definition at line 1018 of file femtoos_globals.h.

Referenced by ExecuteShell().

#define defRequestTest   0x9E

Definition at line 1025 of file femtoos_globals.h.

Referenced by ExecuteShell().

#define defRequestTickCount   0x93

Definition at line 1014 of file femtoos_globals.h.

Referenced by ExecuteShell().

#define defRequestUptime   0x9D

Definition at line 1024 of file femtoos_globals.h.

Referenced by ExecuteShell().

#define defResponseDump   0x14

Definition at line 1007 of file femtoos_globals.h.

Referenced by HandleDump().

#define defResponseError   0x03

Definition at line 1000 of file femtoos_globals.h.

#define defResponseFemtoOs   0x10

Definition at line 1003 of file femtoos_globals.h.

Referenced by SendID().

#define defResponseFile   0x16

Definition at line 1009 of file femtoos_globals.h.

Referenced by HandleRecall().

#define defResponseInvalidFileNumber   0x17

Definition at line 1010 of file femtoos_globals.h.

Referenced by ExeLedLoad(), ExeLedSave(), HandleRecall(), and HandleStore().

#define defResponseInvalidPriority   0x05

Definition at line 1002 of file femtoos_globals.h.

Referenced by HandlePriority().

#define defResponseInvalidTask   0x04

Definition at line 1001 of file femtoos_globals.h.

Referenced by HandleCommand(), HandlePriority(), and HandleRecreate().

#define defResponseLogOs   0x12

Definition at line 1005 of file femtoos_globals.h.

Referenced by genLogOs().

#define defResponseLogTask   0x11

Definition at line 1004 of file femtoos_globals.h.

Referenced by genLogTask().

#define defResponseOK   0x01

Communication bytes.

Use this in for example a shell. They take less space than full strings. In you shell app on a pc you can translate them to string messages. All request/response bytes have predefined length for the associated data streams.

Definition at line 998 of file femtoos_globals.h.

Referenced by ExeLedLoad(), ExeLedSave(), HandleCommand(), HandlePriority(), HandleReboot(), HandleRecreate(), HandleStore(), and HandleTest().

#define defResponseTickCount   0x13

Definition at line 1006 of file femtoos_globals.h.

Referenced by SendTickCount().

#define defResponseUnknownCommand   0x02

Definition at line 999 of file femtoos_globals.h.

Referenced by ExecuteShell().

#define defResponseUptime   0x15

Definition at line 1008 of file femtoos_globals.h.

Referenced by SendUptime().

#define defRestartDefault   0x80

Literal value to restart a task in the default state.

Use this value as restartMode when calling taskRestart(). It puts the task in the start mode as defined in the configuration. For tasks with a shared stack, this causes the task to start in a shared state, passing execution on to to the next task with shared stack. The result thus depends on the setting being cfgStartRunning, cfgStartSuspended of cgfStartSleeping.

Definition at line 252 of file femtoos_globals.h.

Referenced by privTaskInit(), and wait().

#define defRestartRunning   0xC0

Literal value to restart a task in the running state.

Use this value as restartMode when calling taskRestart(). It restarts the task, and makes sure it starts running. This value overrides the value given in the configuration. For tasks with a shared stack, this causes the task to start in a shared state, passing execution on to to the next task with shared stack.

Definition at line 271 of file femtoos_globals.h.

Referenced by appLoop_LEDtask0(), appLoop_LEDtask1(), appLoop_LEDtask2(), appLoop_LEDtask3(), appLoop_LEDtask4(), appLoop_LEDtask5(), appLoop_LEDtask6(), appLoop_LEDtask7(), privSleepBody(), and privSwitchContext().

#define defRestartShared   0x80

At this moment this value is for internal use only.

When the restart function is called for shared tasks, the standard options are modified, into shared ones automatically. Do not use this argument when calling taskRestart()

Definition at line 260 of file femtoos_globals.h.

#define defRestartSleeping   0x40

Literal value to restart a task in the sleeping state.

Use this value as restartMode when calling taskRestart(). It puts the task to sleep. Restart only takes place after the device has slept. This value overrides the value given in the configuration. For tasks with a shared stack, this causes the task to start in a shared state, passing execution on to to the next task with shared stack. Note that the shared stack is not rescheduled any more until the device has slept. Effectively the task is temporarily taken out of the pool of tasks with shared stacks.

Definition at line 240 of file femtoos_globals.h.

#define defRestartSuspended   0x00

Literal value to restart a task in the suspended state.

Use this value as restartMode when calling taskRestart(). It restarts the task, and makes sure it starts suspended. This value overrides the value given in the configuration. For tasks with a shared stack, this causes the task to start in a shared state, passing execution on to to the next task with shared stack. Note that the shared stack is not rescheduled any more until resume is called on this stack. Effectively the task is temporarily taken out of the pool of tasks with shared stacks.

Definition at line 225 of file femtoos_globals.h.

Referenced by privTaskInit().

#define defStackInitByte   0x00

Value with which the stack is filled.

For testing purposes you can fill the stack with other values that 0x00. This may be handy to see if you are not misusing a register. For the shortest code, leave it to 0x00, so the compiler can rely upon the .bss section cleaning. For a discussion how to use this setting see also cfgSysRegisterCheckByte. Also see the discussion at defStackClean.

Definition at line 126 of file femtoos_globals.h.

Referenced by privCheckOsStackRegion(), and privTaskInit().

#define defSuspendCheck   0x02

Literal value to check for a suspend request.

Use this value in taskSuspend() to check if there is a suspend request present. If so, the task will suspend at this point, and the request will be 'consumed'.

Definition at line 290 of file femtoos_globals.h.

Referenced by appLoop_LEDtask0(), appLoop_LEDtask1(), appLoop_LEDtask2(), appLoop_LEDtask3(), and privSuspendBody().

#define defSuspendClear   0x04

Literal value to reset a suspend request and continue.

Use this value in taskSuspend() to check if there is a suspend request present. If so, the task will consume the request, but will not suspend.

Definition at line 298 of file femtoos_globals.h.

Referenced by privSuspendBody().

#define defSuspendNow   0x01

Literal value to suspend a task directly.

Use this value in taskSuspend() as suspendMode. It will suspend the task immediately. If, at the same time, there was a suspend request present, that will be reset.

Definition at line 281 of file femtoos_globals.h.

Referenced by privSuspendBody().

#define defUntilFileEnd   0xFF

Literal value to state you want to run up to the end of a file.

In most file operation calls you can specify an size. Instead of using the real file length (which you must know or obtain), you may use this constant to keep reading bytes up to the end of the file. This constant is only available if cfgUseFileSystemMaintainFAT is activated.

Definition at line 183 of file femtoos_globals.h.

Referenced by taskFileReadBuffer(), and taskFileReadPipe().

#define errFileClosedMode   0x1C

File is closed when it is not expected or allowed.

The call you made tried to close a file that is already closed, or is not allowed to be made when a file is closed. The lowest nibble of the info byte displays the task number.

Open the file prior to your call.

Definition at line 658 of file femtoos_globals.h.

Referenced by privCheckFileSpecsReading(), and privFileCloseBody().

#define errFileInvalidFileNumber   0x1A

Trying operations on a file which does not exist.

The file you tried to use does not exist as dedicated (named) file and not as default file. The lowest nibble of the info byte displays the task number.

Adjust the file number to a valid file, or increase the number of files.

Definition at line 636 of file femtoos_globals.h.

Referenced by privCheckFileSpecsReading(), and privCheckFileSpecsWriting().

#define errFileOpenMode   0x19

File is open when it is not expected or allowed.

The call you made tried to open a file that is already open, or is not allowed to be made when a file is open. The lowest nibble of the info byte displays the task number.

Close the file prior to your call.

Definition at line 624 of file femtoos_globals.h.

Referenced by privFileOpenBody(), and privRestartBody().

#define errFileOutOfRange   0x1B

Trying to read or write outside the file.

Operations for a particular file number are only allowed inside the EEPROM space reserved for that file. You tried to read or write outside the file. The lowest nibble of the info byte displays the task number.

Reduce the read/write data size.

Definition at line 647 of file femtoos_globals.h.

Referenced by privCheckFileSpecsReading(), and privCheckFileSpecsWriting().

#define errFileWrongMode   0x1D

File is in the wrong mode for the requested operation.

The call you made expected to be the file in the read mode, when is was in write, or vice versa. Or, the call is not allowed in specific circumstances, for example with a file open in write mode. The lowest nibble of the info byte displays the task number.

Bring the file in the correct mode prior to your call.

Definition at line 671 of file femtoos_globals.h.

Referenced by privCheckFileSpecsWriting(), privSleepBody(), and taskFileFormat().

#define errIllegalDominantState   0x14

Task may not block or restart when in dominant state.

Calling a method that may block, such as mutex, wait or a the opening of a file with a task that is dominant may lead to a permanent system deadlock. Therefore this is prohibited. Also, when restarting a task, it may not be dominant, for it's state cannot be retained. Also, you may not handle suspend requests in the dominant mode.

Definition at line 567 of file femtoos_globals.h.

Referenced by privFileOpenBody(), privRestartBody(), and privSuspendBody().

#define errInsufficientCapabilities   0x01

Task does not allow this operation.

Each task is defined only with a particular set of capabilities, unless you defined to have all capabilities for all tasks. You tried to perform an operation in a task which does not have sufficient capabilities to act. The lowest nibble of the info byte displays the task number. The highest nibble represents the failing capability. -- 0001 cfgCapWatchdog -- 0010 cfgCapEvent -- 0011 cfgCapCritical -- 0100 cfgCapSynchronization -- 0101 cfgCapFileSystem -- 0110 cfgCapDelay -- 0111 cfgCapTimeout

Definition at line 346 of file femtoos_globals.h.

Referenced by privCheckCapabilities().

#define errInvalidRestartMode   0x1E

Restart may only be called with a valid mode,.

Only four modes can be used to call restart. These are: defRestartRunning, defRestartSuspended, defRestartSleeping or defRestartDefault. Other values can give bizarre results.

Definition at line 681 of file femtoos_globals.h.

Referenced by privRestartBody().

#define errInvalidSuspendMode   0x1F

Suspend may only be called with a valid mode,.

Only three modes can be used to call suspend. These are: defSuspendNow, defSuspendCheck or defSuspendClear. Other values can give bizarre results.

Definition at line 691 of file femtoos_globals.h.

Referenced by privSuspendBody().

#define errQueuOverrun   0x0C

Writing data to a full queue was forbidden.

Trying to write data on an already full queue. This is not an error in strict sense, since bytes put on a full queue are simply ignored. However, you asked to be noted when this situation occurs. This error occurred inside a task (not an isr). The lowest nibble of the info byte displays the task number, this highest the slot number.

Review the logic of your code

Definition at line 474 of file femtoos_globals.h.

#define errQueuReadLimit   0x16

Request to read more data than space available.

Your are trying to read more data from a queue than the size of that queue. This call can never succeed and is therefore an error, the call would block indefinitely. The lowest nibble of the info byte displays the task number.

Reduce the size of the request.

Definition at line 591 of file femtoos_globals.h.

#define errQueuUnderrun   0x0D

Reading data from an empty queue was forbidden.

Trying to read data from an already empty queue. This is not an error in strict sense, since bytes put on a full queu are simply ignored. However, you asked to be noted when this situation occurs. This error occurred inside a task (not an isr). The lowest nibble of the info byte displays the task number, this highest the slot number.

Review the logic of your code

Definition at line 486 of file femtoos_globals.h.

#define errQueuWriteLimit   0x15

Request to write more data than space available.

Your are trying to write more data to a queue than the size of that queue. This call can never succeed and is therefore an error, the call would block indefinitely. The lowest nibble of the info byte displays the task number.

Reduce the size of the request.

Definition at line 579 of file femtoos_globals.h.

#define errSlotDecreaseFail   0x17

Trying to remove a slot not present on the slot stack.

This error may arise if you relinquish more slots than where claimed. Locking and releasing must always be balanced. The lowest nibble of the info byte displays the task number, this highest the slot number.

Review the logic of the code.

Definition at line 602 of file femtoos_globals.h.

Referenced by privOperateSlotStack().

#define errSlotDoubleUsed   0x0B

Double slots cannot be used for this task.

On waits double slots are never allowed. The same applies for mutexes and queu's if cfgSyncDoubleBlock is not activated. This generates this error. The lowest nibble of the info byte displays the task number.

Adjust the slot use to include double slots, or change the logic or your code.

Definition at line 462 of file femtoos_globals.h.

#define errSlotIncreaseFail   0x18

Trying to put more slots on the stack than room for.

The slot stack, that is, the memory where the reserved slots are kept for each task is limited and has been exceeded. The lowest nibble of the info byte displays the task number, this highest the slot number.

Increase the SlotSize_task parameter for your task.

Definition at line 613 of file femtoos_globals.h.

Referenced by privOperateSlotStack().

#define errSlotTwins   0x13

Two identical slot numbers cannot be used for locking.

Twin slots. You cannot ask a double lock on two identical slot numbers. The lowest nibble of the info byte displays the task number.

Use a single lock, or choose two different slot numbers. Cut/Paste error?

Definition at line 556 of file femtoos_globals.h.

#define errSlotTypeMismatch   0x12

Slot used outside its definition.

Slot type mismatch, a function tried to use a slot for an other purpose as it was defined. Mutexes for example cannot be used as queues. The lowest nibble of the info byte displays the task number.

Definition at line 546 of file femtoos_globals.h.

#define errSlotZeroUsed   0x11

Slot with number zero is being used, this is forbidden.

Slot with number zero is used for internal purposes and cannot be used by the application developer. The lowest nibble of the info byte displays the task number.

Use a valid slot.

Definition at line 536 of file femtoos_globals.h.

#define errTaskDelayTooLong   0x0F

Delay equals of exceeds 0xFF00 ticks.

The delay may not be any longer as 0xFEFF, directly or in internal calculation. Internally a to high delay time arose. The lowest nibble of the info byte displays the task number. This also might be the consequence of a faulty reconstruction of the tick counter after sleeping. The lowest nibble of the info byte displays the task number.

Lower the delay or timeout value you used in the call.

Definition at line 511 of file femtoos_globals.h.

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

#define errTaskDelayTooShort   0x10

System cannot handle 'negative' delays.

In a delayFromWake the task is not de-activated, because the wake time lies before the current time. This means this particular is running beyond the required reactivation moment. There was no time to put the task into a delay. Actually this is a dangerous situation, if it continues a little longer, the task may get into a very extensive delay. The lowest nibble of the info byte displays the task number.

Increase the delayFromWake time, or, reduce the execution time of the code.

Definition at line 525 of file femtoos_globals.h.

Referenced by privDelayCalc().

#define errTaskHoldsNoSlots   0x0A

Task cannot make use of slot when non was configured.

Trying to call an synchronization primitive on a task that was not configured not to hold any slots (Slotsize == 0). This is an error. Define your task to with SlotSize_task to make use of one or more slots. The lowest nibble of the info byte displays the task number.

Definition at line 451 of file femtoos_globals.h.

#define errTaskIllegalRegisterUse   0x04

A register is being used which is not saved on the context.

Registers that are not saved on the context have altered during execution of the task. This might be an incorrect error. Femto OS cannot determine with 100% certainty that a modified register is actually used, it assumes it is. If you are absolutely certain the register is not used, exclude it from the register check.

The lowest nibble of the info byte displays the task number. The highest nibble is used to report the highest register block in violation. One (or more) of the registers is offending. The numbering is like this: -- 0000: r0 r1 r2 r3 -- 0001: r4 r5 r6 r7 -- 0010: r8 r9 r10 r11 -- 0011: r12 r13 r14 r15 -- 0100: r16 r17 r18 r19 -- 0101: r20 r21 r22 r23 -- 0110: r24 r25 r26 r27 -- 0111: r28 r29 r30 r31

Add registers to the context save, or, if the register is not used in interruptible area's, exclude the register block from verification.

Definition at line 389 of file femtoos_globals.h.

Referenced by privInitOs().

#define errTaskNestingOverflowed   0x06

Task cannot enter a critical section.

Overflow of the number of nesting levels of one of the critical sections. The number is a power of two minus one depending on the number of bits reserved for the counting. Counting is per type, being one of global, switch or tick. The lowest nibble of the info byte displays the task number.

Reduce the levels of nesting, or increase the level counter.

Definition at line 414 of file femtoos_globals.h.

Referenced by taskEnterGlobalCritical(), taskEnterSwitchCritical(), and taskEnterTickCritical().

#define errTaskNestingPresent   0x08

This call is illegal in nested critical sections.

You cannot make certain calls when within nested critical sections. For example, all critical sections must have been left when calling taskRestart()

Definition at line 436 of file femtoos_globals.h.

Referenced by privRestartBody().

#define errTaskNestingUnderflowed   0x07

Task cannot exit a critical section.

Underflow of the number of nesting levels of one of the critical sections. You tried to exit a critical section while not inside one. Counting is per type, being one of global, switch or tick. The lowest nibble of the info byte displays the task number.

Review your code, there is flaw in the logic.

Definition at line 426 of file femtoos_globals.h.

Referenced by taskExitGlobalCritical(), taskExitSwitchCritical(), and taskExitTickCritical().

#define errTaskPriorityTooHigh   0x0E

Tried to set the priority to a value above 7.

There are only eight priority levels in the Femto OS. You tried to use a higher priority (this also occurs at the use of a negative priority). The lowest nibble of the info byte displays the task number.

Review the parameter of the function call.

Definition at line 497 of file femtoos_globals.h.

Referenced by genSetPriority().

#define errTaskStackWillOverflow   0x03

The stack of the task will become too small during execution.

Femto OS calculated it will not be possible to save the context on the particular moment it tried to do so. That stack probably has not yet really overflowed, but the task cannot be restarted. Other tasks should be fine. The lowest nibble of the info byte displays the task number.

Increase the tasksize.

Definition at line 363 of file femtoos_globals.h.

Referenced by privInitOs().

#define errTaskTakesTooLong   0x05

Long task, sub tick overflow may occur, leading to missed ticks.

The tick counter is driven by a sub tick counter. The sub tick counter keeps running, even if no tick can be generated. However the sub tick counter itself may not overflow for that may lead to missed ticks. The lowest nibble of the info byte displays the task number.

Reduce the time slice for that particular task, or adjust the timing of the system to a lower tick frequency.

Definition at line 402 of file femtoos_globals.h.

#define errUnused_0x00   0x00

Unused error.

Definition at line 327 of file femtoos_globals.h.

#define errUnused_0x02   0x02

Unused error.

Definition at line 351 of file femtoos_globals.h.

#define errUnused_0x09   0x09

Definition at line 441 of file femtoos_globals.h.

#define false   0

Definition at line 55 of file femtoos_globals.h.

#define fatIllegalCallfromISR   0x2A

No generic functions from isr without OS interrupt protection.

A 'genXXXX' function was used from an isr while cfgIntOsProtected was not set. This is forbidden, and may lead to rare and hard to trace weird bugs.

Remove the call, or switch on OS protection (cfgIntOsProtected).

Definition at line 807 of file femtoos_globals.h.

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

#define fatIllegalEvent   0x23

An illegal event has been fired.

You tried to fire an event that is located on the auxiliary bit of the Femto OS. Usually this is the event with the highest number. The lowest nibble of the info byte displays the task number.

Use an other event, or separate the event register from the auxiliary bit

Definition at line 734 of file femtoos_globals.h.

Referenced by genCountEventBlocks(), and genFireEvent().

#define fatInternalError   0x20

Error of the OS, please report.

This error should never occur, and signals a flaw in the OS. If possible, please report the circumstances which led to this situation.

Definition at line 701 of file femtoos_globals.h.

#define fatIsrStackOverflowed   0x25

The stack of the isr became too small during execution.

The stack of the isr was not large enough to accommodate the variables of the isr. Since the isr cannot be stopped, this error is fatal The information byte is unused.

Increase the stack of the isr.

Definition at line 757 of file femtoos_globals.h.

Referenced by isrStackCheck().

#define fatOsStackOverflowed   0x22

Overflow of the OS Stack.

During use the size of the OS stack became to small, other data may be overwritten.The information byte is unused. Note that the OS needs more stack space if checks are switched on.

Increase the StackSizeOS

Definition at line 723 of file femtoos_globals.h.

Referenced by privCheckOsStackLevel().

#define fatOsStackUnderMinimum   0x21

The stack of the OS is under the required minimum.

The stack of the OS is under the required minimum. It may not be lower as the space taken by the background variables. The information byte is unused.

Increase the StackSizeOS

Definition at line 712 of file femtoos_globals.h.

Referenced by main().

#define fatOsTickRateTooHigh   0x26

Ticks come at to short intervals.

The OS takes more then 50% of the processor time regularly. In the equidistant timing model the system is at risk of immediate timer interrupts after context switch. Note that incidental high loads should not be a problem, for instance if a watchdog barks, or at heavy interrupt load. The information byte is unused.

Reduce the tick frequency or increase the clock frequency.

Definition at line 769 of file femtoos_globals.h.

#define fatTaskIllegalTaskNumber   0x28

A function call used a non existent task number.

You may only use valid task numbers. If you make use of task names only, there is no the risk of using undefined task numbers. The lowest nibble of the info byte displays the task number (of the running task, not of the call!)

Check the calls, use task names.

Definition at line 792 of file femtoos_globals.h.

Referenced by genGetLastWakeTime(), genGetPriority(), genGetTaskname(), genLogTask(), genResume(), genSetPriority(), genSuspend(), privRecreateBody(), and privTerminateBody().

#define fatTaskStackOverflowed   0x24

The stack of the task became too small during execution.

The stack of the task was not large enough to accommodate the variables and/or the context. Since the task can not reliably be stopped, this error is fatal The lowest nibble of the info byte displays the task number.

Increase the stack size of this task.

Definition at line 746 of file femtoos_globals.h.

Referenced by taskStackCheck().

#define fatTaskSubtickOverflow   0x27

The sub tick timer overflowed.

A task is too long, or the OS took to long in the variable timing model, so that it may overflow the sub tick timer. This may lead to missed ticks. The lowest nibble of the info byte displays the task number.

Increase the time a sub tick takes, thereby lowering the tick frequency.

Definition at line 780 of file femtoos_globals.h.

Referenced by privSubtickOverflow().

#define fatUnused_0x29   0x29

Definition at line 797 of file femtoos_globals.h.

#define fatUnused_0x2B   0x2B

Unused fatal error.

Definition at line 812 of file femtoos_globals.h.

#define fatUnused_0x2C   0x2C

Unused fatal error.

Definition at line 817 of file femtoos_globals.h.

#define fatUnused_0x2D   0x2D

Unused fatal error.

Definition at line 822 of file femtoos_globals.h.

#define fatUnused_0x2E   0x2E

Unused fatal error.

Definition at line 827 of file femtoos_globals.h.

#define fatUnused_0x2F   0x2F

Unused fatal error.

Definition at line 832 of file femtoos_globals.h.

#define SystemID   "FemtoOS 0.91"

Identification string for this OS.

Make sure it has 12 bytes.

Definition at line 49 of file femtoos_globals.h.

#define Taddress   Tchar *

Definition at line 70 of file femtoos_globals.h.

Referenced by appLoop_SupervisorTask(), ExeLedLoad(), ExeLedSave(), genGetTaskname(), HandleDump(), isrStackCheck(), privCheckFileSpecsReading(), privCheckFileSpecsWriting(), privCheckOsStackLevel(), privCheckOsStackRegion(), privFileLocation(), privTaskInit(), SendID(), taskFileAppendByte(), taskFileFormat(), taskFileGetSize(), taskFileReadBuffer(), taskFileReadByte(), taskFileReadPipe(), taskFileSetSize(), taskFileWriteBuffer(), taskFileWriteByte(), taskFileWritePipe(), taskStackCheck(), and WorkerProcess().

#define Tbool   Tuint08

Definition at line 69 of file femtoos_globals.h.

Referenced by genAddtoTickCount(), genPassFlashString(), portCheckTimer(), and privOperateSlotStack().

#define Tbyte   uint8_t

Definition at line 71 of file femtoos_globals.h.

Referenced by genTraceWordInfo(), HandleDump(), privCopyLoad(), privTraceWatermarks(), readByte(), startRead(), and startWrite().

#define Tchar   unsigned char

Definition at line 68 of file femtoos_globals.h.

Referenced by appLoop_Display().

#define Tdouble   double

Definition at line 77 of file femtoos_globals.h.

#define Tenum   uint8_t

Definition at line 78 of file femtoos_globals.h.

#define traceAPIcall1   0x90

Definition at line 866 of file femtoos_globals.h.

#define traceAPIcall2   0xA0

Definition at line 867 of file femtoos_globals.h.

#define traceAPIcall3   0xB0

Definition at line 868 of file femtoos_globals.h.

#define traceAPIcall4   0xC0

Definition at line 869 of file femtoos_globals.h.

#define traceAPIcallBase   0x80

Definition at line 865 of file femtoos_globals.h.

#define traceBurnFree   0x5C

Definition at line 859 of file femtoos_globals.h.

#define traceBurnLock   0x5B

Definition at line 858 of file femtoos_globals.h.

Referenced by privPrepareFileClose(), and privWaitForFsAccessBody().

#define traceCreateContext   0x5D

Definition at line 860 of file femtoos_globals.h.

Referenced by privTaskInit().

#define traceError1   0xE0

Definition at line 871 of file femtoos_globals.h.

#define traceError2   0xF0

Definition at line 872 of file femtoos_globals.h.

#define traceErrorBase   0xD0

Definition at line 870 of file femtoos_globals.h.

#define traceFireEvent   0x50

Definition at line 854 of file femtoos_globals.h.

Referenced by genFireEvent().

#define traceIdleStart   0x21

Definition at line 844 of file femtoos_globals.h.

Referenced by privEnterIdle().

#define traceISR   0x28

Definition at line 851 of file femtoos_globals.h.

#define traceLoadInfo   0x5E

Definition at line 861 of file femtoos_globals.h.

Referenced by privCopyLoad().

#define traceLockAcquire   0x25

Definition at line 848 of file femtoos_globals.h.

#define traceLockReject   0x26

Definition at line 849 of file femtoos_globals.h.

#define traceMarker   0x01

Definition at line 839 of file femtoos_globals.h.

Referenced by genTraceMarker().

#define traceNull   0x00

General trace events.

Use these in your trace application

Definition at line 838 of file femtoos_globals.h.

#define traceOsStart   0x20

Definition at line 843 of file femtoos_globals.h.

Referenced by privEnterOS().

#define traceOsTime   0x5F

Definition at line 862 of file femtoos_globals.h.

#define traceREGISTERLEAK_5A   0x5A

Definition at line 857 of file femtoos_globals.h.

#define traceReset   0x27

Definition at line 850 of file femtoos_globals.h.

#define traceSleepStart   0x22

Definition at line 845 of file femtoos_globals.h.

Referenced by privEnterSleep().

#define traceSlotLock   0x30

Definition at line 852 of file femtoos_globals.h.

Referenced by privOperateSlotStack().

#define traceSlotUnlock   0x40

Definition at line 853 of file femtoos_globals.h.

Referenced by privOperateSlotStack(), and privUnblockTask().

#define traceTaskInit   0x60

Definition at line 863 of file femtoos_globals.h.

Referenced by privTaskInit().

#define traceTaskRelease   0x70

Definition at line 864 of file femtoos_globals.h.

Referenced by privUnblockTask().

#define traceTaskStart   0x10

Definition at line 842 of file femtoos_globals.h.

#define traceTickInterrupt   0x23

Definition at line 846 of file femtoos_globals.h.

Referenced by privTickYield().

#define traceUnused   0x59

Definition at line 856 of file femtoos_globals.h.

#define traceUserByteMessage   0x02

Definition at line 840 of file femtoos_globals.h.

Referenced by genTraceByteInfo().

#define traceUserWordMessage   0x03

Definition at line 841 of file femtoos_globals.h.

Referenced by genTraceWordInfo().

#define traceWatchdog   0x24

Definition at line 847 of file femtoos_globals.h.

Referenced by privSwitchContext().

#define traceWatermarks   0x58

Definition at line 855 of file femtoos_globals.h.

Referenced by privTraceWatermarks().

#define true   1

Our standard 'bools'.

Definition at line 54 of file femtoos_globals.h.

#define Tsint08   int8_t

Definition at line 73 of file femtoos_globals.h.

#define Tsint16   int16_t

Definition at line 75 of file femtoos_globals.h.

#define Tuint08   uint8_t

Definition at line 74 of file femtoos_globals.h.

Referenced by appBoot(), appEnterIdle(), appLoop_AutoStart(), appLoop_Display(), appLoop_LEDtask0(), appLoop_LEDtask1(), appLoop_LEDtask2(), appLoop_LEDtask3(), appLoop_LEDtask4(), appLoop_LEDtask5(), appLoop_LEDtask6(), appLoop_LEDtask7(), appLoop_ReadSwitch(), appLoop_ReadTask(), appLoop_Reset(), appLoop_ResetTask(), appLoop_Select(), appLoop_Speed(), appLoop_SupervisorTask(), appLoop_Synchronize(), appLoop_WriteTask(), devSigExternalInt(), ExecuteShell(), ExeLedCycle(), ExeLedLoad(), ExeLedSave(), ExeLedState(), genAddtoTickCount(), genCountEventBlocks(), genGetPriority(), genLogTask(), genPassFlashString(), genPipeInt16(), getSingleValue(), HandleCommand(), HandleDump(), HandlePriority(), HandleRecall(), HandleRecreate(), HandleStore(), HandOver(), LedFlash(), main(), portFSReadByte(), portInitContext(), portReadAndResetTimer(), portReadTimer(), portShowError(), portShowReset(), portSleep(), portTrace(), privCheckCapabilities(), privCheckFileSpecsReading(), privCheckFileSpecsWriting(), privCheckOsStackRegion(), privCopyLoad(), privEnterOS(), privFileLocation(), privFileSpace(), privIncrementTick(), privInitOs(), privIsrExit(), privMakeTasksRunable(), privOperateSlotStack(), privPutAllTasksToSleep(), privRegisterCount(), privReleaseFileBlocks(), privRestartBody(), privSelectTask(), privSleepBody(), privSwitchContext(), privTaskInit(), privTickYield(), privTraceWatermarks(), privWakeupFromLowPower(), readByte(), SendProcessList(), startCommunication(), taskFileAppendByte(), taskFileGetSize(), taskFileReadBuffer(), taskFileReadByte(), taskFileReadPipe(), taskFileWriteBuffer(), taskFileWritePipe(), wait(), WorkerProcess(), and writeByte().

#define Tuint16   uint16_t

Definition at line 76 of file femtoos_globals.h.

Referenced by appLoop_Display(), appLoop_SupervisorTask(), genAddtoTickCount(), genGetLastWakeTime(), genGetTickCount(), genPassFlashString(), HandleDump(), isrStackCheck(), portInitContext(), portSleep(), privCheckFileSpecsReading(), privCheckFileSpecsWriting(), privCheckOsStackLevel(), privDelayCalc(), privFileLocation(), privTaskInit(), taskFileAppendByte(), taskFileFormat(), taskFileGetSize(), taskFileReadBuffer(), taskFileReadPipe(), taskFileSetSize(), taskFileWriteBuffer(), taskFileWritePipe(), taskStackCheck(), and wait().

#define Tword   uint16_t

Definition at line 72 of file femtoos_globals.h.


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