stepper: Introduce stepper_get_position command and remove from endstop.c

Move the logic to calculate and report the stepper's current position
from endstop.c to stepper.c.  This localizes the stepper code into
stepper.c.

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2017-03-05 15:00:15 -05:00
parent 8d6ecd9af8
commit a38437f378
6 changed files with 54 additions and 28 deletions

View file

@ -3,12 +3,8 @@
#include <stdint.h> // uint8_t
enum { STEPPER_POSITION_BIAS=0x40000000 };
uint_fast8_t stepper_event(struct timer *t);
void command_config_stepper(uint32_t *args);
struct stepper;
uint32_t stepper_get_position(struct stepper *s);
struct stepper *stepper_oid_lookup(uint8_t oid);
void stepper_stop(struct stepper *s);
#endif // stepper.h