2 * Copyright Droids Corporation, Microb Technology, Eirbot (2005)
\r
4 * This program is free software; you can redistribute it and/or modify
\r
5 * it under the terms of the GNU General Public License as published by
\r
6 * the Free Software Foundation; either version 2 of the License, or
\r
7 * (at your option) any later version.
\r
9 * This program is distributed in the hope that it will be useful,
\r
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
\r
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
\r
12 * GNU General Public License for more details.
\r
14 * You should have received a copy of the GNU General Public License
\r
15 * along with this program; if not, write to the Free Software
\r
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
\r
18 * Revision : $Id: main.c,v 1.9.4.5 2007-06-01 09:37:22 zer0 Exp $
\r
22 #include <scheduler.h>
\r
23 #include <aversive/wait.h>
\r
29 void f1(void * nothing)
\r
31 printf("%s\n", __FUNCTION__);
\r
34 void f2(void * nothing)
\r
36 printf("%s\n", __FUNCTION__);
\r
39 void f3(void * nothing)
\r
41 printf("%s START\n", __FUNCTION__);
\r
43 printf("%s END\n", __FUNCTION__);
\r
46 void supp(void * nothing)
\r
48 scheduler_del_event(event_id);
\r
53 #ifndef HOST_VERSION
\r
55 fdevopen(uart0_dev_send, uart0_dev_recv);
\r
62 #ifdef CONFIG_MODULE_TIMER
\r
70 event_id = scheduler_add_periodical_event_priority(f1, NULL, 500000l/SCHEDULER_UNIT, 200);
\r
71 scheduler_add_periodical_event_priority(f2, NULL, 500000l/SCHEDULER_UNIT, 100);
\r
72 scheduler_add_periodical_event(f3, NULL, 1000000l/SCHEDULER_UNIT);
\r
74 // scheduler_add_single_event(supp,65);
\r
78 for (i=0 ; i<50000 ; i++)
\r
79 scheduler_interrupt();
\r