diff --git a/stm32-stepper-root/stepper_h7/CM7/Core/Src/main.c b/stm32-stepper-root/stepper_h7/CM7/Core/Src/main.c index 35d89fa..c9afa49 100644 --- a/stm32-stepper-root/stepper_h7/CM7/Core/Src/main.c +++ b/stm32-stepper-root/stepper_h7/CM7/Core/Src/main.c @@ -140,6 +140,7 @@ void blink_red_led(){ } } + // -------------------------------------------------------------------------------------------------------------------- static int CapabilityFunc( int argc, char** argv, void* ctx ) // -------------------------------------------------------------------------------------------------------------------- @@ -180,6 +181,17 @@ static int CapabilityFunc( int argc, char** argv, void* ctx ) return 0; } +SpindlePhysicalParams_t s; + + +static int fabi(int argc, char** argv, void* ctx){ + (void)argc; + (void)argv; + (void)ctx; + printf("Hallo Fabi"); + return 0; +} + #define BKPSRAM_BASE 0x38800000UL typedef struct { @@ -310,6 +322,19 @@ int main(void) CONSOLE_RegisterCommand(c, "capability", "prints a specified string of capability bits", CapabilityFunc, NULL); + CONSOLE_RegisterCommand(c, "fabi", "prints a hallo fabi", + fabi, NULL); + + //Spindel + s.maxRPM = 9000.0f; + s.minRPM = -9000.0f; + s.absMinRPM = 1600.0f; + s.setDirection = SPINDLE_SetDirection; + s.setDutyCycle = SPINDLE_SetDutyCycle; + s.enaPWM = SPINDLE_EnaPWM; + s.context = NULL; + SPINDLE_CreateInstance( 4*configMINIMAL_STACK_SIZE, configMAX_PRIORITIES - 3, c, &s); + // create a playground task at the very beginning