femtoos_headers/femtoos_shared.h File Reference

#include "femtoos_types.h"

Include dependency graph for femtoos_shared.h:

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

Go to the source code of this file.

Functions

void appTick00 (void)
 Tick hook called every tick.
void appTick08 (void)
 Tick hook called every tick block (256 ticks).
void appTick16 (void)
 Tick hook called every tick rollover (65536 ticks).
void appTickSleep (void)
void appEnterIdle (void)
 This file is solely for demonstration purposes.
void appEnterSleep (void)
void appExitSleep (void)
void appBoot (void)
 Prototype for the general initialization.
const Tbyte defInfoCouplingTask (TN_00)[0]
const Tbyte defInfoCouplingTask (TN_01)[1]
const Tbyte defInfoCouplingTask (TN_02)[2]
const Tbyte defInfoCouplingTask (TN_03)[3]
const Tbyte defInfoCouplingTask (TN_04)[4]
const Tbyte defInfoCouplingTask (TN_05)[5]
const Tbyte defInfoCouplingTask (TN_06)[6]
const Tbyte defInfoCouplingTask (TN_07)[7]
const Tbyte defInfoCouplingTask (TN_08)[8]
const Tbyte defInfoCouplingTask (TN_09)[9]
const Tbyte defInfoCouplingTask (TN_10)[10]
const Tbyte defInfoCouplingTask (TN_11)[11]
const Tbyte defInfoCouplingTask (TN_12)[12]
const Tbyte defInfoCouplingTask (TN_13)[13]
const Tbyte defInfoCouplingTask (TN_14)[14]
const Tbyte defInfoCouplingTask (TN_15)[15]
const Tbyte defInfoCouplingSlot (LN_01)[1]
const Tbyte defInfoCouplingSlot (LN_02)[2]
const Tbyte defInfoCouplingSlot (LN_03)[3]
const Tbyte defInfoCouplingSlot (LN_04)[4]
const Tbyte defInfoCouplingSlot (LN_05)[5]
const Tbyte defInfoCouplingSlot (LN_06)[6]
const Tbyte defInfoCouplingSlot (LN_07)[7]
const Tbyte defInfoCouplingSlot (LN_08)[8]
const Tbyte defInfoCouplingSlot (LN_09)[9]
const Tbyte defInfoCouplingSlot (LN_10)[10]
const Tbyte defInfoCouplingSlot (LN_11)[11]
const Tbyte defInfoCouplingSlot (LN_12)[12]
const Tbyte defInfoCouplingSlot (LN_13)[13]
const Tbyte defInfoCouplingSlot (LN_14)[14]
const Tbyte defInfoCouplingSlot (LN_15)[15]
const Tbyte defInfoCouplingFile (VN_00)[0]
const Tbyte defInfoCouplingFile (VN_01)[1]
const Tbyte defInfoCouplingFile (VN_02)[2]
const Tbyte defInfoCouplingFile (VN_03)[3]
const Tbyte defInfoCouplingFile (VN_04)[4]
const Tbyte defInfoCouplingFile (VN_05)[5]
const Tbyte defInfoCouplingFile (VN_06)[6]
const Tbyte defInfoCouplingFile (VN_07)[7]
const Tbyte defInfoCouplingFile (VN_08)[8]
const Tbyte defInfoCouplingFile (VN_09)[9]
const Tbyte defInfoCouplingFile (VN_10)[10]
const Tbyte defInfoCouplingFile (VN_11)[11]
const Tbyte defInfoCouplingFile (VN_12)[12]
const Tbyte defInfoCouplingFile (VN_13)[13]
const Tbyte defInfoCouplingFile (VN_14)[14]
const Tbyte defInfoCouplingFile (VN_15)[15]

Variables

Ttickcount uxTickCount
 Declaration of the tick counter.
Tuint08 uiOsStatus
TosData xOS
Tuint08 uiFsStatus
 Declaration of the FS status byte.
Tuint08 uiOsTimeAverage
 If we check the timing of the OS an continuous average is taken over the last for Os Time values.
Tuint16 uiOsLoadCollect
 These variables hold the statistics of the OS and the ISR's.
