Fix return error
This commit is contained in:
parent
bf4f3aaa81
commit
5b884a50e2
@ -55,18 +55,19 @@ config_t read_struct_from_EEPROM(){
|
||||
// checks if EEPROM is ready
|
||||
// If the dataset is 1, the datapoint is written at the address.
|
||||
// If the dataset is 2 its written at another point.
|
||||
void write_data_point_in_EEPROM(uint8_t byte, uint8_t fan_num){
|
||||
int write_data_point_in_EEPROM(uint8_t byte, uint8_t fan_num){
|
||||
|
||||
check_eeprom_is_ready();
|
||||
if (fan_num == 1){
|
||||
eeprom_update_byte(current_address_fan1, byte);
|
||||
current_address_fan1++;
|
||||
return 1;
|
||||
} else if (fan_num == 2){
|
||||
eeprom_update_byte(current_address_fan2, byte);
|
||||
current_address_fan2++;
|
||||
return 1;
|
||||
} else{
|
||||
// error???
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ void write_struct_from_EEPROM(config_t write_struct);
|
||||
config_t read_struct_from_EEPROM();
|
||||
|
||||
// Writes a datapoint in EEPROM
|
||||
void write_data_point_from_EEPROM(uint8_t byte, uint8_t fan_num);
|
||||
int write_data_point_from_EEPROM(uint8_t byte, uint8_t fan_num);
|
||||
|
||||
// Reads all the dataPoints form EEPROM
|
||||
uint8_t read_data_point_speed_info(uint8_t fan_num, uint8_t *array);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user