--- /dev/null
+#ifndef PMSM_STATE
+#define PMSM_STATE
+
+#include <stdint.h>
+#include <semaphore.h>
+
+
+struct rpi_state{
+ sem_t thd_par_sem;
+ uint8_t test;
+ uint16_t pwm1, pwm2, pwm3;
+ uint16_t t_pwm1, t_pwm2, t_pwm3;
+ char commutate;
+ int duty; /* duty cycle of pwm */
+ uint16_t index_dist; /* distance to index position */
+ unsigned char index_ok;
+ uint32_t tf_count; /*number of transfer*/
+ int desired_pos; /* desired position */
+}rps;
+
+#endif /*PMSM_STATE*/