demos_source/code_TestQueus.c File Reference

#include "femtoos_code.h"

Include dependency graph for code_TestQueus.c:

Go to the source code of this file.

Functions

static void invLed (Tuint08 lednr)
 This file is solely for demonstration purposes.
static void setNumber (Tuint08 mask, Tuint08 number)
void appInit_WriteTask (void)
void appLoop_WriteTask (void)
void appInit_ReadTask (void)
void appLoop_ReadTask (void)
void appInit_ResetTask (void)
void appLoop_ResetTask (void)


Function Documentation

void appInit_ReadTask ( void   ) 

Definition at line 91 of file code_TestQueus.c.

void appInit_ResetTask ( void   ) 

Definition at line 119 of file code_TestQueus.c.

void appInit_WriteTask ( void   ) 

Definition at line 63 of file code_TestQueus.c.

void appLoop_ReadTask ( void   ) 

Definition at line 100 of file code_TestQueus.c.

References genQueuReadOnName, invLed(), setNumber(), taskDelayFromNow(), taskQueuReadRequestOnName, taskQueuReleaseOnName, and Tuint08.

Here is the call graph for this function:

void appLoop_ResetTask ( void   ) 

Definition at line 125 of file code_TestQueus.c.

References defDelayTimeMax, genQueuClearOnName, setNumber(), taskDelayFromNow(), taskQueuReadRequestOnName, taskQueuReleaseOnName, Tuint08, and uiLedState.

Here is the call graph for this function:

void appLoop_WriteTask ( void   ) 

Definition at line 72 of file code_TestQueus.c.

References genQueuWriteOnName, invLed(), setNumber(), taskDelayFromNow(), taskQueuReleaseOnName, taskQueuWriteRequestOnName, and Tuint08.

Here is the call graph for this function:

static void invLed ( Tuint08  lednr  )  [static]

This file is solely for demonstration purposes.

Here we show the simple use of a queue. One 12 byte queue is defined which is written to from one task, 8 bytes at a time, and is read from in an other task, 6 bytes at a time. If a task does not gets access to the queue because it is blocked, it tries for about one second (using the time-out facility on locks) and then complains for about one second by blinking a led. It subsequently tries again. Notice the dynamics of the process, which is: write - read - write - read - write - read - read and then it repeats itself. It is possible to reset (empty) the queue by pushing the button.

Definition at line 47 of file code_TestQueus.c.

References taskEnterSwitchCritical(), and taskExitSwitchCritical().

Referenced by appLoop_ReadTask(), and appLoop_WriteTask().

Here is the call graph for this function:

Here is the caller graph for this function:

static void setNumber ( Tuint08  mask,
Tuint08  number 
) [static]

Definition at line 54 of file code_TestQueus.c.

References taskEnterSwitchCritical(), and taskExitSwitchCritical().

Referenced by appLoop_ReadTask(), appLoop_ResetTask(), and appLoop_WriteTask().

Here is the call graph for this function:

Here is the caller graph for this function:


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