#ifndef ALGO_RAMP_H
#define ALGO_RAMP_H
+#include "hw/hw_stepper.h"
+
#include <cfg/compiler.h>
-#include "hw_stepper.h"
/**
* Define whether the ramp will use floating point calculation within ramp_evaluate().
*/
#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
/** Self test */
-void ramp_test(void);
+int ramp_testSetup(void);
+int ramp_testRun(void);
+int ramp_testTearDown(void);
#endif /* ALGO_RAMP_H */