Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of X_NUCLEO_IHM01A1 by
Diff: Components/l6474/l6474_class.h
- Revision:
- 11:b4d365138c21
- Parent:
- 10:c3824af0caf4
- Child:
- 12:9f4b9540ff3e
--- a/Components/l6474/l6474_class.h	Thu Nov 26 16:00:28 2015 +0000
+++ b/Components/l6474/l6474_class.h	Fri Nov 27 10:00:22 2015 +0000
@@ -143,13 +143,17 @@
      *   }                                                                    *
      *------------------------------------------------------------------------*/
     /**
-     * @brief  Initializing the component.
+     * @brief  Initializing the component in FULL STEP mode.
      * @param  init Pointer to device specific initalization structure.
      * @retval "0" in case of success, an error code otherwise.
      */
     virtual int Init(void *init)
     {
-        return (int) L6474_Init((MOTOR_InitTypeDef *) init);
+        DrvStatusTypeDef ret = L6474_Init((MOTOR_InitTypeDef *) init);
+        if (ret != COMPONENT_OK)
+            return (int) ret;
+        L6474_SelectStepMode(STEP_MODE_FULL);
+        return (int) COMPONENT_OK;
     }
 
     /**
    