demos_source/code_TestFlashLeds.c File Reference

#include "femtoos_code.h"

Include dependency graph for code_TestFlashLeds.c:

Go to the source code of this file.

Defines

#define delay07   9U
 This file is solely for demonstration purposes.
#define delay06   9U
#define delay05   8U
#define delay04   7U
#define delay03   6U
#define delay02   5U
#define delay01   4U
#define delay00   3U
#define setLed(lednr, state)   if (state) { devLedPORT |= (1 << lednr); } else { devLedPORT &= ~(1 << lednr); }
#define ledInv(lednr)   do { devLedPIN |= (1 << lednr); } while(0)

Functions

void appBoot (void)
 Prototype for the general initialization.
void appLoop_LEDtask0 (void)
void appLoop_LEDtask1 (void)
void appLoop_LEDtask2 (void)
void appLoop_LEDtask3 (void)
void appLoop_LEDtask4 (void)
void appLoop_LEDtask5 (void)
void appLoop_LEDtask6 (void)
void appLoop_LEDtask7 (void)


Define Documentation

#define delay00   3U

Definition at line 52 of file code_TestFlashLeds.c.

Referenced by appLoop_LEDtask0().

#define delay01   4U

Definition at line 51 of file code_TestFlashLeds.c.

Referenced by appLoop_LEDtask1().

#define delay02   5U

Definition at line 50 of file code_TestFlashLeds.c.

Referenced by appLoop_LEDtask2().

#define delay03   6U

Definition at line 49 of file code_TestFlashLeds.c.

Referenced by appLoop_LEDtask3().

#define delay04   7U

Definition at line 48 of file code_TestFlashLeds.c.

Referenced by appLoop_LEDtask4().

#define delay05   8U

Definition at line 47 of file code_TestFlashLeds.c.

Referenced by appLoop_LEDtask5().

#define delay06   9U

Definition at line 46 of file code_TestFlashLeds.c.

Referenced by appLoop_LEDtask6().

#define delay07   9U

This file is solely for demonstration purposes.

This example is made to demonstrate eight tasks can be run in around 1K of flash and as little as 74 bytes of ram. These are totals, stacks of all tasks and the OS included. Each task drives the flashing of one led, so that the led's all blink independently at different frequencies.

Definition at line 45 of file code_TestFlashLeds.c.

Referenced by appLoop_LEDtask7().

#define ledInv ( lednr   )     do { devLedPIN |= (1 << lednr); } while(0)

Definition at line 77 of file code_TestFlashLeds.c.

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

#define setLed ( lednr,
state   )     if (state) { devLedPORT |= (1 << lednr); } else { devLedPORT &= ~(1 << lednr); }

Definition at line 75 of file code_TestFlashLeds.c.

Referenced by appLoop_LEDtask0(), appLoop_LEDtask1(), appLoop_LEDtask2(), appLoop_LEDtask3(), appLoop_LEDtask4(), appLoop_LEDtask5(), appLoop_LEDtask6(), appLoop_LEDtask7(), flashLED(), and HandOver().


Function Documentation

void appBoot ( void   ) 

Prototype for the general initialization.

This is the first application code called. It is called only after a reset, thus in principle once.

Definition at line 67 of file code_TestFlashLeds.c.

void appLoop_LEDtask0 ( void   ) 

Definition at line 86 of file code_TestFlashLeds.c.

References defRestartRunning, delay00, ledInv, setLed, taskDelayFromNow(), and taskRestart().

Here is the call graph for this function:

void appLoop_LEDtask1 ( void   ) 

Definition at line 105 of file code_TestFlashLeds.c.

References defRestartRunning, delay01, ledInv, setLed, taskDelayFromNow(), and taskRestart().

Here is the call graph for this function:

void appLoop_LEDtask2 ( void   ) 

Definition at line 124 of file code_TestFlashLeds.c.

References defRestartRunning, delay02, ledInv, setLed, taskDelayFromNow(), and taskRestart().

Here is the call graph for this function:

void appLoop_LEDtask3 ( void   ) 

Definition at line 143 of file code_TestFlashLeds.c.

References defRestartRunning, delay03, ledInv, setLed, taskDelayFromNow(), and taskRestart().

Here is the call graph for this function:

void appLoop_LEDtask4 ( void   ) 

Definition at line 162 of file code_TestFlashLeds.c.

References defRestartRunning, delay04, ledInv, setLed, taskDelayFromNow(), and taskRestart().

Here is the call graph for this function:

void appLoop_LEDtask5 ( void   ) 

Definition at line 182 of file code_TestFlashLeds.c.

References defRestartRunning, delay05, ledInv, setLed, taskDelayFromNow(), and taskRestart().

Here is the call graph for this function:

void appLoop_LEDtask6 ( void   ) 

Definition at line 202 of file code_TestFlashLeds.c.

References defRestartRunning, delay06, ledInv, setLed, taskDelayFromNow(), and taskRestart().

Here is the call graph for this function:

void appLoop_LEDtask7 ( void   ) 

Definition at line 222 of file code_TestFlashLeds.c.

References defRestartRunning, delay07, ledInv, setLed, taskDelayFromNow(), and taskRestart().

Here is the call graph for this function:


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