Tuint16 uiOsLoadTotal
Tuint16 uiIdleLoadCollect
Tuint16 uiIdleLoadTotal
Tuint08 uiIsrLoadTemp
Tuint16 uiIsrLoadCollect
Tuint16 uiIsrLoadTotal
Tuint08 uiLastOsStatus
Tuint08 uiOsStackMax
 The 'StackMax' variables hold the highest use of the Stack for the OS and the ISR.
Tuint08 uiIsrStackMax
Tchar StackISR [(StackSizeISR)]
 Define the ISR stack if needed, discussion about nocommon, see below.
Tchar StackSHR [(StackSizeShared)]
 Define the Shared stack if needed, discussion about nocommon, see below.
const Tbyte * pxTCBlist [defNumberOfTasks]
const TtaskDefinitionBlockpxTDBlist [defNumberOfTasks]
const fpInitTask pxInitlist [defNumberOfTasks]
const fpLoopTask pxLooplist [defNumberOfTasks]
const fpBarkTask pxBarklist [defNumberOfWatchdogTasks]
const Tbyte * pxQueulist [defNumberOfQueus]
const Tuint08 uiQueuSize [defNumberOfQueus]
const Tuint08 uiFileSpace [defFsNumberOfPreFiles]
const Tuint08 uiCapabilities [defNumberOfTasks]
Tuint08 uiQueuWrite [defNumberOfQueus]
Tuint08 uiQueuRead [defNumberOfQueus]


Function Documentation

void appBoot ( void   ) 

Prototype for the general initialization.

The Remember demonstration fills the file system with random numbers and calculates a (xor) hash on before hand. Then three worker tasks are started which read the files with concurrently and calculate hash's for each files. When all workers are done the main task combines the result and checks if it is equal to the value before. If so, a new round is started. Note that this demo wears out the EEPROM rapidly.

Definition at line 49 of file code_TestBare.c.

void appEnterIdle ( void   ) 

This file is solely for demonstration purposes.

This example is made to demonstrate how small the Femto OS can be. It runs only the idle task, which is not really a task since it runs totally in OS space. However, there is the possibility to add some code to this 'task' through the idle hook. Here we made a 16 bit counter out of the I/O lines.

Definition at line 40 of file code_TestBare.c.

References Tuint08.

Referenced by privEnterIdle().

Here is the caller graph for this function:

void appEnterSleep ( void   ) 

Definition at line 91 of file code_TestSleep.c.

Referenced by privEnterSleep().

Here is the caller graph for this function:

void appExitSleep ( void   ) 

Definition at line 96 of file code_TestSleep.c.

Referenced by privEnterSleep().

Here is the caller graph for this function:

void appTick00 ( void   ) 

Tick hook called every tick.

Keep code inside really short! API calls inside are not allowed, even the genXXX are not allowed. The tick counter may not be valid when called. This call is executed inside OS realm. In case of low power down, missed ticks are not catched up.

Definition at line 58 of file code_TestHooks.c.

References uiCounter, and uiSelector.

void appTick08 ( void   ) 

Tick hook called every tick block (256 ticks).

Keep code inside short. API calls inside are not allowed, even the genXXX are not allowed. The tick counter may not be valid when called. This call is executed inside OS realm. In case of low power down, missed ticks are not catched up.

Definition at line 62 of file code_TestHooks.c.

References uiCounter, and uiSelector.

void appTick16 ( void   ) 

Tick hook called every tick rollover (65536 ticks).

Keep code inside short. API calls inside are not allowed, even the genXXX are not allowed. The tick counter may not be valid when called. This call is executed inside OS realm. In case of low power down, missed ticks are catched up, but may be deferred.

Definition at line 86 of file code_TestDoorLight.c.

References uiDelayMode, uiDelayTimer, and uptime.

void appTickSleep ( void   ) 

Definition at line 81 of file code_TestSleep.c.

References portNop.

Referenced by portSleep().

Here is the caller graph for this function:

const Tbyte defInfoCouplingFile ( VN_15   ) 

const Tbyte defInfoCouplingFile ( VN_14   ) 

const Tbyte defInfoCouplingFile ( VN_13   ) 

const Tbyte defInfoCouplingFile ( VN_12   ) 

