limit.h 399 B

1234567891011121314151617181920212223
  1. #ifndef _Limit_H__
  2. #define _Limit_H__
  3. #include "os/os_types.h"
  4. #define HW_LIMIT_NONE ((u16)0x7FFF)
  5. typedef struct {
  6. u16 limit_value;
  7. s16 enter_pointer;
  8. s16 exit_pointer;
  9. u32 ticks;
  10. bool is_limit;
  11. }limter_t;
  12. typedef enum {
  13. type_phase,
  14. type_idc,
  15. }limit_type;
  16. u16 motor_temp_high_limit(limit_type type);
  17. u16 mos_temp_high_limit(void);
  18. u16 vbus_under_vol_limit(void);
  19. #endif /* _Limit_H__ */