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:
Roxy-3D
2017-10-18 14:00:29 -05:00
committed by GitHub
parent 67cc29cd3c
commit 572cf0ec95
49 changed files with 157 additions and 273 deletions

View File

@ -28,17 +28,17 @@ bool write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
if (eeprom_read_byte(p) != v) {
SERIAL_ECHO_START();
SERIAL_ECHOLNPGM(MSG_ERR_EEPROM_WRITE);
return false;
return true;
}
}
crc16(crc, &v, 1);
pos++;
value++;
};
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) {
do {
uint8_t c = eeprom_read_byte((unsigned char*)pos);
*value = c;
@ -46,6 +46,7 @@ void read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc) {
pos++;
value++;
} while (--size);
return false; // always assume success for AVR's
}
}