projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Split the parameter name and the value of the parameter
[bertos.git]
/
bertos
/
algo
/
ramp.h
diff --git
a/bertos/algo/ramp.h
b/bertos/algo/ramp.h
index f438dc5ebe1d7574566f85a16af5503731b745f5..2ec9018af3d9f27c3b58b1c5f54ca27fcd75a6b2 100644
(file)
--- a/
bertos/algo/ramp.h
+++ b/
bertos/algo/ramp.h
@@
-49,8
+49,9
@@
#ifndef ALGO_RAMP_H
#define ALGO_RAMP_H
#ifndef ALGO_RAMP_H
#define ALGO_RAMP_H
+#include "hw/hw_stepper.h"
+
#include <cfg/compiler.h>
#include <cfg/compiler.h>
-#include "hw_stepper.h"
/**
* Define whether the ramp will use floating point calculation within ramp_evaluate().
/**
* Define whether the ramp will use floating point calculation within ramp_evaluate().
@@
-114,7
+115,10
@@
*/
#define FREQ2MICROS(hz) (1000000UL / ((uint32_t)(hz)))
*/
#define FREQ2MICROS(hz) (1000000UL / ((uint32_t)(hz)))
-
+/**
+ * Multiply \p a and \p b two integer at 32 bit and extract the high 16 bit word.
+ */
+#define FIX_MULT32(a,b) (((uint64_t)(a)*(uint32_t)(b)) >> 16)
/**
* Structure holding pre-calculated data for speeding up real-time evaluation
/**
* Structure holding pre-calculated data for speeding up real-time evaluation
@@
-193,7
+197,9
@@
void ramp_default(struct Ramp *ramp);
/** Self test */
/** Self test */
-void ramp_test(void);
+int ramp_testSetup(void);
+int ramp_testRun(void);
+int ramp_testTearDown(void);
#endif /* ALGO_RAMP_H */
#endif /* ALGO_RAMP_H */