Browse Source

Revert errant const

Scott Lahteine 5 years ago
parent
commit
f2d93f61c3

+ 1
- 1
Marlin/src/HAL/HAL_DUE/persistent_store_eeprom.cpp View File

44
   return true;
44
   return true;
45
 }
45
 }
46
 
46
 
47
-bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
47
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
48
   while (size--) {
48
   while (size--) {
49
     uint8_t * const p = (uint8_t * const)pos;
49
     uint8_t * const p = (uint8_t * const)pos;
50
     uint8_t v = *value;
50
     uint8_t v = *value;

+ 1
- 1
Marlin/src/HAL/HAL_ESP32/persistent_store_spiffs.cpp View File

72
   return true;
72
   return true;
73
 }
73
 }
74
 
74
 
75
-bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
75
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
76
   if (!eeprom_file.seek(pos)) return true; // return true for any error
76
   if (!eeprom_file.seek(pos)) return true; // return true for any error
77
   if (eeprom_file.write(value, size) != size) return true;
77
   if (eeprom_file.write(value, size) != size) return true;
78
 
78
 

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

109
   return true;
109
   return true;
110
 }
110
 }
111
 
111
 
112
-bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
112
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
113
   for (size_t i = 0; i < size; i++) ram_eeprom[pos + i] = value[i];
113
   for (size_t i = 0; i < size; i++) ram_eeprom[pos + i] = value[i];
114
   eeprom_dirty = true;
114
   eeprom_dirty = true;
115
   crc16(crc, value, size);
115
   crc16(crc, value, size);

+ 1
- 1
Marlin/src/HAL/HAL_SAMD51/persistent_store_eeprom.cpp View File

58
   return true;
58
   return true;
59
 }
59
 }
60
 
60
 
61
-bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
61
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
62
   #if NONE(SPI_EEPROM, I2C_EEPROM)
62
   #if NONE(SPI_EEPROM, I2C_EEPROM)
63
     if (NVMCTRL->SEESTAT.bit.RLOCK)
63
     if (NVMCTRL->SEESTAT.bit.RLOCK)
64
       NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_USEE);    // Unlock E2P data write access
64
       NVMCTRL_CMD(NVMCTRL_CTRLB_CMD_USEE);    // Unlock E2P data write access

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

50
   return true;
50
   return true;
51
 }
51
 }
52
 
52
 
53
-bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
53
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
54
   while (size--) {
54
   while (size--) {
55
     uint8_t v = *value;
55
     uint8_t v = *value;
56
 
56
 

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

40
 }
40
 }
41
 bool PersistentStore::access_finish() { return true; }
41
 bool PersistentStore::access_finish() { return true; }
42
 
42
 
43
-bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
43
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
44
   while (size--) {
44
   while (size--) {
45
     uint8_t * const p = (uint8_t * const)pos;
45
     uint8_t * const p = (uint8_t * const)pos;
46
     uint8_t v = *value;
46
     uint8_t v = *value;

+ 1
- 1
Marlin/src/HAL/HAL_STM32_F4_F7/persistent_store_eeprom.cpp View File

32
 bool PersistentStore::access_start() { return true; }
32
 bool PersistentStore::access_start() { return true; }
33
 bool PersistentStore::access_finish() { return true; }
33
 bool PersistentStore::access_finish() { return true; }
34
 
34
 
35
-bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
35
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
36
   while (size--) {
36
   while (size--) {
37
     uint8_t * const p = (uint8_t * const)pos;
37
     uint8_t * const p = (uint8_t * const)pos;
38
     uint8_t v = *value;
38
     uint8_t v = *value;

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

27
 bool PersistentStore::access_start() { return true; }
27
 bool PersistentStore::access_start() { return true; }
28
 bool PersistentStore::access_finish() { return true; }
28
 bool PersistentStore::access_finish() { return true; }
29
 
29
 
30
-bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
30
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
31
   while (size--) {
31
   while (size--) {
32
     uint8_t * const p = (uint8_t * const)pos;
32
     uint8_t * const p = (uint8_t * const)pos;
33
     uint8_t v = *value;
33
     uint8_t v = *value;

+ 1
- 1
Marlin/src/HAL/HAL_TEENSY35_36/persistent_store_eeprom.cpp View File

33
 bool PersistentStore::access_start() { return true; }
33
 bool PersistentStore::access_start() { return true; }
34
 bool PersistentStore::access_finish() { return true; }
34
 bool PersistentStore::access_finish() { return true; }
35
 
35
 
36
-bool PersistentStore::write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc) {
36
+bool PersistentStore::write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc) {
37
   while (size--) {
37
   while (size--) {
38
     uint8_t * const p = (uint8_t * const)pos;
38
     uint8_t * const p = (uint8_t * const)pos;
39
     uint8_t v = *value;
39
     uint8_t v = *value;

+ 1
- 1
Marlin/src/HAL/shared/persistent_store_api.h View File

31
 public:
31
 public:
32
   static bool access_start();
32
   static bool access_start();
33
   static bool access_finish();
33
   static bool access_finish();
34
-  static bool write_data(int &pos, const uint8_t *value, const size_t size, uint16_t *crc);
34
+  static bool write_data(int &pos, const uint8_t *value, size_t size, uint16_t *crc);
35
   static bool read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing=true);
35
   static bool read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing=true);
36
   static size_t capacity();
36
   static size_t capacity();
37
 
37
 

Loading…
Cancel
Save