2 * Copyright Droids Corporation, Microb Technology, Eirbot (2005)
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 * Revision : $Id: scheduler_config.h,v 1.2 2009-03-15 20:18:33 zer0 Exp $
22 #ifndef _SCHEDULER_CONFIG_H_
23 #define _SCHEDULER_CONFIG_H_
25 #define _SCHEDULER_CONFIG_VERSION_ 4
27 /** maximum number of allocated events */
28 #define SCHEDULER_NB_MAX_EVENT 10
31 /* #define SCHEDULER_UNIT_FLOAT 1000.0 */
32 /* #define SCHEDULER_UNIT 1000UL */
34 /* tim0_div * tim0_res * soft_presc / quartz
35 * = (8 * 256 * 4) / 12 */
36 #define SCHEDULER_UNIT_FLOAT 682.0
37 #define SCHEDULER_UNIT 682L
40 /** number of allowed imbricated scheduler interrupts. The maximum
41 * should be SCHEDULER_NB_MAX_EVENT since we never need to imbricate
42 * more than once per event. If it is less, it can avoid to browse the
43 * event table, events are delayed (we loose precision) but it takes
45 #define SCHEDULER_NB_STACKING_MAX SCHEDULER_NB_MAX_EVENT
47 /** define it for debug infos (not recommended, because very slow on
48 * an AVR, it uses printf in an interrupt). It can be useful if
49 * prescaler is very high, making the timer interrupt period very
50 * long in comparison to printf() */
51 /* #define SCHEDULER_DEBUG */
53 #endif // _SCHEDULER_CONFIG_H_