const Tbyte defInfoCouplingFile ( VN_11   ) 

const Tbyte defInfoCouplingFile ( VN_10   ) 

const Tbyte defInfoCouplingFile ( VN_09   ) 

const Tbyte defInfoCouplingFile ( VN_08   ) 

const Tbyte defInfoCouplingFile ( VN_07   ) 

const Tbyte defInfoCouplingFile ( VN_06   ) 

const Tbyte defInfoCouplingFile ( VN_05   ) 

const Tbyte defInfoCouplingFile ( VN_04   ) 

const Tbyte defInfoCouplingFile ( VN_03   ) 

const Tbyte defInfoCouplingFile ( VN_02   ) 

const Tbyte defInfoCouplingFile ( VN_01   ) 

const Tbyte defInfoCouplingFile ( VN_00   ) 

const Tbyte defInfoCouplingSlot ( LN_15   ) 

const Tbyte defInfoCouplingSlot ( LN_14   ) 

const Tbyte defInfoCouplingSlot ( LN_13   ) 

const Tbyte defInfoCouplingSlot ( LN_12   ) 

const Tbyte defInfoCouplingSlot ( LN_11   ) 

const Tbyte defInfoCouplingSlot ( LN_10   ) 

const Tbyte defInfoCouplingSlot ( LN_09   ) 

const Tbyte defInfoCouplingSlot ( LN_08   ) 

const Tbyte defInfoCouplingSlot ( LN_07   ) 

const Tbyte defInfoCouplingSlot ( LN_06   ) 

const Tbyte defInfoCouplingSlot ( LN_05   ) 

const Tbyte defInfoCouplingSlot ( LN_04   ) 

const Tbyte defInfoCouplingSlot ( LN_03   ) 

const Tbyte defInfoCouplingSlot ( LN_02   ) 

const Tbyte defInfoCouplingSlot ( LN_01   ) 

const Tbyte defInfoCouplingTask ( TN_15   ) 

const Tbyte defInfoCouplingTask ( TN_14   ) 

const Tbyte defInfoCouplingTask ( TN_13   ) 

const Tbyte defInfoCouplingTask ( TN_12   ) 

const Tbyte defInfoCouplingTask ( TN_11   ) 

const Tbyte defInfoCouplingTask ( TN_10   ) 

const Tbyte defInfoCouplingTask ( TN_09   ) 

const Tbyte defInfoCouplingTask ( TN_08   ) 

const Tbyte defInfoCouplingTask ( TN_07   ) 

const Tbyte defInfoCouplingTask ( TN_06   ) 

const Tbyte defInfoCouplingTask ( TN_05   ) 

const Tbyte defInfoCouplingTask ( TN_04   ) 

const Tbyte defInfoCouplingTask ( TN_03   ) 

const Tbyte defInfoCouplingTask ( TN_02   ) 

const Tbyte defInfoCouplingTask ( TN_01   ) 

const Tbyte defInfoCouplingTask ( TN_00   ) 


Variable Documentation

const fpBarkTask pxBarklist[defNumberOfWatchdogTasks]

Referenced by privSwitchContext().

const fpInitTask pxInitlist[defNumberOfTasks]

Referenced by main(), and privRecreateBody().

const fpLoopTask pxLooplist[defNumberOfTasks]

Referenced by privTaskInit().

const Tbyte* pxQueulist[defNumberOfQueus]

const Tbyte* pxTCBlist[defNumberOfTasks]

Referenced by privTcbList().

const TtaskDefinitionBlock* pxTDBlist[defNumberOfTasks]

Referenced by genGetTaskname(), genLogTask(), and privTaskInit().

Tchar StackISR

Define the ISR stack if needed, discussion about nocommon, see below.

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

Tchar StackSHR

Define the Shared stack if needed, discussion about nocommon, see below.

const Tuint08 uiCapabilities[defNumberOfTasks]

Referenced by privCheckCapabilities().

const Tuint08 uiFileSpace[defFsNumberOfPreFiles]

Referenced by privFileLocation(), and privFileSpace().

Tuint08 uiFsStatus

Declaration of the FS status byte.

