motor.h 482 B

12345678910111213141516171819202122232425
  1. #ifndef _MOTOR_H__
  2. #define _MOTOR_H__
  3. #include "os/os_types.h"
  4. #include "foc/core/PMSM_FOC_Core.h"
  5. typedef struct {
  6. bool b_start;
  7. float throttle;
  8. bool b_ignor_throttle;
  9. s16 s_testAngle;
  10. s32 s_targetFix;
  11. }motor_t;
  12. void mc_init(void);
  13. bool mc_start(u8 mode);
  14. bool mc_stop(void);
  15. void mc_hall_calibrate(s16 vd);
  16. bool mc_throttle_released(void);
  17. bool mc_lock_motor(bool lock);
  18. void mc_set_spd_torque(s32 target);
  19. void mc_use_throttle(void);
  20. #endif /* _MOTOR_H__ */