]> rtime.felk.cvut.cz Git - fpga/rpi-motor-control.git/blob - pmsm-control/test_sw/pmsm_state.h
Correction of position of subroutines.
[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 struct rpi_in;
8
9 struct rpi_state{
10         struct rpi_in* spi_dat;
11         sem_t thd_par_sem;
12         uint8_t test;
13         uint16_t pwm1, pwm2, pwm3;
14         uint16_t t_pwm1, t_pwm2, t_pwm3;
15         char commutate;
16         int duty;                       /* duty cycle of pwm */
17         uint16_t index_dist;            /* distance to index position */
18         unsigned char index_ok;
19         uint32_t tf_count;              /*number of transfer*/
20         int desired_pos;                /* desired position */
21 };
22
23 #endif /*PMSM_STATE*/