Davide Aliprandi / X_NUCLEO_IHM03A1

Dependencies:   ST_INTERFACES X_NUCLEO_COMMON

Fork of X_NUCLEO_IHM03A1 by ST

Revision:
2:06f3a5360a45
Parent:
1:8ce2a5d6fbf8
--- a/Components/powerstep01/powerstep01_class.cpp	Thu Apr 07 16:11:47 2016 +0000
+++ b/Components/powerstep01/powerstep01_class.cpp	Wed Apr 13 12:55:45 2016 +0000
@@ -708,16 +708,16 @@
   {
     // Current mode
         Powerstep01_CmdSetParam(POWERSTEP01_TVAL_HOLD,
-          Tval_Current_to_RegVal(
+          Tval_RefVoltage_to_RegVal(
             initPrm->cm.tvalHold));
         Powerstep01_CmdSetParam(POWERSTEP01_TVAL_RUN,
-          Tval_Current_to_RegVal(
+          Tval_RefVoltage_to_RegVal(
             initPrm->cm.tvalRun));
         Powerstep01_CmdSetParam(POWERSTEP01_TVAL_ACC,
-          Tval_Current_to_RegVal(
+          Tval_RefVoltage_to_RegVal(
             initPrm->cm.tvalAcc));
         Powerstep01_CmdSetParam(POWERSTEP01_TVAL_DEC,
-          Tval_Current_to_RegVal(
+          Tval_RefVoltage_to_RegVal(
             initPrm->cm.tvalDec));
         Powerstep01_CmdSetParam(POWERSTEP01_T_FAST,
           (uint8_t)initPrm->cm.toffFast|
@@ -842,16 +842,16 @@
       {
         // Current mode
         Powerstep01_CmdSetParam(POWERSTEP01_TVAL_HOLD,
-          Tval_Current_to_RegVal(
+          Tval_RefVoltage_to_RegVal(
             POWERSTEP01_CONF_PARAM_TVAL_HOLD_DEVICE_0));
         Powerstep01_CmdSetParam(POWERSTEP01_TVAL_RUN,
-          Tval_Current_to_RegVal(
+          Tval_RefVoltage_to_RegVal(
             POWERSTEP01_CONF_PARAM_TVAL_RUN_DEVICE_0));
         Powerstep01_CmdSetParam(POWERSTEP01_TVAL_ACC,
-          Tval_Current_to_RegVal(
+          Tval_RefVoltage_to_RegVal(
             POWERSTEP01_CONF_PARAM_TVAL_ACC_DEVICE_0));
         Powerstep01_CmdSetParam(POWERSTEP01_TVAL_DEC,
-          Tval_Current_to_RegVal(
+          Tval_RefVoltage_to_RegVal(
             POWERSTEP01_CONF_PARAM_TVAL_DEC_DEVICE_0));
         Powerstep01_CmdSetParam(POWERSTEP01_T_FAST,
           (uint8_t)POWERSTEP01_CONF_PARAM_TOFF_FAST_DEVICE_0 |
@@ -956,16 +956,16 @@
       {
         // Current mode
         Powerstep01_CmdSetParam(POWERSTEP01_TVAL_HOLD,
-          Tval_Current_to_RegVal(
+          Tval_RefVoltage_to_RegVal(
             POWERSTEP01_CONF_PARAM_TVAL_HOLD_DEVICE_1));
         Powerstep01_CmdSetParam(POWERSTEP01_TVAL_RUN,
-          Tval_Current_to_RegVal(
+          Tval_RefVoltage_to_RegVal(
             POWERSTEP01_CONF_PARAM_TVAL_RUN_DEVICE_1));
         Powerstep01_CmdSetParam(POWERSTEP01_TVAL_ACC,
-          Tval_Current_to_RegVal(
+          Tval_RefVoltage_to_RegVal(
             POWERSTEP01_CONF_PARAM_TVAL_ACC_DEVICE_1));
         Powerstep01_CmdSetParam(POWERSTEP01_TVAL_DEC,
-          Tval_Current_to_RegVal(
+          Tval_RefVoltage_to_RegVal(
             POWERSTEP01_CONF_PARAM_TVAL_DEC_DEVICE_1));
         Powerstep01_CmdSetParam(POWERSTEP01_T_FAST,
           (uint8_t)POWERSTEP01_CONF_PARAM_TOFF_FAST_DEVICE_1 |
@@ -1071,16 +1071,16 @@
       {
         // Current mode
         Powerstep01_CmdSetParam(POWERSTEP01_TVAL_HOLD,
-          Tval_Current_to_RegVal(
+          Tval_RefVoltage_to_RegVal(
             POWERSTEP01_CONF_PARAM_TVAL_HOLD_DEVICE_2));
         Powerstep01_CmdSetParam(POWERSTEP01_TVAL_RUN,
-          Tval_Current_to_RegVal(
+          Tval_RefVoltage_to_RegVal(
             POWERSTEP01_CONF_PARAM_TVAL_RUN_DEVICE_2));
         Powerstep01_CmdSetParam(POWERSTEP01_TVAL_ACC,
-          Tval_Current_to_RegVal(
+          Tval_RefVoltage_to_RegVal(
             POWERSTEP01_CONF_PARAM_TVAL_ACC_DEVICE_2));
         Powerstep01_CmdSetParam(POWERSTEP01_TVAL_DEC,
-          Tval_Current_to_RegVal(
+          Tval_RefVoltage_to_RegVal(
             POWERSTEP01_CONF_PARAM_TVAL_DEC_DEVICE_2));
         Powerstep01_CmdSetParam(POWERSTEP01_T_FAST,
           (uint8_t)POWERSTEP01_CONF_PARAM_TOFF_FAST_DEVICE_2 |
@@ -1535,7 +1535,7 @@
       if (voltageMode==FALSE)
       {
         if (value > POWERSTEP01_TVAL_MAX_VALUE) result = FALSE;
-        else registerValue = Tval_Current_to_RegVal(value);
+        else registerValue = Tval_RefVoltage_to_RegVal(value);
       }
       else
       {