The whole state of the Femto File System is kept in one byte. 8 bit structure: rwqbtttt r: read mode, reading is possible, all blocking FS tasks are write request. w: write mode, one task has access, further tasks are blocked. q: request bit, if set, write is requested, no further reads are allowed. b: burn block. As long as this bit is set, writing is prohibited. tttt: number of the task currently writing the FS in case of writemode tttt: number of tasks holding a readlock in case of readmode

Definition at line 71 of file femtoos_shared.c.

Referenced by genLogOs(), privEnterSleep(), privFileOpenBody(), privPrepareFileClose(), privPutAllTasksToSleep(), privReleaseFileBlocks(), privSleepAllBody(), privSwitchContext(), and privWaitForFsAccessBody().

Tuint16 uiIdleLoadCollect

Definition at line 92 of file femtoos_shared.c.

Referenced by privCopyLoad().

Tuint16 uiIdleLoadTotal

Definition at line 93 of file femtoos_shared.c.

Referenced by genLogOs(), and privCopyLoad().

Tuint16 uiIsrLoadCollect

Definition at line 96 of file femtoos_shared.c.

Referenced by privCopyLoad().

Tuint08 uiIsrLoadTemp

Definition at line 95 of file femtoos_shared.c.

Referenced by isrStartLoad(), and isrStopLoad().

Tuint16 uiIsrLoadTotal

Definition at line 97 of file femtoos_shared.c.

Referenced by genLogOs(), and privCopyLoad().

Tuint08 uiIsrStackMax

Definition at line 116 of file femtoos_shared.c.

Referenced by genLogOs(), isrStackCheck(), and privTraceWatermarks().

Tuint08 uiLastOsStatus

Definition at line 99 of file femtoos_shared.c.

Referenced by privInitOs(), and privIsrExit().

Tuint16 uiOsLoadCollect

These variables hold the statistics of the OS and the ISR's.

The 'collect' variables collect the subticks and these subticks are periodically and simultaneously copied to the 'total' variables.

Definition at line 90 of file femtoos_shared.c.

Referenced by privCopyLoad().

Tuint16 uiOsLoadTotal

Definition at line 91 of file femtoos_shared.c.

Referenced by genLogOs(), and privCopyLoad().

Tuint08 uiOsStackMax

The 'StackMax' variables hold the highest use of the Stack for the OS and the ISR.

These are determined on the bases of the highest stack level as well as on inspection of the content of these arrays.

Definition at line 111 of file femtoos_shared.c.

Referenced by genLogOs(), privCheckOsStackLevel(), privCheckOsStackRegion(), and privTraceWatermarks().

Tuint08 uiOsStatus

Definition at line 43 of file femtoos_shared.c.

Referenced by genAddtoTickCount(), genGetLastWakeTime(), genGetPriority(), genGetTaskname(), genGetTickCount(), genLogOs(), genLogTask(), genResume(), genSetPriority(), genSuspend(), portBeginISR(), portEnterISR(), portReturnISR(), portSaveContext(), portYieldISR(), privCheckCapabilities(), privDelayCalc(), privEnterIdle(), privEnterOS(), privEnterSleep(), privIncrementTick(), privInitOs(), privSwitchContext(), privTaskInit(), privTaskNumber(), and privTickYield().

Tuint08 uiOsTimeAverage

If we check the timing of the OS an continuous average is taken over the last for Os Time values.

This is stored in uiOsTimeAverage.

Definition at line 80 of file femtoos_shared.c.

Tuint08 uiQueuRead[defNumberOfQueus]

const Tuint08 uiQueuSize[defNumberOfQueus]

Tuint08 uiQueuWrite[defNumberOfQueus]

Ttickcount uxTickCount

Declaration of the tick counter.

Definition at line 33 of file femtoos_shared.c.

Referenced by genAddtoTickCount(), genGetTickCount(), genResume(), privDelayCalc(), privIncrementTick(), privSwitchContext(), privUnblockTask(), and privWakeupFromLowPower().

TosData xOS

Referenced by portBeginISR(), portRestoreContext(), portReturnISR(), portSaveContext(), portYieldISR(), privCheckOsStackLevel(), privCheckOsStackRegion(), privEnterIdle(), privEnterSleep(), privInitOs(), privIsrExit(), and taskStackCheck().


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