foc.h 654 B

123456789101112131415161718192021222324
  1. #ifndef _FOC_H__
  2. #define _FOC_H__
  3. #include "foc/foc_type.h"
  4. void foc_init(void);
  5. void foc_clear(void);
  6. void set_dq_voltage(float d_v, float q_v);
  7. void foc_pwm_start(bool start);
  8. FError foc_start_motor(void);
  9. FError foc_stop_motor(void);
  10. int foc_hall_detect(float current, u16 *hall_table);
  11. void foc_overide_theta(bool enable);
  12. void foc_overide_vdq(bool enable);
  13. void foc_overide_set_theta(float theta);
  14. void foc_overide_set_vdq(float d, float q);
  15. FError FOC_STM_NextState(FOCState s);
  16. void Foc_Set_StartRamp(float final, u32 duration_ms);
  17. FOCState FOC_STM_State(void);
  18. void foc_current_calibrate(void);
  19. u32 foc_get_speed(void);
  20. #endif /* _FOC_H__ */