Stm32Workshop fork commit

Dependencies:   BufferedSerial X_NUCLEO_IHM01A1 mbed

Fork of Stepper_Matlab_Control by Arkadi Rafalovich

Revision:
3:40a6b7ff62ea
Parent:
1:fd0fbabd0c8f
--- a/main.cpp	Mon Jul 25 09:21:34 2016 +0000
+++ b/main.cpp	Mon Jul 25 13:29:26 2016 +0000
@@ -52,8 +52,8 @@
 // Stepper Variables:
 #define STEPS2ROTATION 3200.0f // 200 steps rotation 16 microsteps
 /* Initialization parameters. */
-// not sure if it acctually uses it
-L6474_InitTypeDef init =
+/* Initialization parameters of the motor connected to the expansion board. */
+L6474_Init_t init =
 {
     50,                              /* Acceleration rate in step/s2. Range: (0..+inf). */
     50,                              /* Deceleration rate in step/s2. Range: (0..+inf). */
@@ -142,7 +142,7 @@
     // Disabling motor
     StepperMotor->Disable();
     /* Changing step mode. */
-    StepperMotor->SetStepMode(STEP_MODE_1_16);
+    StepperMotor->SetStepMode((StepperMotor::step_mode_t) STEP_MODE_1_16);
     /* Increasing the torque regulation current to 500mA. */
     StepperMotor->SetParameter(L6474_TVAL, 500);