Bring STM32F4/F7 together

This commit is contained in:
Scott Lahteine
2019-07-09 23:54:34 -05:00
parent cf9ac4c847
commit ad1c061e7b
49 changed files with 197 additions and 1905 deletions

View File

@ -49,10 +49,10 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, ui
return false;
}
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool set/*=true*/) {
bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
do {
uint8_t c = eeprom_read_byte((uint8_t*)pos);
if (set && value) *value = c;
if (writing && value) *value = c;
crc16(crc, &c, 1);
pos++;
value++;