implemented spindle - doesn't work

This commit is contained in:
fewikay committed 2026-10-16 16:58:11 +02:00
1 parent 728b978961
commit aba5e8809e
1 file changed
+25
@@ -140,6 +140,7 @@ void blink_red_led(){
} }
} }
// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------
static int CapabilityFunc( int argc, char** argv, void* ctx ) static int CapabilityFunc( int argc, char** argv, void* ctx )
// -------------------------------------------------------------------------------------------------------------------- // --------------------------------------------------------------------------------------------------------------------
@@ -180,6 +181,17 @@ static int CapabilityFunc( int argc, char** argv, void* ctx )
return 0; 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 #define BKPSRAM_BASE 0x38800000UL
typedef struct { typedef struct {
@@ -310,6 +322,19 @@ int main(void)
CONSOLE_RegisterCommand(c, "capability", "prints a specified string of capability bits", CONSOLE_RegisterCommand(c, "capability", "prints a specified string of capability bits",
CapabilityFunc, NULL); 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 // create a playground task at the very beginning