瀏覽代碼

Match up write_data signatures

Scott Lahteine 4 年之前
父節點
當前提交
18c9182903

+ 1
- 1
Marlin/src/HAL/HAL_LINUX/persistent_store_impl.cpp 查看文件

61
   return true;
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
   std::size_t bytes_written = 0;
65
   std::size_t bytes_written = 0;
66
 
66
 
67
   for (std::size_t i = 0; i < size; i++) {
67
   for (std::size_t i = 0; i < size; i++) {

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/persistent_store_sdcard.cpp 查看文件

125
 //    FR_INVALID_PARAMETER     /* (19) Given parameter is invalid */
125
 //    FR_INVALID_PARAMETER     /* (19) Given parameter is invalid */
126
 //  } FRESULT;
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
   if (!eeprom_file_open) return true;
129
   if (!eeprom_file_open) return true;
130
   FRESULT s;
130
   FRESULT s;
131
   UINT bytes_written = 0;
131
   UINT bytes_written = 0;

+ 1
- 1
Marlin/src/HAL/HAL_STM32/persistent_store_sdcard.cpp 查看文件

80
 
80
 
81
 #endif // !SDSUPPORT
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
   for (size_t i = 0; i < size; i++)
84
   for (size_t i = 0; i < size; i++)
85
     HAL_eeprom_data[pos + i] = value[i];
85
     HAL_eeprom_data[pos + i] = value[i];
86
   crc16(crc, value, size);
86
   crc16(crc, value, size);

+ 1
- 1
Marlin/src/HAL/HAL_STM32F1/persistent_store_flash.cpp 查看文件

55
   return true;
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
   FLASH_Status status;
59
   FLASH_Status status;
60
 
60
 
61
   if (firstWrite) {
61
   if (firstWrite) {

+ 1
- 1
Marlin/src/HAL/HAL_STM32F1/persistent_store_sdcard.cpp 查看文件

80
 
80
 
81
 #endif // !SDSUPPORT
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
   for (size_t i = 0; i < size; i++)
84
   for (size_t i = 0; i < size; i++)
85
     HAL_eeprom_data[pos + i] = value[i];
85
     HAL_eeprom_data[pos + i] = value[i];
86
   crc16(crc, value, size);
86
   crc16(crc, value, size);

+ 2
- 2
Marlin/src/HAL/HAL_TEENSY31_32/persistent_store_impl.cpp 查看文件

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, uint16_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;
47
   return false;
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
   do {
51
   do {
52
     uint8_t c = eeprom_read_byte((uint8_t*)pos);
52
     uint8_t c = eeprom_read_byte((uint8_t*)pos);
53
     if (writing) *value = c;
53
     if (writing) *value = c;

Loading…
取消
儲存