2 * Copyright Droids Corporation (2008)
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
21 * Author : Julien LE GUEN - jlg@jleguen.info
23 #ifndef _TIME_EXT_CONFIG_H_
24 #define _TIME_EXT_CONFIG_H_
28 * Speed of your external Quartz (in Hertz)
29 * Typically you want it to be a 32.768kHz watch-like quartz
31 #define TIME_EXT_QUARTZ_FREQ 32768000UL
35 * Quartz period (1/freq) in NANO-SECONDS
36 * The rounding error here, for a 32768kHz quartz,
37 * is of 36450 ns per 24 hours.
39 #define TIME_EXT_QUARTZ_PERIOD 30518UL
43 * If the resolution of 30us (with a 32kHz quartz) is
44 * not enough for your application, you can define
46 * The timer will then use TIMER1 driven by the CPU clock,
47 * in addition to TIMER2 in asynchronous mode driven by
48 * the external quartz, to achieve the best resolution possible.
50 #define TIME_EXT_FINE_GRAIN
53 #endif /* _TIME_EXT_CONFIG_H_ */