UBL able to generate mesh and save and load it on 32-bit platforms (#8015)
* Get UBL Mesh Generation, Mesh Save & Mesh Load working with 32-Bit platforms * clean up read_data() and write_data() for non-LPC1768 HAL's * Get read_data() and write_data() return codes consistent All HAL's read_data() and write_data() return false if they succeed. * Get read_data() and write_data() return codes to be consistent Make read_data() and write_data() return true if an error happens. * Say UBL is now checked out on machine types in default Configuration.h file.
This commit is contained in:
@ -78,15 +78,16 @@ bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
|
||||
}
|
||||
crc16(crc, value, size);
|
||||
pos += size;
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc) {
|
||||
bool read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc) {
|
||||
for (int i = 0; i < size; i++) {
|
||||
value[i] = HAL_STM32F1_eeprom_content [pos + i];
|
||||
}
|
||||
crc16(crc, value, size);
|
||||
pos += size;
|
||||
return false;
|
||||
}
|
||||
|
||||
} // PersistentStore::
|
||||
|
Reference in New Issue
Block a user