demos_source/code_TestBare.c

Go to the documentation of this file.
00001 /*
00002  * Femto OS v 0.91 - Copyright (C) 2008-2009 Ruud Vlaming
00003  *
00004  * This file is part of the Femto OS distribution.
00005  *
00006  * This program is free software: you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation, version 3 of the License.
00009  *
00010  * This program is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  * GNU General Public License for more details.
00014  *
00015  * You should have received a copy of the GNU General Public License
00016  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
00017  *
00018  * Please note that, due to the GPLv3 license, for application of this
00019  * work and/or combined work in embedded systems special obligations apply.
00020  * If these are not to you liking, please know the Femto OS is dual
00021  * licensed. A commercial license and support are available.
00022  * See http://www.femtoos.org/ for details.
00023  */
00024 
00035 /* This this the only include needed in your code .*/
00036 #include "femtoos_code.h"
00037 
00038 
00039 /* This is the hook activated just before the OS goes idle. */
00040 void appEnterIdle(void)
00041 { /* Using a register saves 2 bytes ;-) */
00042   Tuint08 newPortB = devSwitchPORT--;
00043   /* Start counting on all i/o lines */
00044   if (newPortB == 0x00) { devLedPORT--; } }
00045 
00046 
00047 /* This is called once at system boot, and before the creating of any of
00048  * the tasks. Use it to initialize the hardware. */
00049 void appBoot(void)
00050 { /* Make sure all lines are output */
00051   devLedDRR = 0xFF;
00052   devSwitchDRR = 0xFF;  }

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