]> rtime.felk.cvut.cz Git - fpga/rpi-motor-control.git/commitdiff
Setters made inline.
authorMartin Prudek <prudemar@fel.cvut.cz>
Wed, 20 May 2015 19:19:30 +0000 (21:19 +0200)
committerMartin Prudek <prudemar@fel.cvut.cz>
Wed, 20 May 2015 19:19:30 +0000 (21:19 +0200)
pmsm-control/test_sw/pmsm_state.c
pmsm-control/test_sw/pmsm_state.h

index 972149047da598c47fcf58ee2cafca7458667f0b..3938dc7a9f60726e88408d5da742bb4de45c122c 100644 (file)
@@ -4,7 +4,7 @@
 /**
  * Index Lost.
  */
-void setIndexLost(struct rpi_state* this){
+inline void setIndexLost(struct rpi_state* this){
        this->index_ok=0;
        this->main_commutator=simple_hall_commutator;
 }
@@ -12,7 +12,7 @@ void setIndexLost(struct rpi_state* this){
 /**
  * Index OK.
  */
-void setIndexOK(struct rpi_state* this){
+inline void setIndexOK(struct rpi_state* this){
        this->index_ok=1;
        this->main_commutator=inv_trans_comm_2;
 }
@@ -20,7 +20,7 @@ void setIndexOK(struct rpi_state* this){
 /**
  * Turn commutation on.
  */
-void setCommutationOn(struct rpi_state* this){
+inline void setCommutationOn(struct rpi_state* this){
        this->commutate=1;
        if (this->index_ok){
                this->main_commutator=inv_trans_comm_2;
@@ -32,7 +32,7 @@ void setCommutationOn(struct rpi_state* this){
 /**
  * Turn commutation off.
  */
-void setCommutationOff(struct rpi_state* this){
+inline void setCommutationOff(struct rpi_state* this){
        this->commutate=0;
        this->main_commutator=zero_commutator;
 }
index 376e2f8482e779a75f22960a6583a81dd5556952..b1946a653b2a0bfd07aa797cef97be942089bb23 100644 (file)
@@ -54,21 +54,21 @@ struct rpi_state{
 /**
  * Index OK.
  */
-void setIndexOK(struct rpi_state*);
+inline void setIndexOK(struct rpi_state*);
 
 /**
  * Index Lost.
  */
-void setIndexLost(struct rpi_state*);
+inline void setIndexLost(struct rpi_state*);
 
 /**
  * Turn commutation on.
  */
-void setCommutationOn(struct rpi_state*);
+inline void setCommutationOn(struct rpi_state*);
 
 /**
  * Turn commutation off.
  */
-void setCommutationOff(struct rpi_state*);
+inline void setCommutationOff(struct rpi_state*);
 
 #endif /*PMSM_STATE*/