LPS mod

Revision:
7:2ff9788e2827
Parent:
6:7ca2eef852fd
--- a/lib_L6470DC.h	Fri Apr 01 11:38:25 2022 +0000
+++ b/lib_L6470DC.h	Mon May 02 13:07:52 2022 +0000
@@ -183,6 +183,24 @@
     uint16_t  STATUS;                 //!< Status Register
 } StepperMotorRegister;
 
+typedef enum {
+    HiZ_ID = 0,                       //!< HiZ flag identifier inside the L6470 Status Register
+    BUSY_ID,                          //!< BUSY flag identifier inside the L6470 Status Register
+    SW_F_ID,                          //!< SW_F flag identifier inside the L6470 Status Register
+    SW_EVN_ID,                        //!< SW_EVN flag identifier inside the L6470 Status Register
+    DIR_ID,                           //!< DIR flag identifier inside the L6470 Status Register
+    MOT_STATUS_ID,                    //!< MOT_STATUS flag identifier inside the L6470 Status Register
+    NOTPERF_CMD_ID,                   //!< NOTPERF_CMD flag identifier inside the L6470 Status Register
+    WRONG_CMD_ID,                     //!< WRONG_CMD flag identifier inside the L6470 Status Register
+    UVLO_ID,                          //!< UVLO flag identifier inside the L6470 Status Register
+    TH_WRN_ID,                        //!< TH_WRN flag identifier inside the L6470 Status Register
+    TH_SD_ID,                         //!< TH_SD flag identifier inside the L6470 Status Register
+    OCD_ID,                           //!< OCD flag identifier inside the L6470 Status Register
+    STEP_LOSS_A_ID,                   //!< STEP_LOSS_A flag identifier inside the L6470 Status Register
+    STEP_LOSS_B_ID,                   //!< STEP_LOSS_B flag identifier inside the L6470 Status Register
+    SCK_MOD_ID                        //!< SCK_MOD flag identifier inside the L6470 Status Register
+} FlagId_t;
+
 class L6470DC
 {
 public:
@@ -194,7 +212,7 @@
     void NOP(unsigned char nMOT);
     void SetParam(unsigned char nMOT,L6470_Register param,int value);
     int  GetParam(unsigned char nMOT,L6470_Register param);
-    void Run(unsigned char nMOT,unsigned char dir,int spd);
+    void Run(unsigned char nMOT,unsigned char dir,float spd);
     void StepClock(unsigned char nMOT,unsigned char dir);
     void Move(unsigned char nMOT,unsigned char dir,int n_step);
     void GoTo(unsigned char nMOT,int abs_pos);
@@ -215,6 +233,7 @@
     int GetPosition(int nMOT);
     int GetMark(int nMOT);
     int GetSpeed(int nMOT);
+    int GetStatus(int nMOT, FlagId_t FlagId);
     void SetHome(int nMOT);
     void SetMaxSpeed(int nMOT, int speed);
     void SetMark(int nMOT, int mark);