AVR based brushless motor controller
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
656 B

  1. #ifndef _EEPROM_PARAMETERS_H_
  2. #define _EEPROM_PARAMETERS_H_
  3. struct ee_param {
  4. uint16_t spinup_ticks;
  5. uint8_t spinup_tick;
  6. uint8_t spinup_step;
  7. uint8_t spinup_wait;
  8. uint8_t spinup_pwm;
  9. uint8_t pwm_min;
  10. uint8_t pwm_max;
  11. uint16_t current_limit;
  12. uint16_t current_max;
  13. uint16_t voltage_min;
  14. uint16_t crc16;
  15. };
  16. #define DEFAULT_PARAMETERS { \
  17. .spinup_ticks = 1000, \
  18. .spinup_tick = 25, \
  19. .spinup_step = 24, \
  20. .spinup_wait = 10, \
  21. .spinup_pwm = 0x0f, \
  22. .pwm_min = 0x08, \
  23. .pwm_max = 0xff, \
  24. .current_limit = 120, \
  25. .current_max = 0x3ff, \
  26. .voltage_min = 0x000, \
  27. };
  28. uint8_t read_parameters(void);
  29. void write_parameters(void);
  30. #endif