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:
26:e2049a15fb15
Parent:
23:58264db10a17
--- a/Components/l6474/l6474_class.h	Wed May 24 10:01:11 2017 +0000
+++ b/Components/l6474/l6474_class.h	Wed May 24 13:49:40 2017 +0000
@@ -95,7 +95,7 @@
      * @param ssel          pin name of the SSEL pin of the SPI device to be used for communication.
      * @param spi           SPI device to be used for communication.
      */
-    L6474(PinName flag_irq, PinName standby_reset, PinName direction, PinName pwm, PinName ssel, DevSPI &spi) : StepperMotor(), flag_irq(flag_irq), standby_reset(standby_reset), direction(direction), pwm(pwm), ssel(ssel), dev_spi(spi)
+    L6474(PinName flag_irq, PinName standby_reset, PinName ssel, DevSPI &spi) : StepperMotor(), flag_irq(flag_irq), standby_reset(standby_reset), ssel(ssel), dev_spi(spi)
     {
         /* Checking stackability. */
         if (!(number_of_devices < MAX_NUMBER_OF_DEVICES))
@@ -842,14 +842,14 @@
     void L6474_PwmSetFreq(uint16_t frequency)
     {
         /* Computing the period of PWM. */
-        double period = 1.0f / frequency;
-        
-        /* Setting the period and the duty-cycle of PWM. */
-        pwm.period(period);
-        pwm.write(0.5f);
+        //double period = 1.0f / frequency;
+        //
+        ///* Setting the period and the duty-cycle of PWM. */
+        //pwm.period(period);
+        //pwm.write(0.5f);
 
-        /* Setting a callback with the same period of PWM's, to update the state machine. */
-        ticker.attach(this, &L6474::L6474_StepClockHandler, period);
+        ///* Setting a callback with the same period of PWM's, to update the state machine. */
+        //ticker.attach(this, &L6474::L6474_StepClockHandler, period);
     }
 
     /**
@@ -859,8 +859,8 @@
      */
     void L6474_PwmStop(void)
     {
-        pwm.write(0.0f);
-        ticker.detach();
+        //pwm.write(0.0f);
+        //ticker.detach();
     }
 
     /**
@@ -890,7 +890,6 @@
      */
     void L6474_SetDirectionGpio(uint8_t gpioState)
     {
-        direction = gpioState;
     }
 
     /**
@@ -929,14 +928,8 @@
     /* Standby/reset pin. */
     DigitalOut standby_reset;
 
-    /* Direction of rotation pin. */
-    DigitalOut direction;
-
-    /* Pulse Width Modulation pin. */
-    PwmOut pwm;
-
     /* Timer to trigger the PWM callback at each PWM pulse. */
-    Ticker ticker;
+    //Ticker ticker;
 
     /* ACTION 11 -------------------------------------------------------------*
      * Declare here communication related variables, if needed.               *