| 123456789101112131415161718192021222324252627282930313233 |
- #ifndef _FOC_API_H__
- #define _FOC_API_H__
- #include "foc/foc_type.h"
- void foc_init(void);
- void foc_clear(void);
- void foc_open_loop(void);
- void set_dq_voltage(float d_v, float q_v);
- void foc_pwm_start(bool start);
- foc_fault_t foc_start_motor(void);
- foc_fault_t foc_stop_motor(void);
- int foc_hall_detect(float current, u16 *hall_table);
- void foc_set_dq_command(float d, float q);
- /*
- void foc_overide_theta(bool enable);
- void foc_overide_vdq(bool enable);
- void foc_overide_set_theta(float theta);
- void foc_overide_set_vdq(float d, float q);
- */
- void foc_set_voltage_ramp(float final);
- void foc_set_speed_ramp(u16 rpm);
- //void foc_set_start_ramp(float v);
- void foc_current_calibrate(void);
- u32 foc_get_speed(void);
- float foc_get_vbus_voltage(void);
- bool foc_is_ready(void);
- foc_fault_t foc_set_ready(bool ready);
- void foc_set_ref_speed(u16 rpm);
- float speed_to_voltage(u16 rpm);
- float speed_to_current(u16 rpm);
- #endif /* _FOC_API_H__ */
|