Browse Source

Match up write_data signatures

Scott Lahteine 4 years ago
parent
commit
18c9182903

+ 1
- 1
Marlin/src/HAL/HAL_LINUX/persistent_store_impl.cpp View File

@@ -61,7 +61,7 @@ bool PersistentStore::access_finish() {
61 61
   return true;
62 62
 }
63 63
 
64
-bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
64
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
65 65
   std::size_t bytes_written = 0;
66 66
 
67 67
   for (std::size_t i = 0; i < size; i++) {

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/persistent_store_sdcard.cpp View File

@@ -125,7 +125,7 @@ static void debug_rw(const bool write, int &pos, const uint8_t *value, const siz
125 125
 //    FR_INVALID_PARAMETER     /* (19) Given parameter is invalid */
126 126
 //  } FRESULT;
127 127
 
128
-bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
128
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
129 129
   if (!eeprom_file_open) return true;
130 130
   FRESULT s;
131 131
   UINT bytes_written = 0;

+ 1
- 1
Marlin/src/HAL/HAL_STM32/persistent_store_sdcard.cpp View File

@@ -80,7 +80,7 @@ static char _ALIGN(4) HAL_eeprom_data[HAL_EEPROM_SIZE];
80 80
 
81 81
 #endif // !SDSUPPORT
82 82
 
83
-bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
83
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
84 84
   for (size_t i = 0; i < size; i++)
85 85
     HAL_eeprom_data[pos + i] = value[i];
86 86
   crc16(crc, value, size);

+ 1
- 1
Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp View File

@@ -55,7 +55,7 @@ bool PersistentStore::access_finish() {
55 55
   return true;
56 56
 }
57 57
 
58
-bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
58
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
59 59
   FLASH_Status status;
60 60
 
61 61
   if (firstWrite) {

+ 1
- 1
Marlin/src/HAL/HAL_STM32F1/persistent_store_sdcard.cpp View File

@@ -80,7 +80,7 @@ static char _ALIGN(4) HAL_eeprom_data[HAL_EEPROM_SIZE];
80 80
 
81 81
 #endif // !SDSUPPORT
82 82
 
83
-bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
83
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
84 84
   for (size_t i = 0; i < size; i++)
85 85
     HAL_eeprom_data[pos + i] = value[i];
86 86
   crc16(crc, value, size);

+ 2
- 2
Marlin/src/HAL/HAL_TEENSY31_32/persistent_store_impl.cpp View File

@@ -27,7 +27,7 @@
27 27
 bool PersistentStore::access_start() { return true; }
28 28
 bool PersistentStore::access_finish() { return true; }
29 29
 
30
-bool PersistentStore::write_data(int &pos, const uint8_t *value, uint16_t size, uint16_t *crc) {
30
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
31 31
   while (size--) {
32 32
     uint8_t * const p = (uint8_t * const)pos;
33 33
     uint8_t v = *value;
@@ -47,7 +47,7 @@ bool PersistentStore::write_data(int &pos, const uint8_t *value, uint16_t size,
47 47
   return false;
48 48
 }
49 49
 
50
-bool PersistentStore::read_data(int &pos, uint8_t* value, uint16_t size, uint16_t *crc, const bool writing/*=true*/) {
50
+bool PersistentStore::read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing/*=true*/) {
51 51
   do {
52 52
     uint8_t c = eeprom_read_byte((uint8_t*)pos);
53 53
     if (writing) *value = c;

Loading…
Cancel
Save