bertos/cfg/cfg_ramp.h File Reference
Configuration file Ramp algorithm module. More...
Go to the source code of this file.
Defines | |
| #define | RAMP_USE_FLOATING_POINT 0 |
| Define whether the ramp will use floating point calculation within ramp_evaluate(). | |
| #define | RAMP_CLOCK_SHIFT_PRECISION 2 |
| Number of least-significant bits which are stripped away during ramp evaluation. | |
| #define | RAMP_PULSE_WIDTH 50 |
| Negative pulse width for ramp. | |
| #define | RAMP_DEF_TIME 6000000UL |
| Default ramp time (microsecs). | |
| #define | RAMP_DEF_MAXFREQ 5000 |
| Default ramp maxfreq (Hz). | |
| #define | RAMP_DEF_MINFREQ 200 |
| Default ramp minfreq (Hz). | |
| #define | RAMP_DEF_POWERRUN 10 |
| Default ramp powerrun (deciampere). | |
| #define | RAMP_DEF_POWERIDLE 1 |
| Default ramp poweridle (Hz). | |
Detailed Description
Configuration file Ramp algorithm module.
- Version:
- Id
- cfg_ramp.h 2582 2009-04-20 12:33:48Z batt
Definition in file bertos/cfg/cfg_ramp.h.
Define Documentation
| #define RAMP_CLOCK_SHIFT_PRECISION 2 |
Number of least-significant bits which are stripped away during ramp evaluation.
This setting allows to specify larger ramps at the price of less precision.
The maximum ramp size allowed is 2^(24 + RAMP_CLOCK_SHIFT_PRECISION), in clocks. For instance, using RAMP_CLOCK_SHIFT_PRECISION 1, and a 8x prescaler, the maximum length of a ramp is about 6.7 secs. Raising RAMP_CLOCK_SHIFT_PRECISION to 2 brings the maximum length to 13.4 secs, at the price of less precision.
ramp_compute() will check that the length is below the maximum allowed through a runtime assertion.
- Note:
- This macro is used only for the fixed-point version of the ramp.
Definition at line 74 of file bertos/cfg/cfg_ramp.h.
| #define RAMP_USE_FLOATING_POINT 0 |
Define whether the ramp will use floating point calculation within ramp_evaluate().
Otherwise, a less precise fixed point version will be used, which is faster on platforms which do no support floating point operations.
- Note:
- Floating point operations will be always done within ramp_compute() to precalculate values, so there has to be at least a floating point emulation support.
Definition at line 52 of file bertos/cfg/cfg_ramp.h.
