Open chunlin007 opened 1 year ago
The implementation of eeprom_init is unreasonable in https://github.com/deadsy/grbl_stm32f4/blob/a70dfca1467828aa3ed2150312247c298f79b76a/grbl/files/eeprom.c#L21 Here, the purpose of this operation is to set all bit of eeprom_data as 0xff, rather than only sizeof(EEPROM_LEN) bytes. A reasonble operation is memset(eeprom_data, 0xff, EEPROM_LEN);
memset(eeprom_data, 0xff, EEPROM_LEN);
Thanks. Fixed. btw- the code also inherited a buggy checksum calculation for the original grbl code. It doesn't matter here because it's a fake eeprom, but fyi.
The implementation of eeprom_init is unreasonable in https://github.com/deadsy/grbl_stm32f4/blob/a70dfca1467828aa3ed2150312247c298f79b76a/grbl/files/eeprom.c#L21 Here, the purpose of this operation is to set all bit of eeprom_data as 0xff, rather than only sizeof(EEPROM_LEN) bytes. A reasonble operation is
memset(eeprom_data, 0xff, EEPROM_LEN);