4 * This file is part of BeRTOS.
6 * Bertos is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 * As a special exception, you may use this file as part of a free software
21 * library without restriction. Specifically, if other files instantiate
22 * templates or use macros or inline functions from this file, or you compile
23 * this file and link it with other files to produce an executable, this
24 * file does not by itself cause the resulting executable to be covered by
25 * the GNU General Public License. This exception does not however
26 * invalidate any other reasons why the executable file might be covered by
27 * the GNU General Public License.
29 * Copyright 2008 Develer S.r.l. (http://www.develer.com/)
33 * \brief Configuration file Ramp algorithm module.
36 * \author Daniele Basile <asterix@develer.com>
43 * Define whether the ramp will use floating point calculation within ramp_evaluate().
44 * Otherwise, a less precise fixed point version will be used, which is faster on
45 * platforms which do no support floating point operations.
47 * \note Floating point operations will be always done within ramp_compute() to
48 * precalculate values, so there has to be at least a floating point emulation support.
50 * $WIZ$ type = "boolean"
52 #define RAMP_USE_FLOATING_POINT 0
55 #if !RAMP_USE_FLOATING_POINT
58 * Number of least-significant bits which are stripped away during ramp evaluation.
59 * This setting allows to specify larger ramps at the price of less precision.
61 * The maximum ramp size allowed is 2^(24 + RAMP_CLOCK_SHIFT_PRECISION), in clocks.
62 * For instance, using RAMP_CLOCK_SHIFT_PRECISION 1, and a 8x prescaler, the maximum
63 * length of a ramp is about 6.7 secs. Raising RAMP_CLOCK_SHIFT_PRECISION to 2
64 * brings the maximum length to 13.4 secs, at the price of less precision.
66 * ramp_compute() will check that the length is below the maximum allowed through
67 * a runtime assertion.
69 * \note This macro is used only for the fixed-point version of the ramp.
74 #define RAMP_CLOCK_SHIFT_PRECISION 2
79 * Negative pulse width for ramp.
83 #define RAMP_PULSE_WIDTH 50
86 * Default ramp time (microsecs).
89 #define RAMP_DEF_TIME 6000000UL
91 * Default ramp maxfreq (Hz).
95 #define RAMP_DEF_MAXFREQ 5000
97 * Default ramp minfreq (Hz).
101 #define RAMP_DEF_MINFREQ 200
103 * Default ramp powerrun (deciampere).
107 #define RAMP_DEF_POWERRUN 10
109 * Default ramp poweridle (Hz).
113 #define RAMP_DEF_POWERIDLE 1
115 #endif /* CFG_RAMP_H */