Personal fork of the library for direct control instead of library control

Dependencies:   X_NUCLEO_COMMON

Dependents:   Thesis_Rotating_Platform

Fork of X_NUCLEO_IHM01A1 by Arkadi Rafalovich

Revision:
10:c3824af0caf4
Parent:
9:6f116ce8e314
Child:
11:b4d365138c21
--- a/Components/l6474/l6474_class.h	Wed Nov 25 12:08:01 2015 +0000
+++ b/Components/l6474/l6474_class.h	Thu Nov 26 16:00:28 2015 +0000
@@ -1,40 +1,39 @@
 /**
-  ******************************************************************************
-  * @file    l6474_class.h
-  * @author  IPC Rennes
-  * @version V1.5.0
-  * @date    November 12, 2014
-  * @brief   L6474 driver (fully integrated microstepping motor driver)
-  * @note    (C) COPYRIGHT 2014 STMicroelectronics
-  ******************************************************************************
-  * @attention
-  *
-  * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
-  *
-  * Redistribution and use in source and binary forms, with or without modification,
-  * are permitted provided that the following conditions are met:
-  *   1. Redistributions of source code must retain the above copyright notice,
-  *      this list of conditions and the following disclaimer.
-  *   2. Redistributions in binary form must reproduce the above copyright notice,
-  *      this list of conditions and the following disclaimer in the documentation
-  *      and/or other materials provided with the distribution.
-  *   3. Neither the name of STMicroelectronics nor the names of its contributors
-  *      may be used to endorse or promote products derived from this software
-  *      without specific prior written permission.
-  *
-  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
-  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
-  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
-  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
-  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-  *
-  ******************************************************************************
-  */
+ ******************************************************************************
+ * @file    l6474_class.h
+ * @author  Davide Aliprandi, STMicrolectronics
+ * @version V1.0.0
+ * @date    October 14th, 2015
+ * @brief   This file contains the class of an L6474 Motor Control component.
+ ******************************************************************************
+ * @attention
+ *
+ * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *   1. Redistributions of source code must retain the above copyright notice,
+ *      this list of conditions and the following disclaimer.
+ *   2. Redistributions in binary form must reproduce the above copyright notice,
+ *      this list of conditions and the following disclaimer in the documentation
+ *      and/or other materials provided with the distribution.
+ *   3. Neither the name of STMicroelectronics nor the names of its contributors
+ *      may be used to endorse or promote products derived from this software
+ *      without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+ * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+ * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ ******************************************************************************
+ */
 
 
 /* Generated with Stm32CubeTOO -----------------------------------------------*/
@@ -78,7 +77,8 @@
 
 /* Classes -------------------------------------------------------------------*/
 
-/** Class representing a L6474 component.
+/**
+ * @brief Class representing an L6474 component.
  */
 class L6474 : public StepperMotor
 {
@@ -843,19 +843,25 @@
 
     /*** Component's Instance Variables ***/
 
-    /* Identity */
-    uint8_t who_am_i;
-
     /* ACTION 9 --------------------------------------------------------------*
-     * There should be only a unique identifier for each component, which     *
-     * should be the "who_am_i" parameter, hence this parameter is optional.  *
+     * Declare here interrupt related variables, if needed.                   *
+     * Note that interrupt handling is platform dependent, see                *
+     * "Interrupt Related Methods" above.                                     *
+     *                                                                        *
+     * Example:                                                               *
+     *   + mbed:                                                              *
+     *     InterruptIn feature_irq;                                           *
      *------------------------------------------------------------------------*/
-    /* Type. */
-    uint8_t type;
-
     /* Flag Interrupt. */
     InterruptIn flag_irq;
-    
+
+    /* ACTION 10 -------------------------------------------------------------*
+     * Declare here other pin related variables, if needed.                   *
+     *                                                                        *
+     * Example:                                                               *
+     *   + mbed:                                                              *
+     *     DigitalOut standby_reset;                                          *
+     *------------------------------------------------------------------------*/
     /* Standby/reset pin. */
     DigitalOut standby_reset;
 
@@ -865,36 +871,41 @@
     /* Pulse Width Modulation pin. */
     PwmOut pwm;
 
+    /* Timer to trigger the PWM callback at each PWM pulse. */
+    Ticker ticker;
+
+    /* ACTION 11 -------------------------------------------------------------*
+     * Declare here communication related variables, if needed.               *
+     *                                                                        *
+     * Example:                                                               *
+     *   + mbed:                                                              *
+     *     DigitalOut ssel;                                                   *
+     *     DevSPI &dev_spi;                                                   *
+     *------------------------------------------------------------------------*/
     /* Configuration. */
     DigitalOut ssel;
 
     /* IO Device. */
     DevSPI &dev_spi;
 
-    /* Timer to trigger the PWM callback at each PWM pulse. */
-    Ticker ticker;
+    /* ACTION 12 -------------------------------------------------------------*
+     * Declare here identity related variables, if needed.                    *
+     * Note that there should be only a unique identifier for each component, *
+     * which should be the "who_am_i" parameter.                              *
+     *------------------------------------------------------------------------*/
+    /* Identity */
+    uint8_t who_am_i;
 
-    /* Interrupts. */
-    /* ACTION 10 -------------------------------------------------------------*
-     * Put here interrupt related objects, if needed.                         *
-     * Note that interrupt handling is platform dependent, see                *
-     * "Interrupt Related Methods" above.                                     *
+    /* ACTION 13 -------------------------------------------------------------*
+     * Declare here the component's static and non-static data, one variable  *
+     * per line.                                                              *
      *                                                                        *
      * Example:                                                               *
-     *   + mbed:                                                              *
-     *     InterruptIn feature_int;                                           *
+     *   float measure;                                                       *
+     *   int instance_id;                                                     *
+     *   static int number_of_instances;                                      *
      *------------------------------------------------------------------------*/
-
     /* Data. */
-    /* ACTION 11 -------------------------------------------------------------*
-     * Declare here the component's data, one variable per line.              *
-     *                                                                        *
-     * Example:                                                               *
-     *   int T0_out;                                                          *
-     *   int T1_out;                                                          *
-     *   float T0_degC;                                                       *
-     *   float T1_degC;                                                       *
-     *------------------------------------------------------------------------*/
     void (*errorHandlerCallback)(uint16_t error);
     deviceParams_t devicePrm;
     uint8_t deviceInstance;