]> rtime.felk.cvut.cz Git - fpga/rpi-motor-control.git/blob - pmsm-control/test_sw/pmsm_state.h
5f63acff8f958a678f4f8e069544edd3c39774ea
[fpga/rpi-motor-control.git] / pmsm-control / test_sw / pmsm_state.h
1 #ifndef PMSM_STATE
2 #define PMSM_STATE
3
4 #include <stdint.h>
5 #include <semaphore.h>
6
7
8 struct rpi_state{
9         sem_t thd_par_sem;
10         uint8_t test;
11         uint16_t pwm1, pwm2, pwm3;
12         uint16_t t_pwm1, t_pwm2, t_pwm3;
13         char commutate;
14         int duty;                       /* duty cycle of pwm */
15         uint16_t index_dist;            /* distance to index position */
16         unsigned char index_ok;
17         uint32_t tf_count;              /*number of transfer*/
18         int desired_pos;                /* desired position */
19 }rps;
20
21 #endif /*PMSM_STATE*/