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.
 
 

40 lines
656 B

#ifndef _EEPROM_PARAMETERS_H_
#define _EEPROM_PARAMETERS_H_
struct ee_param {
uint16_t spinup_ticks;
uint8_t spinup_tick;
uint8_t spinup_step;
uint8_t spinup_wait;
uint8_t spinup_pwm;
uint8_t pwm_min;
uint8_t pwm_max;
uint16_t current_limit;
uint16_t current_max;
uint16_t voltage_min;
uint16_t crc16;
};
#define DEFAULT_PARAMETERS { \
.spinup_ticks = 1000, \
.spinup_tick = 25, \
.spinup_step = 24, \
.spinup_wait = 10, \
.spinup_pwm = 0x0f, \
.pwm_min = 0x08, \
.pwm_max = 0xff, \
.current_limit = 120, \
.current_max = 0x3ff, \
.voltage_min = 0x000, \
};
uint8_t read_parameters(void);
void write_parameters(void);
#endif