00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 
00022 
00023 
00024 
00036 
00037 #include "femtoos_code.h"
00038 
00039 
00040 static Tuint08 speed = 0;
00041 
00042 const Tchar HelloWorldStr[] PROGMEM = "Hello World.";
00043 
00044 void appBoot(void)
00045 { devLedDRR    = 0xFF;
00046   devLedPORT   = 0xFF;
00047   devSwitchDRR = 0x00; }
00048 
00049 
00050 #if (preTaskDefined(Display))
00051 
00052 void appLoop_Display(void)
00053 { speed = 64;
00054   while (true)
00055   { Tuint08 uiCharCount;
00056     Tchar cChar;
00057     for (uiCharCount = 0; uiCharCount<12; uiCharCount++)
00058     { cChar = portFlashReadByte(Tchar, HelloWorldStr[uiCharCount]);
00059       devLedPORT = ~cChar;
00060       taskDelayFromNow( ((Tuint16)speed)*4 + 64 );
00061       devLedPORT = 0xFF;
00062       taskDelayFromNow(64); }
00063     taskDelayFromNow(2000); } }
00064 
00065 #endif
00066 
00067 
00068 
00069 #if (preTaskDefined(Speed))
00070 
00071 void appLoop_Speed(void)
00072 { Tuint08 button  = devSwitchPIN & 01;
00073   Tuint08 lastbutton  = button;
00074   while (true)
00075   { button = devSwitchPIN & 01;
00076     if (button != lastbutton) { speed += 64; }
00077     taskDelayFromNow(100); } }
00078 
00079 #endif
00080