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.
35 * \author Daniele Basile <asterix@develer.com>
42 * Define whether the ramp will use floating point calculation within ramp_evaluate().
43 * Otherwise, a less precise fixed point version will be used, which is faster on
44 * platforms which do no support floating point operations.
46 * \note Floating point operations will be always done within ramp_compute() to
47 * precalculate values, so there has to be at least a floating point emulation support.
49 * $WIZ$ type = "boolean"
51 #define RAMP_USE_FLOATING_POINT 0
54 #if !RAMP_USE_FLOATING_POINT
57 * Number of least-significant bits which are stripped away during ramp evaluation.
58 * This setting allows to specify larger ramps at the price of less precision.
60 * The maximum ramp size allowed is 2^(24 + RAMP_CLOCK_SHIFT_PRECISION), in clocks.
61 * For instance, using RAMP_CLOCK_SHIFT_PRECISION 1, and a 8x prescaler, the maximum
62 * length of a ramp is about 6.7 secs. Raising RAMP_CLOCK_SHIFT_PRECISION to 2
63 * brings the maximum length to 13.4 secs, at the price of less precision.
65 * ramp_compute() will check that the length is below the maximum allowed through
66 * a runtime assertion.
68 * \note This macro is used only for the fixed-point version of the ramp.
73 #define RAMP_CLOCK_SHIFT_PRECISION 2
78 * Negative pulse width for ramp.
82 #define RAMP_PULSE_WIDTH 50
85 * 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 */