nv_storage.h 532 B

12345678910111213141516171819202122232425
  1. #ifndef _NV_Storage_H__
  2. #define _NV_Storage_H__
  3. #include "os/os_type.h"
  4. #pragma pack (push,1)
  5. typedef struct {
  6. int op_i_k; /* 斜率 */
  7. int op_i_offset; /* 截距 */
  8. }op_cali_t;
  9. typedef struct {
  10. s16 hall_offset; /* hall 和A相之间的电角度偏移量 */
  11. op_cali_t phase_op[3]; /* 三相电流采集的校准系数 */
  12. u16 crc16;
  13. }mc_config_t;
  14. #pragma pack(pop)
  15. mc_config_t *mc_config_get(void);
  16. void config_set_hall_offset(s16 offset);
  17. void store_config(void);
  18. void restore_config(void);
  19. #endif /* _NV_Storage_H__ */