Class StepGen2 done after Stepgen.odb

This commit is contained in:
Hakan Bastedt
2024-02-08 21:28:48 +01:00
parent 2fb5252d37
commit fe3de876fa
5 changed files with 83 additions and 125 deletions

View File

@@ -33,11 +33,11 @@ void timerCallbackStep2(void)
}
#endif
#include "StepGen2.h"
void timerCallbackStep(void);
void timerCallbackStepStart(void);
StepGen2 Step(TIM1, 4, PA_11, PA12, timerCallbackStep, TIM10, timerCallbackStepStart);
void timerCallbackStep(void) { Step.timerCB(); }
void timerCallbackStepStart(void) { Step.timer2CB(); }
void pulseTimerCallback(void);
void startTimerCallback(void);
StepGen2 Step(TIM1, 4, PA_11, PA12, pulseTimerCallback, TIM10, startTimerCallback);
void pulseTimerCallback(void) { Step.pulseTimerCB(); }
void startTimerCallback(void) { Step.startTimerCB(); }
CircularBuffer<uint32_t, 200> Tim;
volatile uint64_t nowTime = 0, thenTime = 0;
@@ -57,6 +57,9 @@ void cb_set_outputs(void) // Master outputs gets here, slave inputs, first opera
void handleStepper(void)
{
Step.enabled = true;
Step.commandedPosition = Obj.StepGenIn1.CommandedPosition;
#if 0
Step1.handleStepper();
Step2.handleStepper();