blmc/eeprom.h

41 lines
656 B
C
Raw Normal View History

2008-02-17 21:38:56 +01:00
#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, \
};
2008-02-19 14:52:02 +01:00
uint8_t read_parameters(void);
void write_parameters(void);
2008-02-17 21:38:56 +01:00
#endif