nv_storage.h 628 B

12345678910111213141516171819202122232425262728
  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. u16 hall_table[8];
  12. op_cali_t phase_op[3]; /* 三相电流采集的校准系数 */
  13. u16 crc16;
  14. }mc_config_t;
  15. #pragma pack(pop)
  16. mc_config_t *mc_config_get(void);
  17. void config_set_hall_offset(s16 offset);
  18. void store_config(void);
  19. void restore_config(void);
  20. void store_hall_table(u16 *hall_table);
  21. void store_hall_offset(s16 offset);
  22. #endif /* _NV_Storage_H__ */