jonny_ji7 e8e1070bd1 Simplify code, Add actual units: TargetPosMm, SpeedMm
- add functions
    setSpeed (mm/s)
    setTargetPosMm

- add macros and function to define and convert variables to actual units
    speed in mm/s instead of unknown
    abs pos in mm instead of steps

- simplyfy isr code
2023-04-25 17:15:09 +02:00

16 lines
494 B
C++

#pragma once
//init stepper pins and timer
void stepper_init();
//set absolute target position in steps
void stepper_setTargetPosSteps(uint64_t steps);
//set absolute target position in millimeters
void stepper_setTargetPosMm(uint32_t posMm);
//task that periodically logs variables for debugging stepper driver
void task_stepper_debug(void *pvParameter);
//control stepper without timer (software)
void task_stepperCtrlSw(void *pvParameter);
void stepperSw_setTargetSteps(uint64_t target);