blmc/eeprom.h

42 lines
673 B
C
Raw Permalink 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 { \
2011-01-25 13:43:30 +01:00
.spinup_ticks = 2000, \
.spinup_tick = 24, \
.spinup_step = 4, \
2008-02-17 21:38:56 +01:00
.spinup_wait = 10, \
2011-01-25 13:43:30 +01:00
.spinup_pwm = 25, \
2008-02-17 21:38:56 +01:00
.pwm_min = 0x08, \
.pwm_max = 0xff, \
.current_limit = 120, \
.current_max = 0x3ff, \
.voltage_min = 0x000, \
2011-01-25 13:43:30 +01:00
.crc16 = 0xDB76, \
2008-02-17 21:38:56 +01:00
};
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