#include "femtoos_code.h"
Include dependency graph for code_TestSleep.c:
Go to the source code of this file.
Defines | |
#define | delay05 31000U |
This file is solely for demonstration purposes. | |
#define | delay04 30500U |
#define | delay03 30000U |
#define | delay02 1500U |
#define | delay01 1000U |
#define | delay00 250U |
#define | delayFLASH 50U |
#define | IntPortSetup() |
#define | setLed(lednr, state) if (state) { devLedPORT &= ~(1 << lednr); } else { devLedPORT |= (1 << lednr); } |
Functions | |
void | appBoot (void) |
Prototype for the general initialization. | |
void | appTickSleep (void) |
void | appEnterSleep (void) |
void | appExitSleep (void) |
void | flashLED (Tuint08 ledNR) |
#define delay00 250U |
Definition at line 51 of file code_TestSleep.c.
#define delay01 1000U |
Definition at line 50 of file code_TestSleep.c.
#define delay02 1500U |
Definition at line 49 of file code_TestSleep.c.
#define delay03 30000U |
Definition at line 48 of file code_TestSleep.c.
#define delay04 30500U |
Definition at line 47 of file code_TestSleep.c.
#define delay05 31000U |
This file is solely for demonstration purposes.
Most atmel devices can be brought to a low power sleep. This application demonstrates that the Femto OS is capable of utilizing this feature, and at the same time keeps the tick counter into sync. The OS periodically checks if the smallest delay time off all running tasks is large enough to start sleeping. If so, the device is put to low power sleep. After wake up the tick counter is restored and operations are continued.
Definition at line 46 of file code_TestSleep.c.
#define delayFLASH 50U |
#define IntPortSetup | ( | ) |
#define setLed | ( | lednr, | |||
state | ) | if (state) { devLedPORT &= ~(1 << lednr); } else { devLedPORT |= (1 << lednr); } |
Definition at line 101 of file code_TestSleep.c.
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 72 of file code_TestSleep.c.
References IntPortSetup.
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 appTickSleep | ( | void | ) |
Definition at line 81 of file code_TestSleep.c.
References portNop.
Referenced by portSleep().
Here is the caller graph for this function:
void flashLED | ( | Tuint08 | ledNR | ) |
Definition at line 105 of file code_TestSleep.c.
References delayFLASH, setLed, and taskDelayFromNow().
Here is the call graph for this function: