Pārlūkot izejas kodu

Apply pointer formatting

Scott Lahteine 3 gadus atpakaļ
vecāks
revīzija
3b73b115ca
100 mainītis faili ar 358 papildinājumiem un 358 dzēšanām
  1. 4
    4
      Marlin/src/HAL/AVR/HAL_SPI.cpp
  2. 15
    15
      Marlin/src/HAL/DUE/HAL_SPI.cpp
  3. 7
    7
      Marlin/src/HAL/DUE/eeprom_flash.cpp
  4. 2
    2
      Marlin/src/HAL/DUE/usb/udi_cdc.h
  5. 1
    1
      Marlin/src/HAL/DUE/usb/usb_task.c
  6. 2
    2
      Marlin/src/HAL/ESP32/HAL_SPI.cpp
  7. 1
    1
      Marlin/src/HAL/ESP32/WebSocketSerial.cpp
  8. 2
    2
      Marlin/src/HAL/ESP32/WebSocketSerial.h
  9. 5
    5
      Marlin/src/HAL/LPC1768/HAL_SPI.cpp
  10. 1
    1
      Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp
  11. 2
    2
      Marlin/src/HAL/SAMD51/HAL_SPI.cpp
  12. 2
    2
      Marlin/src/HAL/STM32/HAL_SPI.cpp
  13. 1
    1
      Marlin/src/HAL/STM32/MarlinSerial.h
  14. 3
    3
      Marlin/src/HAL/STM32F1/HAL_SPI.cpp
  15. 2
    2
      Marlin/src/HAL/STM32F1/eeprom_flash.cpp
  16. 2
    2
      Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp
  17. 2
    2
      Marlin/src/HAL/TEENSY35_36/HAL_SPI.cpp
  18. 2
    2
      Marlin/src/HAL/TEENSY40_41/HAL_SPI.cpp
  19. 1
    1
      Marlin/src/HAL/shared/HAL_MinSerial.h
  20. 3
    3
      Marlin/src/HAL/shared/HAL_SPI.h
  21. 1
    1
      Marlin/src/HAL/shared/backtrace/backtrace.cpp
  22. 3
    3
      Marlin/src/HAL/shared/eeprom_api.h
  23. 1
    1
      Marlin/src/HAL/shared/eeprom_if_spi.cpp
  24. 2
    2
      Marlin/src/core/macros.h
  25. 3
    3
      Marlin/src/core/serial_base.h
  26. 5
    5
      Marlin/src/feature/binary_stream.h
  27. 1
    1
      Marlin/src/feature/meatpack.cpp
  28. 1
    1
      Marlin/src/feature/meatpack.h
  29. 7
    7
      Marlin/src/feature/mmu/mmu2.cpp
  30. 5
    5
      Marlin/src/feature/mmu/mmu2.h
  31. 5
    5
      Marlin/src/feature/runout.h
  32. 3
    3
      Marlin/src/gcode/queue.cpp
  33. 3
    3
      Marlin/src/gcode/queue.h
  34. 2
    2
      Marlin/src/lcd/HD44780/marlinui_HD44780.cpp
  35. 2
    2
      Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp
  36. 2
    2
      Marlin/src/lcd/dogm/marlinui_DOGM.cpp
  37. 3
    3
      Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp
  38. 2
    2
      Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp
  39. 2
    2
      Marlin/src/lcd/extui/lib/dgus/DGUSScreenHandler.cpp
  40. 3
    3
      Marlin/src/lcd/extui/lib/dgus/fysetc/DGUSScreenHandler.h
  41. 3
    3
      Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSScreenHandler.h
  42. 2
    2
      Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp
  43. 5
    5
      Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.h
  44. 3
    3
      Marlin/src/lcd/extui/lib/dgus/origin/DGUSScreenHandler.h
  45. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp
  46. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h
  47. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.cpp
  48. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.h
  49. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_list.h
  50. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp
  51. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.h
  52. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp
  53. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/marlin_events.cpp
  54. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.cpp
  55. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_user_request_alert_box.cpp
  56. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.cpp
  57. 1
    1
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.h
  58. 2
    2
      Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp
  59. 6
    6
      Marlin/src/lcd/extui/lib/mks_ui/SPIFlashStorage.cpp
  60. 6
    6
      Marlin/src/lcd/extui/lib/mks_ui/SPIFlashStorage.h
  61. 10
    10
      Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp
  62. 1
    1
      Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h
  63. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/pic_manager.cpp
  64. 2
    2
      Marlin/src/lcd/extui/lib/mks_ui/wifi_module.cpp
  65. 2
    2
      Marlin/src/lcd/extui/lib/nextion/nextion_tft.cpp
  66. 7
    7
      Marlin/src/lcd/extui/malyan_lcd.cpp
  67. 1
    1
      Marlin/src/lcd/lcdprint.h
  68. 2
    2
      Marlin/src/lcd/marlinui.h
  69. 3
    3
      Marlin/src/lcd/menu/menu.h
  70. 1
    1
      Marlin/src/lcd/tft/ui_320x240.cpp
  71. 2
    2
      Marlin/src/lcd/tft/ui_480x320.cpp
  72. 1
    1
      Marlin/src/lcd/tft/ui_common.cpp
  73. 5
    5
      Marlin/src/libs/W25Qxx.cpp
  74. 5
    5
      Marlin/src/libs/W25Qxx.h
  75. 2
    2
      Marlin/src/libs/softspi.h
  76. 5
    5
      Marlin/src/module/planner.cpp
  77. 3
    3
      Marlin/src/module/planner.h
  78. 2
    2
      Marlin/src/module/stepper.cpp
  79. 2
    2
      Marlin/src/module/stepper.h
  80. 3
    3
      Marlin/src/module/stepper/trinamic.cpp
  81. 11
    11
      Marlin/src/sd/Sd2Card.cpp
  82. 8
    8
      Marlin/src/sd/Sd2Card.h
  83. 37
    37
      Marlin/src/sd/SdBaseFile.cpp
  84. 19
    19
      Marlin/src/sd/SdBaseFile.h
  85. 4
    4
      Marlin/src/sd/SdFatStructs.h
  86. 2
    2
      Marlin/src/sd/SdFile.cpp
  87. 2
    2
      Marlin/src/sd/SdFile.h
  88. 5
    5
      Marlin/src/sd/SdVolume.cpp
  89. 6
    6
      Marlin/src/sd/SdVolume.h
  90. 1
    1
      Marlin/src/sd/cardreader.h
  91. 2
    2
      Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp
  92. 4
    4
      Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h
  93. 7
    7
      Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp
  94. 10
    10
      Marlin/src/sd/usb_flashdrive/lib-uhs2/UsbCore.h
  95. 2
    2
      Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.cpp
  96. 2
    2
      Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.h
  97. 6
    6
      Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h
  98. 7
    7
      Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usbhost.h
  99. 3
    3
      Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h
  100. 0
    0
      Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h

+ 4
- 4
Marlin/src/HAL/AVR/HAL_SPI.cpp Parādīt failu

@@ -88,7 +88,7 @@ void spiBegin() {
88 88
   }
89 89
 
90 90
   /** SPI read data  */
91
-  void spiRead(uint8_t* buf, uint16_t nbyte) {
91
+  void spiRead(uint8_t *buf, uint16_t nbyte) {
92 92
     if (nbyte-- == 0) return;
93 93
     SPDR = 0xFF;
94 94
     for (uint16_t i = 0; i < nbyte; i++) {
@@ -107,7 +107,7 @@ void spiBegin() {
107 107
   }
108 108
 
109 109
   /** SPI send block  */
110
-  void spiSendBlock(uint8_t token, const uint8_t* buf) {
110
+  void spiSendBlock(uint8_t token, const uint8_t *buf) {
111 111
     SPDR = token;
112 112
     for (uint16_t i = 0; i < 512; i += 2) {
113 113
       while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
@@ -215,7 +215,7 @@ void spiBegin() {
215 215
   }
216 216
 
217 217
   // Soft SPI read data
218
-  void spiRead(uint8_t* buf, uint16_t nbyte) {
218
+  void spiRead(uint8_t *buf, uint16_t nbyte) {
219 219
     for (uint16_t i = 0; i < nbyte; i++)
220 220
       buf[i] = spiRec();
221 221
   }
@@ -242,7 +242,7 @@ void spiBegin() {
242 242
   }
243 243
 
244 244
   // Soft SPI send block
245
-  void spiSendBlock(uint8_t token, const uint8_t* buf) {
245
+  void spiSendBlock(uint8_t token, const uint8_t *buf) {
246 246
     spiSend(token);
247 247
     for (uint16_t i = 0; i < 512; i++)
248 248
       spiSend(buf[i]);

+ 15
- 15
Marlin/src/HAL/DUE/HAL_SPI.cpp Parādīt failu

@@ -56,8 +56,8 @@
56 56
   #pragma GCC optimize (3)
57 57
 
58 58
   typedef uint8_t (*pfnSpiTransfer)(uint8_t b);
59
-  typedef void    (*pfnSpiRxBlock)(uint8_t* buf, uint32_t nbyte);
60
-  typedef void    (*pfnSpiTxBlock)(const uint8_t* buf, uint32_t nbyte);
59
+  typedef void    (*pfnSpiRxBlock)(uint8_t *buf, uint32_t nbyte);
60
+  typedef void    (*pfnSpiTxBlock)(const uint8_t *buf, uint32_t nbyte);
61 61
 
62 62
   /* ---------------- Macros to be able to access definitions from asm */
63 63
   #define _PORT(IO) DIO ##  IO ## _WPORT
@@ -270,7 +270,7 @@
270 270
   static pfnSpiTransfer spiTransferTx = (pfnSpiTransfer)spiTransferX;
271 271
 
272 272
   // Block transfers run at ~8 .. ~10Mhz - Tx version (Rx data discarded)
273
-  static void spiTxBlock0(const uint8_t* ptr, uint32_t todo) {
273
+  static void spiTxBlock0(const uint8_t *ptr, uint32_t todo) {
274 274
     uint32_t MOSI_PORT_PLUS30 = ((uint32_t) PORT(SD_MOSI_PIN)) + 0x30;  /* SODR of port */
275 275
     uint32_t MOSI_MASK = PIN_MASK(SD_MOSI_PIN);
276 276
     uint32_t SCK_PORT_PLUS30 = ((uint32_t) PORT(SD_SCK_PIN)) + 0x30;    /* SODR of port */
@@ -349,7 +349,7 @@
349 349
     );
350 350
   }
351 351
 
352
-  static void spiRxBlock0(uint8_t* ptr, uint32_t todo) {
352
+  static void spiRxBlock0(uint8_t *ptr, uint32_t todo) {
353 353
     uint32_t bin = 0;
354 354
     uint32_t work = 0;
355 355
     uint32_t BITBAND_MISO_PORT = BITBAND_ADDRESS( ((uint32_t)PORT(SD_MISO_PIN))+0x3C, PIN_SHIFT(SD_MISO_PIN));  /* PDSR of port in bitband area */
@@ -425,13 +425,13 @@
425 425
     );
426 426
   }
427 427
 
428
-  static void spiTxBlockX(const uint8_t* buf, uint32_t todo) {
428
+  static void spiTxBlockX(const uint8_t *buf, uint32_t todo) {
429 429
     do {
430 430
       (void)spiTransferTx(*buf++);
431 431
     } while (--todo);
432 432
   }
433 433
 
434
-  static void spiRxBlockX(uint8_t* buf, uint32_t todo) {
434
+  static void spiRxBlockX(uint8_t *buf, uint32_t todo) {
435 435
     do {
436 436
       *buf++ = spiTransferRx(0xFF);
437 437
     } while (--todo);
@@ -463,7 +463,7 @@
463 463
     return b;
464 464
   }
465 465
 
466
-  void spiRead(uint8_t* buf, uint16_t nbyte) {
466
+  void spiRead(uint8_t *buf, uint16_t nbyte) {
467 467
     if (nbyte) {
468 468
       _SS_WRITE(LOW);
469 469
       WRITE(SD_MOSI_PIN, HIGH); // Output 1s 1
@@ -478,7 +478,7 @@
478 478
     _SS_WRITE(HIGH);
479 479
   }
480 480
 
481
-  void spiSendBlock(uint8_t token, const uint8_t* buf) {
481
+  void spiSendBlock(uint8_t token, const uint8_t *buf) {
482 482
     _SS_WRITE(LOW);
483 483
     (void)spiTransferTx(token);
484 484
     spiTxBlock(buf, 512);
@@ -645,7 +645,7 @@
645 645
     }
646 646
 
647 647
     // Read from SPI into buffer
648
-    void spiRead(uint8_t* buf, uint16_t nbyte) {
648
+    void spiRead(uint8_t *buf, uint16_t nbyte) {
649 649
       if (!nbyte) return;
650 650
       --nbyte;
651 651
       for (int i = 0; i < nbyte; i++) {
@@ -668,7 +668,7 @@
668 668
       //DELAY_US(1U);
669 669
     }
670 670
 
671
-    void spiSend(const uint8_t* buf, size_t nbyte) {
671
+    void spiSend(const uint8_t *buf, size_t nbyte) {
672 672
       if (!nbyte) return;
673 673
       --nbyte;
674 674
       for (size_t i = 0; i < nbyte; i++) {
@@ -689,7 +689,7 @@
689 689
       FLUSH_RX();
690 690
     }
691 691
 
692
-    void spiSend(uint32_t chan, const uint8_t* buf, size_t nbyte) {
692
+    void spiSend(uint32_t chan, const uint8_t *buf, size_t nbyte) {
693 693
       if (!nbyte) return;
694 694
       --nbyte;
695 695
       for (size_t i = 0; i < nbyte; i++) {
@@ -702,7 +702,7 @@
702 702
     }
703 703
 
704 704
     // Write from buffer to SPI
705
-    void spiSendBlock(uint8_t token, const uint8_t* buf) {
705
+    void spiSendBlock(uint8_t token, const uint8_t *buf) {
706 706
       SPI0->SPI_TDR = (uint32_t)token | SPI_PCS(SPI_CHAN);
707 707
       WHILE_TX(0);
708 708
       //WHILE_RX(0);
@@ -801,19 +801,19 @@
801 801
 
802 802
     uint8_t spiRec() { return (uint8_t)spiTransfer(0xFF); }
803 803
 
804
-    void spiRead(uint8_t* buf, uint16_t nbyte) {
804
+    void spiRead(uint8_t *buf, uint16_t nbyte) {
805 805
       for (int i = 0; i < nbyte; i++)
806 806
         buf[i] = spiTransfer(0xFF);
807 807
     }
808 808
 
809 809
     void spiSend(uint8_t data) { spiTransfer(data); }
810 810
 
811
-    void spiSend(const uint8_t* buf, size_t nbyte) {
811
+    void spiSend(const uint8_t *buf, size_t nbyte) {
812 812
       for (uint16_t i = 0; i < nbyte; i++)
813 813
         spiTransfer(buf[i]);
814 814
     }
815 815
 
816
-    void spiSendBlock(uint8_t token, const uint8_t* buf) {
816
+    void spiSendBlock(uint8_t token, const uint8_t *buf) {
817 817
       spiTransfer(token);
818 818
       for (uint16_t i = 0; i < 512; i++)
819 819
         spiTransfer(buf[i]);

+ 7
- 7
Marlin/src/HAL/DUE/eeprom_flash.cpp Parādīt failu

@@ -139,7 +139,7 @@ static void ee_Dump(const int page, const void* data) {
139 139
 
140 140
   #ifdef EE_EMU_DEBUG
141 141
 
142
-    const uint8_t* c = (const uint8_t*) data;
142
+    const uint8_t *c = (const uint8_t*) data;
143 143
     char buffer[80];
144 144
 
145 145
     sprintf_P(buffer, PSTR("Page: %d (0x%04x)\n"), page, page);
@@ -293,8 +293,8 @@ static bool ee_PageWrite(uint16_t page, const void* data) {
293 293
       ee_Dump(-page, data);
294 294
 
295 295
       // Calculate count of changed bits
296
-      uint32_t* p1 = (uint32_t*)addrflash;
297
-      uint32_t* p2 = (uint32_t*)data;
296
+      uint32_t *p1 = (uint32_t*)addrflash;
297
+      uint32_t *p2 = (uint32_t*)data;
298 298
       int count = 0;
299 299
       for (i =0; i<PageSize >> 2; i++) {
300 300
         if (p1[i] != p2[i]) {
@@ -470,7 +470,7 @@ static uint8_t ee_Read(uint32_t address, bool excludeRAMBuffer=false) {
470 470
   for (int page = curPage - 1; page >= 0; --page) {
471 471
 
472 472
     // Get a pointer to the flash page
473
-    uint8_t* pflash = (uint8_t*)getFlashStorage(page + curGroup * PagesPerGroup);
473
+    uint8_t *pflash = (uint8_t*)getFlashStorage(page + curGroup * PagesPerGroup);
474 474
 
475 475
     uint16_t i = 0;
476 476
     while (i <= (PageSize - 4)) { /* (PageSize - 4) because otherwise, there is not enough room for data and headers */
@@ -550,7 +550,7 @@ static uint32_t ee_GetAddrRange(uint32_t address, bool excludeRAMBuffer=false) {
550 550
   for (int page = curPage - 1; page >= 0; --page) {
551 551
 
552 552
     // Get a pointer to the flash page
553
-    uint8_t* pflash = (uint8_t*)getFlashStorage(page + curGroup * PagesPerGroup);
553
+    uint8_t *pflash = (uint8_t*)getFlashStorage(page + curGroup * PagesPerGroup);
554 554
 
555 555
     uint16_t i = 0;
556 556
     while (i <= (PageSize - 4)) { /* (PageSize - 4) because otherwise, there is not enough room for data and headers */
@@ -589,7 +589,7 @@ static uint32_t ee_GetAddrRange(uint32_t address, bool excludeRAMBuffer=false) {
589 589
 }
590 590
 
591 591
 static bool ee_IsPageClean(int page) {
592
-  uint32_t* pflash = (uint32_t*) getFlashStorage(page);
592
+  uint32_t *pflash = (uint32_t*) getFlashStorage(page);
593 593
   for (uint16_t i = 0; i < (PageSize >> 2); ++i)
594 594
     if (*pflash++ != 0xFFFFFFFF) return false;
595 595
   return true;
@@ -599,7 +599,7 @@ static bool ee_Flush(uint32_t overrideAddress = 0xFFFFFFFF, uint8_t overrideData
599 599
 
600 600
   // Check if RAM buffer has something to be written
601 601
   bool isEmpty = true;
602
-  uint32_t* p = (uint32_t*) &buffer[0];
602
+  uint32_t *p = (uint32_t*) &buffer[0];
603 603
   for (uint16_t j = 0; j < (PageSize >> 2); j++) {
604 604
     if (*p++ != 0xFFFFFFFF) {
605 605
       isEmpty = false;

+ 2
- 2
Marlin/src/HAL/DUE/usb/udi_cdc.h Parādīt failu

@@ -675,11 +675,11 @@ iram_size_t udi_cdc_multi_write_buf(uint8_t port, const void* buf, iram_size_t s
675 675
  *   - \code // Waits and gets a value on CDC line
676 676
 	int udi_cdc_getc(void);
677 677
 	// Reads a RAM buffer on CDC line
678
-	iram_size_t udi_cdc_read_buf(int* buf, iram_size_t size);
678
+	iram_size_t udi_cdc_read_buf(int *buf, iram_size_t size);
679 679
 	// Puts a byte on CDC line
680 680
 	int udi_cdc_putc(int value);
681 681
 	// Writes a RAM buffer on CDC line
682
-	iram_size_t udi_cdc_write_buf(const int* buf, iram_size_t size); \endcode
682
+	iram_size_t udi_cdc_write_buf(const int *buf, iram_size_t size); \endcode
683 683
  *
684 684
  * \section udi_cdc_use_cases Advanced use cases
685 685
  * For more advanced use of the UDI CDC module, see the following use cases:

+ 1
- 1
Marlin/src/HAL/DUE/usb/usb_task.c Parādīt failu

@@ -264,7 +264,7 @@ bool usb_task_extra_string(void) {
264 264
 ** Handle device requests that the ASF stack doesn't
265 265
 */
266 266
 bool usb_task_other_requests(void) {
267
-  uint8_t* ptr = 0;
267
+  uint8_t *ptr = 0;
268 268
   uint16_t size = 0;
269 269
 
270 270
   if (Udd_setup_type() == USB_REQ_TYPE_VENDOR) {

+ 2
- 2
Marlin/src/HAL/ESP32/HAL_SPI.cpp Parādīt failu

@@ -85,7 +85,7 @@ uint8_t spiRec() {
85 85
   return returnByte;
86 86
 }
87 87
 
88
-void spiRead(uint8_t* buf, uint16_t nbyte) {
88
+void spiRead(uint8_t *buf, uint16_t nbyte) {
89 89
   SPI.beginTransaction(spiConfig);
90 90
   SPI.transferBytes(0, buf, nbyte);
91 91
   SPI.endTransaction();
@@ -97,7 +97,7 @@ void spiSend(uint8_t b) {
97 97
   SPI.endTransaction();
98 98
 }
99 99
 
100
-void spiSendBlock(uint8_t token, const uint8_t* buf) {
100
+void spiSendBlock(uint8_t token, const uint8_t *buf) {
101 101
   SPI.beginTransaction(spiConfig);
102 102
   SPI.transfer(token);
103 103
   SPI.writeBytes(const_cast<uint8_t*>(buf), 512);

+ 1
- 1
Marlin/src/HAL/ESP32/WebSocketSerial.cpp Parādīt failu

@@ -137,7 +137,7 @@ size_t WebSocketSerial::write(const uint8_t c) {
137 137
   return ret;
138 138
 }
139 139
 
140
-size_t WebSocketSerial::write(const uint8_t* buffer, size_t size) {
140
+size_t WebSocketSerial::write(const uint8_t *buffer, size_t size) {
141 141
   size_t written = 0;
142 142
   for (size_t i = 0; i < size; i++)
143 143
     written += write(buffer[i]);

+ 2
- 2
Marlin/src/HAL/ESP32/WebSocketSerial.h Parādīt failu

@@ -54,7 +54,7 @@ public:
54 54
   ring_buffer_pos_t read(uint8_t *buffer);
55 55
   void flush();
56 56
   ring_buffer_pos_t write(const uint8_t c);
57
-  ring_buffer_pos_t write(const uint8_t* buffer, ring_buffer_pos_t size);
57
+  ring_buffer_pos_t write(const uint8_t *buffer, ring_buffer_pos_t size);
58 58
 };
59 59
 
60 60
 class WebSocketSerial: public Stream {
@@ -70,7 +70,7 @@ public:
70 70
   int read();
71 71
   void flush();
72 72
   size_t write(const uint8_t c);
73
-  size_t write(const uint8_t* buffer, size_t size);
73
+  size_t write(const uint8_t *buffer, size_t size);
74 74
 
75 75
   #if ENABLED(SERIAL_STATS_DROPPED_RX)
76 76
     FORCE_INLINE uint32_t dropped() { return 0; }

+ 5
- 5
Marlin/src/HAL/LPC1768/HAL_SPI.cpp Parādīt failu

@@ -93,12 +93,12 @@
93 93
 
94 94
   void spiSend(uint8_t b) { (void)spiTransfer(b); }
95 95
 
96
-  void spiSend(const uint8_t* buf, size_t nbyte) {
96
+  void spiSend(const uint8_t *buf, size_t nbyte) {
97 97
     for (uint16_t i = 0; i < nbyte; i++)
98 98
       (void)spiTransfer(buf[i]);
99 99
   }
100 100
 
101
-  void spiSendBlock(uint8_t token, const uint8_t* buf) {
101
+  void spiSendBlock(uint8_t token, const uint8_t *buf) {
102 102
     (void)spiTransfer(token);
103 103
     for (uint16_t i = 0; i < 512; i++)
104 104
       (void)spiTransfer(buf[i]);
@@ -135,13 +135,13 @@
135 135
 
136 136
   void spiSend(uint8_t b) { doio(b); }
137 137
 
138
-  void spiSend(const uint8_t* buf, size_t nbyte) {
138
+  void spiSend(const uint8_t *buf, size_t nbyte) {
139 139
     for (uint16_t i = 0; i < nbyte; i++) doio(buf[i]);
140 140
   }
141 141
 
142 142
   void spiSend(uint32_t chan, byte b) {}
143 143
 
144
-  void spiSend(uint32_t chan, const uint8_t* buf, size_t nbyte) {}
144
+  void spiSend(uint32_t chan, const uint8_t *buf, size_t nbyte) {}
145 145
 
146 146
   // Read single byte from SPI
147 147
   uint8_t spiRec() { return doio(0xFF); }
@@ -156,7 +156,7 @@
156 156
   uint8_t spiTransfer(uint8_t b) { return doio(b); }
157 157
 
158 158
   // Write from buffer to SPI
159
-  void spiSendBlock(uint8_t token, const uint8_t* buf) {
159
+  void spiSendBlock(uint8_t token, const uint8_t *buf) {
160 160
    (void)spiTransfer(token);
161 161
     for (uint16_t i = 0; i < 512; i++)
162 162
       (void)spiTransfer(buf[i]);

+ 1
- 1
Marlin/src/HAL/LPC1768/u8g/u8g_com_HAL_LPC1768_st7920_hw_spi.cpp Parādīt failu

@@ -66,7 +66,7 @@
66 66
 void spiBegin();
67 67
 void spiInit(uint8_t spiRate);
68 68
 void spiSend(uint8_t b);
69
-void spiSend(const uint8_t* buf, size_t n);
69
+void spiSend(const uint8_t *buf, size_t n);
70 70
 
71 71
 static uint8_t rs_last_state = 255;
72 72
 

+ 2
- 2
Marlin/src/HAL/SAMD51/HAL_SPI.cpp Parādīt failu

@@ -103,7 +103,7 @@
103 103
    * @param  nbyte Number of bytes to receive.
104 104
    * @return Nothing
105 105
    */
106
-  void spiRead(uint8_t* buf, uint16_t nbyte) {
106
+  void spiRead(uint8_t *buf, uint16_t nbyte) {
107 107
     if (nbyte == 0) return;
108 108
     memset(buf, 0xFF, nbyte);
109 109
     sdSPI.beginTransaction(spiConfig);
@@ -132,7 +132,7 @@
132 132
    *
133 133
    * @details Uses DMA
134 134
    */
135
-  void spiSendBlock(uint8_t token, const uint8_t* buf) {
135
+  void spiSendBlock(uint8_t token, const uint8_t *buf) {
136 136
     sdSPI.beginTransaction(spiConfig);
137 137
     sdSPI.transfer(token);
138 138
     sdSPI.transfer((uint8_t*)buf, nullptr, 512);

+ 2
- 2
Marlin/src/HAL/STM32/HAL_SPI.cpp Parādīt failu

@@ -193,7 +193,7 @@ static SPISettings spiConfig;
193 193
    *
194 194
    * @details Uses DMA
195 195
    */
196
-  void spiRead(uint8_t* buf, uint16_t nbyte) {
196
+  void spiRead(uint8_t *buf, uint16_t nbyte) {
197 197
     if (nbyte == 0) return;
198 198
     memset(buf, 0xFF, nbyte);
199 199
     SPI.transfer(buf, nbyte);
@@ -218,7 +218,7 @@ static SPISettings spiConfig;
218 218
    *
219 219
    * @details Use DMA
220 220
    */
221
-  void spiSendBlock(uint8_t token, const uint8_t* buf) {
221
+  void spiSendBlock(uint8_t token, const uint8_t *buf) {
222 222
     uint8_t rxBuf[512];
223 223
     SPI.transfer(token);
224 224
     SPI.transfer((uint8_t*)buf, &rxBuf, 512);

+ 1
- 1
Marlin/src/HAL/STM32/MarlinSerial.h Parādīt failu

@@ -36,7 +36,7 @@ struct MarlinSerial : public HardwareSerial {
36 36
   void begin(unsigned long baud, uint8_t config);
37 37
   inline void begin(unsigned long baud) { begin(baud, SERIAL_8N1); }
38 38
 
39
-  void _rx_complete_irq(serial_t* obj);
39
+  void _rx_complete_irq(serial_t *obj);
40 40
 
41 41
 protected:
42 42
   usart_rx_callback_t _rx_callback;

+ 3
- 3
Marlin/src/HAL/STM32F1/HAL_SPI.cpp Parādīt failu

@@ -123,7 +123,7 @@ uint8_t spiRec() {
123 123
  *
124 124
  * @details Uses DMA
125 125
  */
126
-void spiRead(uint8_t* buf, uint16_t nbyte) {
126
+void spiRead(uint8_t *buf, uint16_t nbyte) {
127 127
   SPI.dmaTransfer(0, const_cast<uint8_t*>(buf), nbyte);
128 128
 }
129 129
 
@@ -146,7 +146,7 @@ void spiSend(uint8_t b) {
146 146
  *
147 147
  * @details Use DMA
148 148
  */
149
-void spiSendBlock(uint8_t token, const uint8_t* buf) {
149
+void spiSendBlock(uint8_t token, const uint8_t *buf) {
150 150
   SPI.send(token);
151 151
   SPI.dmaSend(const_cast<uint8_t*>(buf), 512);
152 152
 }
@@ -160,7 +160,7 @@ uint8_t spiRec(uint32_t chan) { return SPI.transfer(0xFF); }
160 160
 void spiSend(uint32_t chan, byte b) { SPI.send(b); }
161 161
 
162 162
 // Write buffer to specified SPI channel
163
-void spiSend(uint32_t chan, const uint8_t* buf, size_t n) {
163
+void spiSend(uint32_t chan, const uint8_t *buf, size_t n) {
164 164
   for (size_t p = 0; p < n; p++) spiSend(chan, buf[p]);
165 165
 }
166 166
 

+ 2
- 2
Marlin/src/HAL/STM32F1/eeprom_flash.cpp Parādīt failu

@@ -48,8 +48,8 @@ static uint8_t ram_eeprom[MARLIN_EEPROM_SIZE] __attribute__((aligned(4))) = {0};
48 48
 static bool eeprom_dirty = false;
49 49
 
50 50
 bool PersistentStore::access_start() {
51
-  const uint32_t* source = reinterpret_cast<const uint32_t*>(EEPROM_PAGE0_BASE);
52
-  uint32_t* destination = reinterpret_cast<uint32_t*>(ram_eeprom);
51
+  const uint32_t *source = reinterpret_cast<const uint32_t*>(EEPROM_PAGE0_BASE);
52
+  uint32_t *destination = reinterpret_cast<uint32_t*>(ram_eeprom);
53 53
 
54 54
   static_assert(0 == (MARLIN_EEPROM_SIZE) % 4, "MARLIN_EEPROM_SIZE is corrupted. (Must be a multiple of 4.)"); // Ensure copying as uint32_t is safe
55 55
   constexpr size_t eeprom_size_u32 = (MARLIN_EEPROM_SIZE) / 4;

+ 2
- 2
Marlin/src/HAL/TEENSY31_32/HAL_SPI.cpp Parādīt failu

@@ -82,7 +82,7 @@ uint8_t spiRec() {
82 82
 }
83 83
 
84 84
 // SPI read data
85
-void spiRead(uint8_t* buf, uint16_t nbyte) {
85
+void spiRead(uint8_t *buf, uint16_t nbyte) {
86 86
   SPI.beginTransaction(spiConfig);
87 87
   SPI.transfer(buf, nbyte);
88 88
   SPI.endTransaction();
@@ -107,7 +107,7 @@ void spiSend(uint8_t b) {
107 107
 }
108 108
 
109 109
 // SPI send block
110
-void spiSendBlock(uint8_t token, const uint8_t* buf) {
110
+void spiSendBlock(uint8_t token, const uint8_t *buf) {
111 111
   SPI.beginTransaction(spiConfig);
112 112
   SPDR = token;
113 113
   for (uint16_t i = 0; i < 512; i += 2) {

+ 2
- 2
Marlin/src/HAL/TEENSY35_36/HAL_SPI.cpp Parādīt failu

@@ -80,7 +80,7 @@ uint8_t spiRec() {
80 80
   //return SPDR;
81 81
 }
82 82
 
83
-void spiRead(uint8_t* buf, uint16_t nbyte) {
83
+void spiRead(uint8_t *buf, uint16_t nbyte) {
84 84
   SPI.beginTransaction(spiConfig);
85 85
   SPI.transfer(buf, nbyte);
86 86
   SPI.endTransaction();
@@ -103,7 +103,7 @@ void spiSend(uint8_t b) {
103 103
   //while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
104 104
 }
105 105
 
106
-void spiSendBlock(uint8_t token, const uint8_t* buf) {
106
+void spiSendBlock(uint8_t token, const uint8_t *buf) {
107 107
   SPI.beginTransaction(spiConfig);
108 108
   SPDR = token;
109 109
   for (uint16_t i = 0; i < 512; i += 2) {

+ 2
- 2
Marlin/src/HAL/TEENSY40_41/HAL_SPI.cpp Parādīt failu

@@ -97,7 +97,7 @@ uint8_t spiRec() {
97 97
   //return SPDR;
98 98
 }
99 99
 
100
-void spiRead(uint8_t* buf, uint16_t nbyte) {
100
+void spiRead(uint8_t *buf, uint16_t nbyte) {
101 101
   SPI.beginTransaction(spiConfig);
102 102
   SPI.transfer(buf, nbyte);
103 103
   SPI.endTransaction();
@@ -120,7 +120,7 @@ void spiSend(uint8_t b) {
120 120
   //while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
121 121
 }
122 122
 
123
-void spiSendBlock(uint8_t token, const uint8_t* buf) {
123
+void spiSendBlock(uint8_t token, const uint8_t *buf) {
124 124
   SPI.beginTransaction(spiConfig);
125 125
   SPDR = token;
126 126
   for (uint16_t i = 0; i < 512; i += 2) {

+ 1
- 1
Marlin/src/HAL/shared/HAL_MinSerial.h Parādīt failu

@@ -42,7 +42,7 @@ struct MinSerial {
42 42
       HAL_min_serial_out(ch);
43 43
   }
44 44
   // Send String through UART
45
-  static void TX(const char* s) { while (*s) TX(*s++); }
45
+  static void TX(const char *s) { while (*s) TX(*s++); }
46 46
   // Send a digit through UART
47 47
   static void TXDigit(uint32_t d) {
48 48
     if (d < 10) TX((char)(d+'0'));

+ 3
- 3
Marlin/src/HAL/shared/HAL_SPI.h Parādīt failu

@@ -71,10 +71,10 @@ void spiSend(uint8_t b);
71 71
 uint8_t spiRec();
72 72
 
73 73
 // Read from SPI into buffer
74
-void spiRead(uint8_t* buf, uint16_t nbyte);
74
+void spiRead(uint8_t *buf, uint16_t nbyte);
75 75
 
76 76
 // Write token and then write from 512 byte buffer to SPI (for SD card)
77
-void spiSendBlock(uint8_t token, const uint8_t* buf);
77
+void spiSendBlock(uint8_t token, const uint8_t *buf);
78 78
 
79 79
 // Begin SPI transaction, set clock, bit order, data mode
80 80
 void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode);
@@ -87,7 +87,7 @@ void spiBeginTransaction(uint32_t spiClock, uint8_t bitOrder, uint8_t dataMode);
87 87
 void spiSend(uint32_t chan, byte b);
88 88
 
89 89
 // Write buffer to specified SPI channel
90
-void spiSend(uint32_t chan, const uint8_t* buf, size_t n);
90
+void spiSend(uint32_t chan, const uint8_t *buf, size_t n);
91 91
 
92 92
 // Read single byte from specified SPI channel
93 93
 uint8_t spiRec(uint32_t chan);

+ 1
- 1
Marlin/src/HAL/shared/backtrace/backtrace.cpp Parādīt failu

@@ -44,7 +44,7 @@ static bool UnwReportOut(void* ctx, const UnwReport* bte) {
44 44
 }
45 45
 
46 46
 #ifdef UNW_DEBUG
47
-  void UnwPrintf(const char* format, ...) {
47
+  void UnwPrintf(const char *format, ...) {
48 48
     char dest[256];
49 49
     va_list argptr;
50 50
     va_start(argptr, format);

+ 3
- 3
Marlin/src/HAL/shared/eeprom_api.h Parādīt failu

@@ -45,11 +45,11 @@ public:
45 45
 
46 46
   // Read one or more bytes of data and update the CRC
47 47
   // Return 'true' on read error
48
-  static bool read_data(int &pos, uint8_t* value, size_t size, uint16_t *crc, const bool writing=true);
48
+  static bool read_data(int &pos, uint8_t *value, size_t size, uint16_t *crc, const bool writing=true);
49 49
 
50 50
   // Write one or more bytes of data
51 51
   // Return 'true' on write error
52
-  static inline bool write_data(const int pos, const uint8_t* value, const size_t size=sizeof(uint8_t)) {
52
+  static inline bool write_data(const int pos, const uint8_t *value, const size_t size=sizeof(uint8_t)) {
53 53
     int data_pos = pos;
54 54
     uint16_t crc = 0;
55 55
     return write_data(data_pos, value, size, &crc);
@@ -61,7 +61,7 @@ public:
61 61
 
62 62
   // Read one or more bytes of data
63 63
   // Return 'true' on read error
64
-  static inline bool read_data(const int pos, uint8_t* value, const size_t size=1) {
64
+  static inline bool read_data(const int pos, uint8_t *value, const size_t size=1) {
65 65
     int data_pos = pos;
66 66
     uint16_t crc = 0;
67 67
     return read_data(data_pos, value, size, &crc);

+ 1
- 1
Marlin/src/HAL/shared/eeprom_if_spi.cpp Parādīt failu

@@ -55,7 +55,7 @@ static void _eeprom_begin(uint8_t * const pos, const uint8_t cmd) {
55 55
                                   // Leave the Bus in-use
56 56
 }
57 57
 
58
-uint8_t eeprom_read_byte(uint8_t* pos) {
58
+uint8_t eeprom_read_byte(uint8_t *pos) {
59 59
   _eeprom_begin(pos, CMD_READ);   // Set read location and begin transmission
60 60
 
61 61
   const uint8_t v = spiRec(SPI_CHAN_EEPROM1); // After READ a value sits on the Bus

+ 2
- 2
Marlin/src/core/macros.h Parādīt failu

@@ -362,13 +362,13 @@
362 362
       return *str == '/' ? true : (*str ? containsSlash(str + 1) : false);
363 363
     }
364 364
     // Find the last position of the slash
365
-    constexpr const char* findLastSlashPos(const char* str) {
365
+    constexpr const char* findLastSlashPos(const char *str) {
366 366
       return *str == '/' ? (str + 1) : findLastSlashPos(str - 1);
367 367
     }
368 368
     // Compile-time evaluation of the last part of a file path
369 369
     // Typically used to shorten the path to file in compiled strings
370 370
     // CompileTimeString::baseName(__FILE__) returns "macros.h" and not /path/to/Marlin/src/core/macros.h
371
-    constexpr const char* baseName(const char* str) {
371
+    constexpr const char* baseName(const char *str) {
372 372
       return containsSlash(str) ? findLastSlashPos(findStringEnd(str)) : str;
373 373
     }
374 374
   }

+ 3
- 3
Marlin/src/core/serial_base.h Parādīt failu

@@ -108,9 +108,9 @@ struct SerialBase {
108 108
   void flushTX()                    { CALL_IF_EXISTS(void, static_cast<Child*>(this), flushTX); }
109 109
 
110 110
   // Glue code here
111
-  FORCE_INLINE void write(const char* str)                    { while (*str) write(*str++); }
112
-  FORCE_INLINE void write(const uint8_t* buffer, size_t size) { while (size--) write(*buffer++); }
113
-  FORCE_INLINE void print(const char* str)                    { write(str); }
111
+  FORCE_INLINE void write(const char *str)                    { while (*str) write(*str++); }
112
+  FORCE_INLINE void write(const uint8_t *buffer, size_t size) { while (size--) write(*buffer++); }
113
+  FORCE_INLINE void print(const char *str)                    { write(str); }
114 114
   // No default argument to avoid ambiguity
115 115
   NO_INLINE void print(char c, PrintBase base)                { printNumber((signed long)c, (uint8_t)base); }
116 116
   NO_INLINE void print(unsigned char c, PrintBase base)       { printNumber((unsigned long)c, (uint8_t)base); }

+ 5
- 5
Marlin/src/feature/binary_stream.h Parādīt failu

@@ -51,10 +51,10 @@ class SDFileTransferProtocol  {
51 51
 private:
52 52
   struct Packet {
53 53
     struct [[gnu::packed]] Open {
54
-      static bool validate(char* buffer, size_t length) {
54
+      static bool validate(char *buffer, size_t length) {
55 55
         return (length > sizeof(Open) && buffer[length - 1] == '\0');
56 56
       }
57
-      static Open& decode(char* buffer) {
57
+      static Open& decode(char *buffer) {
58 58
         data = &buffer[2];
59 59
         return *reinterpret_cast<Open*>(buffer);
60 60
       }
@@ -67,7 +67,7 @@ private:
67 67
     };
68 68
   };
69 69
 
70
-  static bool file_open(char* filename) {
70
+  static bool file_open(char *filename) {
71 71
     if (!dummy_transfer) {
72 72
       card.mount();
73 73
       card.openFileWrite(filename);
@@ -79,7 +79,7 @@ private:
79 79
     return true;
80 80
   }
81 81
 
82
-  static bool file_write(char* buffer, const size_t length) {
82
+  static bool file_write(char *buffer, const size_t length) {
83 83
     #if ENABLED(BINARY_STREAM_COMPRESSION)
84 84
       if (compression) {
85 85
         size_t total_processed = 0, processed_count = 0;
@@ -150,7 +150,7 @@ public:
150 150
     }
151 151
   }
152 152
 
153
-  static void process(uint8_t packet_type, char* buffer, const uint16_t length) {
153
+  static void process(uint8_t packet_type, char *buffer, const uint16_t length) {
154 154
     transfer_timeout = millis() + TIMEOUT;
155 155
     switch (static_cast<FileTransfer>(packet_type)) {
156 156
       case FileTransfer::QUERY:

+ 1
- 1
Marlin/src/feature/meatpack.cpp Parādīt failu

@@ -205,7 +205,7 @@ void MeatPack::handle_rx_char(const uint8_t c, const serial_index_t serial_ind)
205 205
   handle_rx_char_inner(c);                // Other characters are passed on for MeatPack decoding
206 206
 }
207 207
 
208
-uint8_t MeatPack::get_result_char(char* const __restrict out) {
208
+uint8_t MeatPack::get_result_char(char * const __restrict out) {
209 209
   uint8_t res = 0;
210 210
   if (char_out_count) {
211 211
     res = char_out_count;

+ 1
- 1
Marlin/src/feature/meatpack.h Parādīt failu

@@ -109,7 +109,7 @@ public:
109 109
    * @param out [in] Output pointer for unpacked/processed data.
110 110
    * @return Number of characters returned. Range from 0 to 2.
111 111
    */
112
-  uint8_t get_result_char(char* const __restrict out);
112
+  uint8_t get_result_char(char * const __restrict out);
113 113
 
114 114
   void reset_state();
115 115
   void report_state();

+ 7
- 7
Marlin/src/feature/mmu/mmu2.cpp Parādīt failu

@@ -362,7 +362,7 @@ bool MMU2::rx_start() {
362 362
 /**
363 363
  * Check if the data received ends with the given string.
364 364
  */
365
-bool MMU2::rx_str_P(const char* str) {
365
+bool MMU2::rx_str_P(const char *str) {
366 366
   uint8_t i = strlen(rx_buffer);
367 367
 
368 368
   while (MMU2_SERIAL.available()) {
@@ -394,7 +394,7 @@ bool MMU2::rx_str_P(const char* str) {
394 394
 /**
395 395
  * Transfer data to MMU, no argument
396 396
  */
397
-void MMU2::tx_str_P(const char* str) {
397
+void MMU2::tx_str_P(const char *str) {
398 398
   clear_rx_buffer();
399 399
   uint8_t len = strlen_P(str);
400 400
   LOOP_L_N(i, len) MMU2_SERIAL.write(pgm_read_byte(str++));
@@ -404,7 +404,7 @@ void MMU2::tx_str_P(const char* str) {
404 404
 /**
405 405
  * Transfer data to MMU, single argument
406 406
  */
407
-void MMU2::tx_printf_P(const char* format, int argument = -1) {
407
+void MMU2::tx_printf_P(const char *format, int argument = -1) {
408 408
   clear_rx_buffer();
409 409
   uint8_t len = sprintf_P(tx_buffer, format, argument);
410 410
   LOOP_L_N(i, len) MMU2_SERIAL.write(tx_buffer[i]);
@@ -414,7 +414,7 @@ void MMU2::tx_printf_P(const char* format, int argument = -1) {
414 414
 /**
415 415
  * Transfer data to MMU, two arguments
416 416
  */
417
-void MMU2::tx_printf_P(const char* format, int argument1, int argument2) {
417
+void MMU2::tx_printf_P(const char *format, int argument1, int argument2) {
418 418
   clear_rx_buffer();
419 419
   uint8_t len = sprintf_P(tx_buffer, format, argument1, argument2);
420 420
   LOOP_L_N(i, len) MMU2_SERIAL.write(tx_buffer[i]);
@@ -511,7 +511,7 @@ static void mmu2_not_responding() {
511 511
    * Tx Same as T?, except nozzle doesn't have to be preheated. Tc must be placed after extruder nozzle is preheated to finish filament load.
512 512
    * Tc Load to nozzle after filament was prepared by Tx and extruder nozzle is already heated.
513 513
    */
514
-  void MMU2::tool_change(const char* special) {
514
+  void MMU2::tool_change(const char *special) {
515 515
       if (!enabled) return;
516 516
 
517 517
       set_runout_valid(false);
@@ -598,7 +598,7 @@ static void mmu2_not_responding() {
598 598
    * Tx Same as T?, except nozzle doesn't have to be preheated. Tc must be placed after extruder nozzle is preheated to finish filament load.
599 599
    * Tc Load to nozzle after filament was prepared by Tx and extruder nozzle is already heated.
600 600
    */
601
-  void MMU2::tool_change(const char* special) {
601
+  void MMU2::tool_change(const char *special) {
602 602
     if (!enabled) return;
603 603
 
604 604
     set_runout_valid(false);
@@ -692,7 +692,7 @@ static void mmu2_not_responding() {
692 692
    * Tx Same as T?, except nozzle doesn't have to be preheated. Tc must be placed after extruder nozzle is preheated to finish filament load.
693 693
    * Tc Load to nozzle after filament was prepared by Tx and extruder nozzle is already heated.
694 694
    */
695
-  void MMU2::tool_change(const char* special) {
695
+  void MMU2::tool_change(const char *special) {
696 696
     if (!enabled) return;
697 697
 
698 698
     set_runout_valid(false);

+ 5
- 5
Marlin/src/feature/mmu/mmu2.h Parādīt failu

@@ -45,7 +45,7 @@ public:
45 45
   static void reset();
46 46
   static void mmu_loop();
47 47
   static void tool_change(const uint8_t index);
48
-  static void tool_change(const char* special);
48
+  static void tool_change(const char *special);
49 49
   static uint8_t get_current_tool();
50 50
   static void set_filament_type(const uint8_t index, const uint8_t type);
51 51
 
@@ -56,10 +56,10 @@ public:
56 56
   static bool eject_filament(const uint8_t index, const bool recover);
57 57
 
58 58
 private:
59
-  static bool rx_str_P(const char* str);
60
-  static void tx_str_P(const char* str);
61
-  static void tx_printf_P(const char* format, const int argument);
62
-  static void tx_printf_P(const char* format, const int argument1, const int argument2);
59
+  static bool rx_str_P(const char *str);
60
+  static void tx_str_P(const char *str);
61
+  static void tx_printf_P(const char *format, const int argument);
62
+  static void tx_printf_P(const char *format, const int argument1, const int argument2);
63 63
   static void clear_rx_buffer();
64 64
 
65 65
   static bool rx_ok();

+ 5
- 5
Marlin/src/feature/runout.h Parādīt failu

@@ -106,7 +106,7 @@ class TFilamentMonitor : public FilamentMonitorBase {
106 106
 
107 107
     // Handle a block completion. RunoutResponseDelayed uses this to
108 108
     // add up the length of filament moved while the filament is out.
109
-    static inline void block_completed(const block_t* const b) {
109
+    static inline void block_completed(const block_t * const b) {
110 110
       if (enabled) {
111 111
         response.block_completed(b);
112 112
         sensor.block_completed(b);
@@ -273,7 +273,7 @@ class FilamentSensorBase {
273 273
       }
274 274
 
275 275
     public:
276
-      static inline void block_completed(const block_t* const b) {
276
+      static inline void block_completed(const block_t * const b) {
277 277
         // If the sensor wheel has moved since the last call to
278 278
         // this method reset the runout counter for the extruder.
279 279
         if (TEST(motion_detected, b->extruder))
@@ -307,7 +307,7 @@ class FilamentSensorBase {
307 307
       }
308 308
 
309 309
     public:
310
-      static inline void block_completed(const block_t* const) {}
310
+      static inline void block_completed(const block_t * const) {}
311 311
 
312 312
       static inline void run() {
313 313
         LOOP_L_N(s, NUM_RUNOUT_SENSORS) {
@@ -368,7 +368,7 @@ class FilamentSensorBase {
368 368
         runout_mm_countdown[extruder] = runout_distance_mm;
369 369
       }
370 370
 
371
-      static inline void block_completed(const block_t* const b) {
371
+      static inline void block_completed(const block_t * const b) {
372 372
         if (b->steps.x || b->steps.y || b->steps.z || did_pause_print) { // Allow pause purge move to re-trigger runout state
373 373
           // Only trigger on extrusion with XYZ movement to allow filament change and retract/recover.
374 374
           const uint8_t e = b->extruder;
@@ -403,7 +403,7 @@ class FilamentSensorBase {
403 403
         return runout_flags;
404 404
       }
405 405
 
406
-      static inline void block_completed(const block_t* const) { }
406
+      static inline void block_completed(const block_t * const) { }
407 407
 
408 408
       static inline void filament_present(const uint8_t extruder) {
409 409
         runout_count[extruder] = runout_threshold;

+ 3
- 3
Marlin/src/gcode/queue.cpp Parādīt failu

@@ -99,7 +99,7 @@ void GCodeQueue::RingBuffer::commit_command(bool skip_ok
99 99
  * Return true if the command was successfully added.
100 100
  * Return false for a full buffer, or if the 'command' is a comment.
101 101
  */
102
-bool GCodeQueue::RingBuffer::enqueue(const char* cmd, bool skip_ok/*=true*/
102
+bool GCodeQueue::RingBuffer::enqueue(const char *cmd, bool skip_ok/*=true*/
103 103
   #if HAS_MULTI_SERIAL
104 104
     , serial_index_t serial_ind/*=-1*/
105 105
   #endif
@@ -118,7 +118,7 @@ bool GCodeQueue::RingBuffer::enqueue(const char* cmd, bool skip_ok/*=true*/
118 118
  * Enqueue with Serial Echo
119 119
  * Return true if the command was consumed
120 120
  */
121
-bool GCodeQueue::enqueue_one(const char* cmd) {
121
+bool GCodeQueue::enqueue_one(const char *cmd) {
122 122
   //SERIAL_ECHOLNPAIR("enqueue_one(\"", cmd, "\")");
123 123
 
124 124
   if (*cmd == 0 || ISEOL(*cmd)) return true;
@@ -187,7 +187,7 @@ bool GCodeQueue::process_injected_command() {
187 187
  * Enqueue and return only when commands are actually enqueued.
188 188
  * Never call this from a G-code handler!
189 189
  */
190
-void GCodeQueue::enqueue_one_now(const char* cmd) { while (!enqueue_one(cmd)) idle(); }
190
+void GCodeQueue::enqueue_one_now(const char *cmd) { while (!enqueue_one(cmd)) idle(); }
191 191
 
192 192
 /**
193 193
  * Attempt to enqueue a single G-code command

+ 3
- 3
Marlin/src/gcode/queue.h Parādīt failu

@@ -85,7 +85,7 @@ public:
85 85
       #endif
86 86
     );
87 87
 
88
-    bool enqueue(const char* cmd, bool skip_ok = true
88
+    bool enqueue(const char *cmd, bool skip_ok = true
89 89
       #if HAS_MULTI_SERIAL
90 90
         , serial_index_t serial_ind = serial_index_t()
91 91
       #endif
@@ -143,7 +143,7 @@ public:
143 143
   /**
144 144
    * Enqueue and return only when commands are actually enqueued
145 145
    */
146
-  static void enqueue_one_now(const char* cmd);
146
+  static void enqueue_one_now(const char *cmd);
147 147
 
148 148
   /**
149 149
    * Attempt to enqueue a single G-code command
@@ -219,7 +219,7 @@ private:
219 219
    * Enqueue with Serial Echo
220 220
    * Return true on success
221 221
    */
222
-  static bool enqueue_one(const char* cmd);
222
+  static bool enqueue_one(const char *cmd);
223 223
 
224 224
   static void gcode_line_error(PGM_P const err, const serial_index_t serial_ind);
225 225
 

+ 2
- 2
Marlin/src/lcd/HD44780/marlinui_HD44780.cpp Parādīt failu

@@ -1076,7 +1076,7 @@ void MarlinUI::draw_status_screen() {
1076 1076
   }
1077 1077
 
1078 1078
   // Draw a menu item with a (potentially) editable value
1079
-  void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char* const inStr, const bool pgm) {
1079
+  void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char * const inStr, const bool pgm) {
1080 1080
     const uint8_t vlen = inStr ? (pgm ? utf8_strlen_P(inStr) : utf8_strlen(inStr)) : 0;
1081 1081
     lcd_put_wchar(0, row, sel ? LCD_STR_ARROW_RIGHT[0] : ' ');
1082 1082
     uint8_t n = lcd_put_u8str_ind_P(pstr, itemIndex, itemString, LCD_WIDTH - 2 - vlen);
@@ -1088,7 +1088,7 @@ void MarlinUI::draw_status_screen() {
1088 1088
   }
1089 1089
 
1090 1090
   // Low-level draw_edit_screen can be used to draw an edit screen from anyplace
1091
-  void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) {
1091
+  void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char * const value/*=nullptr*/) {
1092 1092
     ui.encoder_direction_normal();
1093 1093
     uint8_t n = lcd_put_u8str_ind_P(0, 1, pstr, itemIndex, itemString, LCD_WIDTH - 1);
1094 1094
     if (value) {

+ 2
- 2
Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp Parādīt failu

@@ -835,7 +835,7 @@ void MarlinUI::draw_status_screen() {
835 835
   }
836 836
 
837 837
   // Draw a menu item with a (potentially) editable value
838
-  void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm) {
838
+  void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char * const data, const bool pgm) {
839 839
     if (!PanelDetected) return;
840 840
     const uint8_t vlen = data ? (pgm ? utf8_strlen_P(data) : utf8_strlen(data)) : 0;
841 841
     lcd.setCursor(0, row);
@@ -851,7 +851,7 @@ void MarlinUI::draw_status_screen() {
851 851
 
852 852
   // Low-level draw_edit_screen can be used to draw an edit screen from anyplace
853 853
   // This line moves to the last line of the screen for UBL plot screen on the panel side
854
-  void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) {
854
+  void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char * const value/*=nullptr*/) {
855 855
     if (!PanelDetected) return;
856 856
     ui.encoder_direction_normal();
857 857
     const uint8_t y = TERN0(AUTO_BED_LEVELING_UBL, ui.external_control) ? LCD_HEIGHT - 1 : MIDDLE_Y;

+ 2
- 2
Marlin/src/lcd/dogm/marlinui_DOGM.cpp Parādīt failu

@@ -385,7 +385,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
385 385
   }
386 386
 
387 387
   // Draw a menu item with an editable value
388
-  void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char* const inStr, const bool pgm) {
388
+  void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char * const inStr, const bool pgm) {
389 389
     if (mark_as_selected(row, sel)) {
390 390
       const uint8_t vallen = (pgm ? utf8_strlen_P(inStr) : utf8_strlen((char*)inStr)),
391 391
                     pixelwidth = (pgm ? uxg_GetUtf8StrPixelWidthP(u8g.getU8g(), inStr) : uxg_GetUtf8StrPixelWidth(u8g.getU8g(), (char*)inStr));
@@ -400,7 +400,7 @@ void MarlinUI::clear_lcd() { } // Automatically cleared by Picture Loop
400 400
     }
401 401
   }
402 402
 
403
-  void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) {
403
+  void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char * const value/*=nullptr*/) {
404 404
     ui.encoder_direction_normal();
405 405
 
406 406
     const u8g_uint_t labellen = utf8_strlen_P(pstr), vallen = utf8_strlen(value);

+ 3
- 3
Marlin/src/lcd/dogm/u8g_dev_tft_upscale_from_128x64.cpp Parādīt failu

@@ -311,7 +311,7 @@ static void setWindow(u8g_t *u8g, u8g_dev_t *dev, uint16_t Xmin, uint16_t Ymin,
311 311
 
312 312
 // Used to fill RGB565 (16bits) background
313 313
 inline void memset2(const void *ptr, uint16_t fill, size_t cnt) {
314
-  uint16_t* wptr = (uint16_t*)ptr;
314
+  uint16_t *wptr = (uint16_t*)ptr;
315 315
   for (size_t i = 0; i < cnt; i += 2) { *wptr = fill; wptr++; }
316 316
 }
317 317
 
@@ -346,7 +346,7 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u
346 346
 
347 347
   #if HAS_LCD_IO
348 348
     static uint16_t bufferA[WIDTH * sq(GRAPHICAL_TFT_UPSCALE)], bufferB[WIDTH * sq(GRAPHICAL_TFT_UPSCALE)];
349
-    uint16_t* buffer = &bufferA[0];
349
+    uint16_t *buffer = &bufferA[0];
350 350
   #else
351 351
     uint16_t buffer[WIDTH * GRAPHICAL_TFT_UPSCALE]; // 16-bit RGB 565 pixel line buffer
352 352
   #endif
@@ -404,7 +404,7 @@ uint8_t u8g_dev_tft_320x240_upscale_from_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, u
404 404
 
405 405
           tftio.WriteSequence(buffer, COUNT(bufferA));
406 406
         #else
407
-          uint8_t* bufptr = (uint8_t*) buffer;
407
+          uint8_t *bufptr = (uint8_t*) buffer;
408 408
           for (uint8_t i = GRAPHICAL_TFT_UPSCALE; i--;) {
409 409
             LOOP_S_L_N(n, 0, GRAPHICAL_TFT_UPSCALE * 2) {
410 410
               u8g_WriteSequence(u8g, dev, WIDTH, &bufptr[WIDTH * n]);

+ 2
- 2
Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp Parādīt failu

@@ -148,8 +148,8 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo
148 148
     case U8G_DEV_MSG_STOP: break;
149 149
 
150 150
     case U8G_DEV_MSG_PAGE_NEXT: {
151
-      uint8_t* ptr;
152
-      u8g_pb_t* pb = (u8g_pb_t*)(dev->dev_mem);
151
+      uint8_t *ptr;
152
+      u8g_pb_t *pb = (u8g_pb_t*)(dev->dev_mem);
153 153
       y = pb->p.page_y0;
154 154
       ptr = (uint8_t*)pb->buf;
155 155
 

+ 2
- 2
Marlin/src/lcd/extui/lib/dgus/DGUSScreenHandler.cpp Parādīt failu

@@ -62,7 +62,7 @@ void (*DGUSScreenHandler::confirm_action_cb)() = nullptr;
62 62
   filament_data_t filament_data;
63 63
 #endif
64 64
 
65
-void DGUSScreenHandler::sendinfoscreen(const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool l4inflash) {
65
+void DGUSScreenHandler::sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool l4inflash) {
66 66
   DGUS_VP_Variable ramcopy;
67 67
   if (populate_VPVar(VP_MSGSTR1, &ramcopy)) {
68 68
     ramcopy.memadr = (void*) line1;
@@ -82,7 +82,7 @@ void DGUSScreenHandler::sendinfoscreen(const char* line1, const char* line2, con
82 82
   }
83 83
 }
84 84
 
85
-void DGUSScreenHandler::HandleUserConfirmationPopUp(uint16_t VP, const char* line1, const char* line2, const char* line3, const char* line4, bool l1, bool l2, bool l3, bool l4) {
85
+void DGUSScreenHandler::HandleUserConfirmationPopUp(uint16_t VP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1, bool l2, bool l3, bool l4) {
86 86
   if (current_screen == DGUSLCD_SCREEN_CONFIRM) // Already showing a pop up, so we need to cancel that first.
87 87
     PopToOldScreen();
88 88
 

+ 3
- 3
Marlin/src/lcd/extui/lib/dgus/fysetc/DGUSScreenHandler.h Parādīt failu

@@ -37,12 +37,12 @@ public:
37 37
 
38 38
   // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
39 39
   // The bools specifing whether the strings are in RAM or FLASH.
40
-  static void sendinfoscreen(const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
40
+  static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
41 41
 
42
-  static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
42
+  static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
43 43
 
44 44
   // "M117" Message -- msg is a RAM ptr.
45
-  static void setstatusmessage(const char* msg);
45
+  static void setstatusmessage(const char *msg);
46 46
   // The same for messages from Flash
47 47
   static void setstatusmessagePGM(PGM_P const msg);
48 48
   // Callback for VP "Display wants to change screen on idle printer"

+ 3
- 3
Marlin/src/lcd/extui/lib/dgus/hiprecy/DGUSScreenHandler.h Parādīt failu

@@ -37,12 +37,12 @@ public:
37 37
 
38 38
   // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
39 39
   // The bools specifing whether the strings are in RAM or FLASH.
40
-  static void sendinfoscreen(const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
40
+  static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
41 41
 
42
-  static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
42
+  static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
43 43
 
44 44
   // "M117" Message -- msg is a RAM ptr.
45
-  static void setstatusmessage(const char* msg);
45
+  static void setstatusmessage(const char *msg);
46 46
   // The same for messages from Flash
47 47
   static void setstatusmessagePGM(PGM_P const msg);
48 48
   // Callback for VP "Display wants to change screen on idle printer"

+ 2
- 2
Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.cpp Parādīt failu

@@ -61,14 +61,14 @@ uint8_t DGUSLanguageSwitch = 0; // Switch language for MKS DGUS
61 61
 uint32_t swap32(const uint32_t value) { return (value & 0x000000FFU) << 24U | (value & 0x0000FF00U) << 8U | (value & 0x00FF0000U) >> 8U | (value & 0xFF000000U) >> 24U; }
62 62
 
63 63
 #if 0
64
-void DGUSScreenHandler::sendinfoscreen_ch_mks(const uint16_t* line1, const uint16_t* line2, const uint16_t* line3, const uint16_t* line4) {
64
+void DGUSScreenHandler::sendinfoscreen_ch_mks(const uint16_t *line1, const uint16_t *line2, const uint16_t *line3, const uint16_t *line4) {
65 65
   dgusdisplay.WriteVariable(VP_MSGSTR1, line1, 32, true);
66 66
   dgusdisplay.WriteVariable(VP_MSGSTR2, line2, 32, true);
67 67
   dgusdisplay.WriteVariable(VP_MSGSTR3, line3, 32, true);
68 68
   dgusdisplay.WriteVariable(VP_MSGSTR4, line4, 32, true);
69 69
 }
70 70
 
71
-void DGUSScreenHandler::sendinfoscreen_en_mks(const char* line1, const char* line2, const char* line3, const char* line4) {
71
+void DGUSScreenHandler::sendinfoscreen_en_mks(const char *line1, const char *line2, const char *line3, const char *line4) {
72 72
   dgusdisplay.WriteVariable(VP_MSGSTR1, line1, 32, true);
73 73
   dgusdisplay.WriteVariable(VP_MSGSTR2, line2, 32, true);
74 74
   dgusdisplay.WriteVariable(VP_MSGSTR3, line3, 32, true);

+ 5
- 5
Marlin/src/lcd/extui/lib/dgus/mks/DGUSScreenHandler.h Parādīt failu

@@ -37,18 +37,18 @@ public:
37 37
 
38 38
   // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
39 39
   // The bools specifing whether the strings are in RAM or FLASH.
40
-  static void sendinfoscreen(const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
40
+  static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
41 41
 
42
-  static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
42
+  static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
43 43
 
44 44
   #if 0
45
-  static void sendinfoscreen_ch_mks(const uint16_t* line1, const uint16_t* line2, const uint16_t* line3, const uint16_t* line4);
46
-  static void sendinfoscreen_en_mks(const char* line1, const char* line2, const char* line3, const char* line4) ;
45
+  static void sendinfoscreen_ch_mks(const uint16_t *line1, const uint16_t *line2, const uint16_t *line3, const uint16_t *line4);
46
+  static void sendinfoscreen_en_mks(const char *line1, const char *line2, const char *line3, const char *line4) ;
47 47
   static void sendinfoscreen_mks(const void* line1, const void* line2, const void* line3, const void* line4,uint16_t language);
48 48
   #endif
49 49
 
50 50
   // "M117" Message -- msg is a RAM ptr.
51
-  static void setstatusmessage(const char* msg);
51
+  static void setstatusmessage(const char *msg);
52 52
   // The same for messages from Flash
53 53
   static void setstatusmessagePGM(PGM_P const msg);
54 54
   // Callback for VP "Display wants to change screen on idle printer"

+ 3
- 3
Marlin/src/lcd/extui/lib/dgus/origin/DGUSScreenHandler.h Parādīt failu

@@ -37,12 +37,12 @@ public:
37 37
 
38 38
   // Send all 4 strings that are displayed on the infoscreen, confirmation screen and kill screen
39 39
   // The bools specifing whether the strings are in RAM or FLASH.
40
-  static void sendinfoscreen(const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
40
+  static void sendinfoscreen(const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
41 41
 
42
-  static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char* line1, const char* line2, const char* line3, const char* line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
42
+  static void HandleUserConfirmationPopUp(uint16_t ConfirmVP, const char *line1, const char *line2, const char *line3, const char *line4, bool l1inflash, bool l2inflash, bool l3inflash, bool liinflash);
43 43
 
44 44
   // "M117" Message -- msg is a RAM ptr.
45
-  static void setstatusmessage(const char* msg);
45
+  static void setstatusmessage(const char *msg);
46 46
   // The same for messages from Flash
47 47
   static void setstatusmessagePGM(PGM_P const msg);
48 48
   // Callback for VP "Display wants to change screen on idle printer"

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/media_file_reader.cpp Parādīt failu

@@ -26,7 +26,7 @@
26 26
   #include "media_file_reader.h"
27 27
 
28 28
   #if ENABLED(SDSUPPORT)
29
-    bool MediaFileReader::open(const char* filename) {
29
+    bool MediaFileReader::open(const char *filename) {
30 30
       card.init(SD_SPI_SPEED, SDSS);
31 31
       volume.init(&card);
32 32
       root.openRoot(&volume);

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/archim2-flash/media_file_reader.h Parādīt failu

@@ -38,7 +38,7 @@ class MediaFileReader {
38 38
     #endif
39 39
 
40 40
   public:
41
-    bool open(const char* filename);
41
+    bool open(const char *filename);
42 42
     int16_t read(void *buff, size_t bytes);
43 43
     uint32_t size();
44 44
     void rewind();

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.cpp Parādīt failu

@@ -103,12 +103,12 @@ namespace FTDI {
103 103
   #endif
104 104
 
105 105
   void SPI::spi_read_bulk(void *data, uint16_t len) {
106
-    uint8_t* p = (uint8_t *)data;
106
+    uint8_t *p = (uint8_t *)data;
107 107
     while (len--) *p++ = spi_recv();
108 108
   }
109 109
 
110 110
   bool SPI::spi_verify_bulk(const void *data, uint16_t len) {
111
-    const uint8_t* p = (const uint8_t *)data;
111
+    const uint8_t *p = (const uint8_t *)data;
112 112
     while (len--) if (*p++ != spi_recv()) return false;
113 113
     return true;
114 114
   }

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/basic/spi.h Parādīt failu

@@ -116,14 +116,14 @@ namespace FTDI {
116 116
 
117 117
     template<bulk_write_op byte_op>
118 118
     void spi_write_bulk(const void *data, uint16_t len, uint8_t padding) {
119
-      const uint8_t* p = (const uint8_t *)data;
119
+      const uint8_t *p = (const uint8_t *)data;
120 120
       while (len--)     spi_send(byte_op(p++));
121 121
       while (padding--) spi_send(0);
122 122
     }
123 123
 
124 124
     template<bulk_write_op byte_op>
125 125
     void spi_write_bulk(const void *data, uint16_t len) {
126
-      const uint8_t* p = (const uint8_t *)data;
126
+      const uint8_t *p = (const uint8_t *)data;
127 127
       while (len--) spi_send(byte_op(p++));
128 128
     }
129 129
 

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_list.h Parādīt failu

@@ -24,7 +24,7 @@
24 24
 class SoundList {
25 25
   private:
26 26
     static PROGMEM const struct list_t {
27
-      const char *const PROGMEM name;
27
+      const char * const PROGMEM name;
28 28
       const FTDI::SoundPlayer::sound_t* data;
29 29
     } list[];
30 30
   public:

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.cpp Parādīt failu

@@ -62,7 +62,7 @@ namespace FTDI {
62 62
     timer.start();
63 63
   }
64 64
 
65
-  void SoundPlayer::play(const sound_t* seq, play_mode_t mode) {
65
+  void SoundPlayer::play(const sound_t *seq, play_mode_t mode) {
66 66
     sequence = seq;
67 67
     wait     = 250; // Adding this delay causes the note to not be clipped, not sure why.
68 68
     timer.start();

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/sound_player.h Parādīt failu

@@ -55,7 +55,7 @@ namespace FTDI {
55 55
       static void play(effect_t effect, note_t note = NOTE_C4);
56 56
       static bool is_sound_playing();
57 57
 
58
-      void play(const sound_t* seq, play_mode_t mode = PLAY_SYNCHRONOUS);
58
+      void play(const sound_t *seq, play_mode_t mode = PLAY_SYNCHRONOUS);
59 59
       void play_tone(const uint16_t frequency_hz, const uint16_t duration_ms);
60 60
       bool has_more_notes() {return sequence != 0;};
61 61
 

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/ftdi_eve_lib/extended/text_ellipsis.cpp Parādīt failu

@@ -47,7 +47,7 @@ namespace FTDI {
47 47
           break;
48 48
       }
49 49
     #else
50
-      for (char* c = str; *c; c++) {
50
+      for (char *c = str; *c; c++) {
51 51
         lineWidth += fm.get_char_width(*c);
52 52
         if (lineWidth + ellipsisWidth < w)
53 53
           breakPoint = c;

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/marlin_events.cpp Parādīt failu

@@ -71,7 +71,7 @@ namespace ExtUI {
71 71
     AlertDialogBox::showError(F("Unable to read media."));
72 72
   }
73 73
 
74
-  void onStatusChanged(const char* lcd_msg) {
74
+  void onStatusChanged(const char *lcd_msg) {
75 75
     StatusScreen::setStatusMessage(lcd_msg);
76 76
   }
77 77
 

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/bio_printing_dialog_box.cpp Parādīt failu

@@ -34,7 +34,7 @@ using namespace Theme;
34 34
 #define GRID_COLS 2
35 35
 #define GRID_ROWS 9
36 36
 
37
-void BioPrintingDialogBox::draw_status_message(draw_mode_t what, const char* message) {
37
+void BioPrintingDialogBox::draw_status_message(draw_mode_t what, const char *message) {
38 38
   if (what & BACKGROUND) {
39 39
     CommandProcessor cmd;
40 40
     cmd.cmd(COLOR_RGB(bg_text_enabled))
@@ -113,7 +113,7 @@ void BioPrintingDialogBox::setStatusMessage(progmem_str message) {
113 113
   setStatusMessage(buff);
114 114
 }
115 115
 
116
-void BioPrintingDialogBox::setStatusMessage(const char* message) {
116
+void BioPrintingDialogBox::setStatusMessage(const char *message) {
117 117
   CommandProcessor cmd;
118 118
   cmd.cmd(CMD_DLSTART)
119 119
      .cmd(CLEAR_COLOR_RGB(bg_color))

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/confirm_user_request_alert_box.cpp Parādīt failu

@@ -56,7 +56,7 @@ void ConfirmUserRequestAlertBox::onIdle() {
56 56
   }
57 57
 }
58 58
 
59
-void ConfirmUserRequestAlertBox::show(const char* msg) {
59
+void ConfirmUserRequestAlertBox::show(const char *msg) {
60 60
   drawMessage(msg);
61 61
   storeBackground();
62 62
   screen_data.AlertDialogBox.isError = false;

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.cpp Parādīt failu

@@ -76,7 +76,7 @@ uint16_t FilesScreen::getFileForTag(uint8_t tag) {
76 76
   #define GRID_ROWS (files_per_page + header_h + footer_h)
77 77
 #endif
78 78
 
79
-void FilesScreen::drawFileButton(const char* filename, uint8_t tag, bool is_dir, bool is_highlighted) {
79
+void FilesScreen::drawFileButton(const char *filename, uint8_t tag, bool is_dir, bool is_highlighted) {
80 80
   const uint8_t line = getLineForTag(tag)+1;
81 81
   CommandProcessor cmd;
82 82
   cmd.tag(tag);

+ 1
- 1
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/files_screen.h Parādīt failu

@@ -60,7 +60,7 @@ class FilesScreen : public BaseScreen, public CachedScreen<FILES_SCREEN_CACHE, F
60 60
     inline static const char *getSelectedLongFilename()  {return getSelectedFilename(true);}
61 61
     static const char *getSelectedFilename(bool longName);
62 62
 
63
-    static void drawFileButton(const char* filename, uint8_t tag, bool is_dir, bool is_highlighted);
63
+    static void drawFileButton(const char *filename, uint8_t tag, bool is_dir, bool is_highlighted);
64 64
     static void drawFileList();
65 65
     static void drawHeader();
66 66
     static void drawFooter();

+ 2
- 2
Marlin/src/lcd/extui/lib/ftdi_eve_touch_ui/screens/status_screen.cpp Parādīt failu

@@ -324,7 +324,7 @@ void StatusScreen::draw_interaction_buttons(draw_mode_t what) {
324 324
   #undef  GRID_COLS
325 325
 }
326 326
 
327
-void StatusScreen::draw_status_message(draw_mode_t what, const char* message) {
327
+void StatusScreen::draw_status_message(draw_mode_t what, const char *message) {
328 328
   #define GRID_COLS 1
329 329
 
330 330
   #if ENABLED(TOUCH_UI_PORTRAIT)
@@ -350,7 +350,7 @@ void StatusScreen::setStatusMessage(progmem_str message) {
350 350
   setStatusMessage((const char *) buff);
351 351
 }
352 352
 
353
-void StatusScreen::setStatusMessage(const char* message) {
353
+void StatusScreen::setStatusMessage(const char *message) {
354 354
   if (CommandProcessor::is_processing()) {
355 355
     #if ENABLED(TOUCH_UI_DEBUG)
356 356
       SERIAL_ECHO_MSG("Cannot update status message, command processor busy");

+ 6
- 6
Marlin/src/lcd/extui/lib/mks_ui/SPIFlashStorage.cpp Parādīt failu

@@ -167,7 +167,7 @@ void SPIFlashStorage::endWrite() {
167 167
   #endif
168 168
 }
169 169
 
170
-void SPIFlashStorage::savePage(uint8_t* buffer) {
170
+void SPIFlashStorage::savePage(uint8_t *buffer) {
171 171
   W25QXX.SPI_FLASH_BufferWrite(buffer, m_startAddress + (SPI_FLASH_PageSize * m_currentPage), SPI_FLASH_PageSize);
172 172
   // Test env
173 173
   // char fname[256];
@@ -177,7 +177,7 @@ void SPIFlashStorage::savePage(uint8_t* buffer) {
177 177
   // fclose(fp);
178 178
 }
179 179
 
180
-void SPIFlashStorage::loadPage(uint8_t* buffer) {
180
+void SPIFlashStorage::loadPage(uint8_t *buffer) {
181 181
   W25QXX.SPI_FLASH_BufferRead(buffer, m_startAddress + (SPI_FLASH_PageSize * m_currentPage), SPI_FLASH_PageSize);
182 182
   // Test env
183 183
   // char fname[256];
@@ -256,7 +256,7 @@ void SPIFlashStorage::readPage() {
256 256
   #endif
257 257
 }
258 258
 
259
-uint16_t SPIFlashStorage::inData(uint8_t* data, uint16_t size) {
259
+uint16_t SPIFlashStorage::inData(uint8_t *data, uint16_t size) {
260 260
   // Don't write more than we can
261 261
   NOMORE(size, pageDataFree());
262 262
   memcpy(m_pageData + m_pageDataUsed, data, size);
@@ -264,7 +264,7 @@ uint16_t SPIFlashStorage::inData(uint8_t* data, uint16_t size) {
264 264
   return size;
265 265
 }
266 266
 
267
-void SPIFlashStorage::writeData(uint8_t* data, uint16_t size) {
267
+void SPIFlashStorage::writeData(uint8_t *data, uint16_t size) {
268 268
   // Flush a page if needed
269 269
   if (pageDataFree() == 0) flushPage();
270 270
 
@@ -289,7 +289,7 @@ void SPIFlashStorage::beginRead(uint32_t startAddress) {
289 289
   #endif
290 290
 }
291 291
 
292
-uint16_t SPIFlashStorage::outData(uint8_t* data, uint16_t size) {
292
+uint16_t SPIFlashStorage::outData(uint8_t *data, uint16_t size) {
293 293
   // Don't read more than we have
294 294
   NOMORE(size, pageDataFree());
295 295
   memcpy(data, m_pageData + m_pageDataUsed, size);
@@ -297,7 +297,7 @@ uint16_t SPIFlashStorage::outData(uint8_t* data, uint16_t size) {
297 297
   return size;
298 298
 }
299 299
 
300
-void SPIFlashStorage::readData(uint8_t* data, uint16_t size) {
300
+void SPIFlashStorage::readData(uint8_t *data, uint16_t size) {
301 301
   // Read a page if needed
302 302
   if (pageDataFree() == 0) readPage();
303 303
 

+ 6
- 6
Marlin/src/lcd/extui/lib/mks_ui/SPIFlashStorage.h Parādīt failu

@@ -77,21 +77,21 @@ public:
77 77
   // Write operation
78 78
   static void beginWrite(uint32_t startAddress);
79 79
   static void endWrite();
80
-  static void writeData(uint8_t* data, uint16_t size);
80
+  static void writeData(uint8_t *data, uint16_t size);
81 81
 
82 82
   // Read operation
83 83
   static void beginRead(uint32_t startAddress);
84
-  static void readData(uint8_t* data, uint16_t size);
84
+  static void readData(uint8_t *data, uint16_t size);
85 85
 
86 86
   static uint32_t getCurrentPage() { return m_currentPage; }
87 87
 
88 88
 private:
89 89
   static void flushPage();
90
-  static void savePage(uint8_t* buffer);
91
-  static void loadPage(uint8_t* buffer);
90
+  static void savePage(uint8_t *buffer);
91
+  static void loadPage(uint8_t *buffer);
92 92
   static void readPage();
93
-  static uint16_t inData(uint8_t* data, uint16_t size);
94
-  static uint16_t outData(uint8_t* data, uint16_t size);
93
+  static uint16_t inData(uint8_t *data, uint16_t size);
94
+  static uint16_t outData(uint8_t *data, uint16_t size);
95 95
 
96 96
   static uint8_t m_pageData[SPI_FLASH_PageSize];
97 97
   static uint32_t m_currentPage;

+ 10
- 10
Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp Parādīt failu

@@ -649,7 +649,7 @@ char *creat_title_text() {
649 649
       if (gPicturePreviewStart <= 0) {
650 650
         while (1) {
651 651
           uint32_t br  = card.read(public_buf, 400);
652
-          uint32_t* p1 = (uint32_t *)strstr((char *)public_buf, ";gimage:");
652
+          uint32_t *p1 = (uint32_t *)strstr((char *)public_buf, ";gimage:");
653 653
           if (p1) {
654 654
             gPicturePreviewStart += (uint32_t)p1 - (uint32_t)((uint32_t *)(&public_buf[0]));
655 655
             break;
@@ -1173,7 +1173,7 @@ void lv_btn_set_style_both(lv_obj_t *btn, lv_style_t *style) {
1173 1173
 }
1174 1174
 
1175 1175
 // Create a screen
1176
-lv_obj_t* lv_screen_create(DISP_STATE newScreenType, const char* title) {
1176
+lv_obj_t* lv_screen_create(DISP_STATE newScreenType, const char *title) {
1177 1177
   lv_obj_t *scr = lv_obj_create(nullptr, nullptr);
1178 1178
   lv_obj_set_style(scr, &tft_style_scr);
1179 1179
   lv_scr_load(scr);
@@ -1348,19 +1348,19 @@ lv_obj_t* lv_screen_menu_item(lv_obj_t *par, const char *text, lv_coord_t x, lv_
1348 1348
 }
1349 1349
 
1350 1350
 lv_obj_t* lv_screen_menu_item_1_edit(lv_obj_t *par, const char *text, lv_coord_t x, lv_coord_t y, lv_event_cb_t cb, const int id, const int index, const char *editValue) {
1351
-  lv_obj_t* btn = lv_screen_menu_item(par, text, x, y, cb, -1, index, false);
1352
-  lv_obj_t* btnValue = lv_btn_create(par, PARA_UI_VALUE_POS_X, y + PARA_UI_VALUE_V, PARA_UI_VALUE_BTN_X_SIZE, PARA_UI_VALUE_BTN_Y_SIZE, cb, id);
1353
-  lv_obj_t* labelValue = lv_label_create_empty(btnValue);
1351
+  lv_obj_t *btn = lv_screen_menu_item(par, text, x, y, cb, -1, index, false);
1352
+  lv_obj_t *btnValue = lv_btn_create(par, PARA_UI_VALUE_POS_X, y + PARA_UI_VALUE_V, PARA_UI_VALUE_BTN_X_SIZE, PARA_UI_VALUE_BTN_Y_SIZE, cb, id);
1353
+  lv_obj_t *labelValue = lv_label_create_empty(btnValue);
1354 1354
   lv_label_set_text(labelValue, editValue);
1355 1355
   lv_obj_align(labelValue, btnValue, LV_ALIGN_CENTER, 0, 0);
1356 1356
   return btn;
1357 1357
 }
1358 1358
 
1359 1359
 lv_obj_t* lv_screen_menu_item_2_edit(lv_obj_t *par, const char *text, lv_coord_t x, lv_coord_t y, lv_event_cb_t cb, const int id, const int index, const char *editValue, const int idEdit2, const char *editValue2) {
1360
-  lv_obj_t* btn = lv_screen_menu_item(par, text, x, y, cb, -1, index, false);
1360
+  lv_obj_t *btn = lv_screen_menu_item(par, text, x, y, cb, -1, index, false);
1361 1361
 
1362
-  lv_obj_t* btnValue = lv_btn_create(par, PARA_UI_VALUE_POS_X_2, y + PARA_UI_VALUE_V_2, PARA_UI_VALUE_BTN_X_SIZE, PARA_UI_VALUE_BTN_Y_SIZE, cb, idEdit2);
1363
-  lv_obj_t* labelValue = lv_label_create_empty(btnValue);
1362
+  lv_obj_t *btnValue = lv_btn_create(par, PARA_UI_VALUE_POS_X_2, y + PARA_UI_VALUE_V_2, PARA_UI_VALUE_BTN_X_SIZE, PARA_UI_VALUE_BTN_Y_SIZE, cb, idEdit2);
1363
+  lv_obj_t *labelValue = lv_label_create_empty(btnValue);
1364 1364
   lv_label_set_text(labelValue, editValue2);
1365 1365
   lv_obj_align(labelValue, btnValue, LV_ALIGN_CENTER, 0, 0);
1366 1366
 
@@ -1374,8 +1374,8 @@ lv_obj_t* lv_screen_menu_item_2_edit(lv_obj_t *par, const char *text, lv_coord_t
1374 1374
 
1375 1375
 lv_obj_t* lv_screen_menu_item_onoff(lv_obj_t *par, const char *text, lv_coord_t x, lv_coord_t y, lv_event_cb_t cb, const int id, const int index, const bool curValue) {
1376 1376
   lv_screen_menu_item(par, text, x, y, cb, -1, index, false);
1377
-  lv_obj_t* btnValue = lv_imgbtn_create(par, curValue ? "F:/bmp_enable.bin" : "F:/bmp_disable.bin", PARA_UI_STATE_POS_X, y + PARA_UI_STATE_V, cb, id);
1378
-  lv_obj_t* labelValue = lv_label_create_empty(btnValue);
1377
+  lv_obj_t *btnValue = lv_imgbtn_create(par, curValue ? "F:/bmp_enable.bin" : "F:/bmp_disable.bin", PARA_UI_STATE_POS_X, y + PARA_UI_STATE_V, cb, id);
1378
+  lv_obj_t *labelValue = lv_label_create_empty(btnValue);
1379 1379
   lv_label_set_text(labelValue, curValue ? machine_menu.enable : machine_menu.disable);
1380 1380
   lv_obj_align(labelValue, btnValue, LV_ALIGN_CENTER, 0, 0);
1381 1381
   return btnValue;

+ 1
- 1
Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h Parādīt failu

@@ -482,7 +482,7 @@ void lv_btn_use_label_style(lv_obj_t *btn);
482 482
 void lv_btn_set_style_both(lv_obj_t *btn, lv_style_t *style);
483 483
 
484 484
 // Create a screen
485
-lv_obj_t* lv_screen_create(DISP_STATE newScreenType, const char* title = nullptr);
485
+lv_obj_t* lv_screen_create(DISP_STATE newScreenType, const char *title = nullptr);
486 486
 
487 487
 // Create an empty label
488 488
 lv_obj_t* lv_label_create_empty(lv_obj_t *par);

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/pic_manager.cpp Parādīt failu

@@ -370,7 +370,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) {
370 370
 
371 371
 #if ENABLED(SDSUPPORT)
372 372
 
373
-  static void dosName2LongName(const char dosName[11], char* longName) {
373
+  static void dosName2LongName(const char dosName[11], char *longName) {
374 374
     uint8_t j = 0;
375 375
     LOOP_L_N(i, 11) {
376 376
       if (i == 8) longName[j++] = '.';
@@ -380,7 +380,7 @@ uint32_t Pic_Info_Write(uint8_t *P_name, uint32_t P_size) {
380 380
     longName[j] = '\0';
381 381
   }
382 382
 
383
-  static int8_t arrayFindStr(const char arr[][LONG_FILENAME_LENGTH], uint8_t arraySize, const char* str) {
383
+  static int8_t arrayFindStr(const char arr[][LONG_FILENAME_LENGTH], uint8_t arraySize, const char *str) {
384 384
     for (uint8_t a = 0; a < arraySize; a++) {
385 385
       if (strcasecmp(arr[a], str) == 0)
386 386
         return a;

+ 2
- 2
Marlin/src/lcd/extui/lib/mks_ui/wifi_module.cpp Parādīt failu

@@ -53,7 +53,7 @@
53 53
 #define WIFI_IO1_SET()      WRITE(WIFI_IO1_PIN, HIGH);
54 54
 #define WIFI_IO1_RESET()    WRITE(WIFI_IO1_PIN, LOW);
55 55
 
56
-extern uint8_t Explore_Disk (char* path , uint8_t recu_level);
56
+extern uint8_t Explore_Disk (char *path , uint8_t recu_level);
57 57
 
58 58
 extern uint8_t commands_in_queue;
59 59
 extern uint8_t sel_id;
@@ -566,7 +566,7 @@ static int cut_msg_head(uint8_t *msg, uint16_t msgLen, uint16_t cutLen) {
566 566
   return msgLen - cutLen;
567 567
 }
568 568
 
569
-uint8_t Explore_Disk(char* path , uint8_t recu_level) {
569
+uint8_t Explore_Disk(char *path , uint8_t recu_level) {
570 570
   char tmp[200];
571 571
   char Fstream[200];
572 572
 

+ 2
- 2
Marlin/src/lcd/extui/lib/nextion/nextion_tft.cpp Parādīt failu

@@ -101,14 +101,14 @@ void NextionTFT::PrintFinished() {
101 101
   SEND_TXT_END("page printfinished");
102 102
 }
103 103
 
104
-void NextionTFT::ConfirmationRequest(const char *const msg) {
104
+void NextionTFT::ConfirmationRequest(const char * const msg) {
105 105
   SEND_VALasTXT("tmppage.M117", msg);
106 106
   #if NEXDEBUG(N_MARLIN)
107 107
     DEBUG_ECHOLNPAIR("ConfirmationRequest() ", msg, " printer_state:", printer_state);
108 108
   #endif
109 109
 }
110 110
 
111
-void NextionTFT::StatusChange(const char *const msg) {
111
+void NextionTFT::StatusChange(const char * const msg) {
112 112
   #if NEXDEBUG(N_MARLIN)
113 113
     DEBUG_ECHOLNPAIR("StatusChange() ", msg, "\nprinter_state:", printer_state);
114 114
   #endif

+ 7
- 7
Marlin/src/lcd/extui/malyan_lcd.cpp Parādīt failu

@@ -118,7 +118,7 @@ void set_lcd_error_P(PGM_P const error, PGM_P const component=nullptr) {
118 118
  *
119 119
  * the command portion begins after the :
120 120
  */
121
-void process_lcd_c_command(const char* command) {
121
+void process_lcd_c_command(const char *command) {
122 122
   const int target_val = command[1] ? atoi(command + 1) : -1;
123 123
   if (target_val < 0) {
124 124
     DEBUG_ECHOLNPAIR("UNKNOWN C COMMAND ", command);
@@ -153,7 +153,7 @@ void process_lcd_c_command(const char* command) {
153 153
  * time remaining (HH:MM:SS). The UI can't handle displaying a second hotend,
154 154
  * but the stock firmware always sends it, and it's always zero.
155 155
  */
156
-void process_lcd_eb_command(const char* command) {
156
+void process_lcd_eb_command(const char *command) {
157 157
   char elapsed_buffer[10];
158 158
   static uint8_t iteration = 0;
159 159
   duration_t elapsed;
@@ -203,12 +203,12 @@ void process_lcd_eb_command(const char* command) {
203 203
  * X, Y, Z, A (extruder)
204 204
  */
205 205
 template<typename T>
206
-void j_move_axis(const char* command, const T axis) {
206
+void j_move_axis(const char *command, const T axis) {
207 207
   const float dist = atof(command + 1) / 10.0;
208 208
   ExtUI::setAxisPosition_mm(ExtUI::getAxisPosition_mm(axis) + dist, axis);
209 209
 };
210 210
 
211
-void process_lcd_j_command(const char* command) {
211
+void process_lcd_j_command(const char *command) {
212 212
   switch (command[0]) {
213 213
     case 'E': break;
214 214
     case 'A': j_move_axis<ExtUI::extruder_t>(command, ExtUI::extruder_t::E0); break;
@@ -241,7 +241,7 @@ void process_lcd_j_command(const char* command) {
241 241
  * T:-2537.4 E:0
242 242
  * Note only the curly brace stuff matters.
243 243
  */
244
-void process_lcd_p_command(const char* command) {
244
+void process_lcd_p_command(const char *command) {
245 245
 
246 246
   switch (command[0]) {
247 247
     case 'P':
@@ -301,7 +301,7 @@ void process_lcd_p_command(const char* command) {
301 301
  * {FILE:fcupdate.flg}
302 302
  * {SYS:OK}
303 303
  */
304
-void process_lcd_s_command(const char* command) {
304
+void process_lcd_s_command(const char *command) {
305 305
   switch (command[0]) {
306 306
     case 'I': {
307 307
       // temperature information
@@ -348,7 +348,7 @@ void process_lcd_s_command(const char* command) {
348 348
  * Currently {E:0} is not handled. Its function is unknown,
349 349
  * but it occurs during the temp window after a sys build.
350 350
  */
351
-void process_lcd_command(const char* command) {
351
+void process_lcd_command(const char *command) {
352 352
   const char *current = command;
353 353
 
354 354
   byte command_code = *current++;

+ 1
- 1
Marlin/src/lcd/lcdprint.h Parādīt failu

@@ -161,7 +161,7 @@ inline lcd_uint_t lcd_put_u8str_ind_P(const lcd_uint_t col, const lcd_uint_t row
161 161
   return lcd_put_u8str_ind_P(pstr, ind, inStr, maxlen);
162 162
 }
163 163
 
164
-inline int lcd_put_u8str(const char* str) { return lcd_put_u8str_max(str, PIXEL_LEN_NOLIMIT); }
164
+inline int lcd_put_u8str(const char *str) { return lcd_put_u8str_max(str, PIXEL_LEN_NOLIMIT); }
165 165
 inline int lcd_put_u8str(const lcd_uint_t col, const lcd_uint_t row, PGM_P const str) {
166 166
   lcd_moveto(col, row);
167 167
   return lcd_put_u8str(str);

+ 2
- 2
Marlin/src/lcd/marlinui.h Parādīt failu

@@ -292,7 +292,7 @@ public:
292 292
 
293 293
     static bool has_status();
294 294
     static void reset_status(const bool no_welcome=false);
295
-    static void set_status(const char* const message, const bool persist=false);
295
+    static void set_status(const char * const message, const bool persist=false);
296 296
     static void set_status_P(PGM_P const message, const int8_t level=0);
297 297
     static void status_printf_P(const uint8_t level, PGM_P const fmt, ...);
298 298
     static void set_alert_status_P(PGM_P const message);
@@ -300,7 +300,7 @@ public:
300 300
   #else
301 301
     static constexpr bool has_status() { return false; }
302 302
     static inline void reset_status(const bool=false) {}
303
-    static void set_status(const char* message, const bool=false);
303
+    static void set_status(const char *message, const bool=false);
304 304
     static void set_status_P(PGM_P message, const int8_t=0);
305 305
     static void status_printf_P(const uint8_t, PGM_P message, ...);
306 306
     static inline void set_alert_status_P(PGM_P const) {}

+ 3
- 3
Marlin/src/lcd/menu/menu.h Parādīt failu

@@ -172,14 +172,14 @@ class MenuEditItemBase : public MenuItemBase {
172 172
   public:
173 173
     // Implemented for HD44780 and DOGM
174 174
     // Draw the current item at specified row with edit data
175
-    static void draw(const bool sel, const uint8_t row, PGM_P const pstr, const char* const inStr, const bool pgm=false);
175
+    static void draw(const bool sel, const uint8_t row, PGM_P const pstr, const char * const inStr, const bool pgm=false);
176 176
 
177 177
     // Implemented for HD44780 and DOGM
178 178
     // This low-level method is good to draw from anywhere
179
-    static void draw_edit_screen(PGM_P const pstr, const char* const value);
179
+    static void draw_edit_screen(PGM_P const pstr, const char * const value);
180 180
 
181 181
     // This method is for the current menu item
182
-    static inline void draw_edit_screen(const char* const value) { draw_edit_screen(editLabel, value); }
182
+    static inline void draw_edit_screen(const char * const value) { draw_edit_screen(editLabel, value); }
183 183
 };
184 184
 
185 185
 #if ENABLED(SDSUPPORT)

+ 1
- 1
Marlin/src/lcd/tft/ui_320x240.cpp Parādīt failu

@@ -326,7 +326,7 @@ void MarlinUI::draw_status_screen() {
326 326
 }
327 327
 
328 328
 // Low-level draw_edit_screen can be used to draw an edit screen from anyplace
329
-void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) {
329
+void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char * const value/*=nullptr*/) {
330 330
   ui.encoder_direction_normal();
331 331
   TERN_(TOUCH_SCREEN, touch.clear());
332 332
 

+ 2
- 2
Marlin/src/lcd/tft/ui_480x320.cpp Parādīt failu

@@ -326,7 +326,7 @@ void MarlinUI::draw_status_screen() {
326 326
 }
327 327
 
328 328
 // Low-level draw_edit_screen can be used to draw an edit screen from anyplace
329
-void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char* const value/*=nullptr*/) {
329
+void MenuEditItemBase::draw_edit_screen(PGM_P const pstr, const char * const value/*=nullptr*/) {
330 330
   ui.encoder_direction_normal();
331 331
   TERN_(TOUCH_SCREEN, touch.clear());
332 332
 
@@ -779,7 +779,7 @@ static void disable_steppers() {
779 779
   queue.inject_P(PSTR("M84"));
780 780
 }
781 781
 
782
-static void drawBtn(int x, int y, const char* label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) {
782
+static void drawBtn(int x, int y, const char *label, intptr_t data, MarlinImage img, uint16_t bgColor, bool enabled = true) {
783 783
   uint16_t width = Images[imgBtn52Rounded].width;
784 784
   uint16_t height = Images[imgBtn52Rounded].height;
785 785
 

+ 1
- 1
Marlin/src/lcd/tft/ui_common.cpp Parādīt failu

@@ -131,7 +131,7 @@ void MenuItemBase::_draw(const bool sel, const uint8_t row, PGM_P const pstr, co
131 131
 }
132 132
 
133 133
 // Draw a menu item with a (potentially) editable value
134
-void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char* const data, const bool pgm) {
134
+void MenuEditItemBase::draw(const bool sel, const uint8_t row, PGM_P const pstr, const char * const data, const bool pgm) {
135 135
   menu_item(row, sel);
136 136
 
137 137
   tft_string.set(pstr, itemIndex, itemString);

+ 5
- 5
Marlin/src/libs/W25Qxx.cpp Parādīt failu

@@ -106,7 +106,7 @@ uint8_t W25QXXFlash::spi_flash_read_write_byte(uint8_t data) {
106 106
  *
107 107
  * @details Uses DMA
108 108
  */
109
-void W25QXXFlash::spi_flash_Read(uint8_t* buf, uint16_t nbyte) {
109
+void W25QXXFlash::spi_flash_Read(uint8_t *buf, uint16_t nbyte) {
110 110
   mySPI.dmaTransfer(0, const_cast<uint8_t*>(buf), nbyte);
111 111
 }
112 112
 
@@ -127,7 +127,7 @@ void W25QXXFlash::spi_flash_Send(uint8_t b) { mySPI.transfer(b); }
127 127
  *
128 128
  * @details Use DMA
129 129
  */
130
-void W25QXXFlash::spi_flash_SendBlock(uint8_t token, const uint8_t* buf) {
130
+void W25QXXFlash::spi_flash_SendBlock(uint8_t token, const uint8_t *buf) {
131 131
   mySPI.transfer(token);
132 132
   mySPI.dmaSend(const_cast<uint8_t*>(buf), 512);
133 133
 }
@@ -257,7 +257,7 @@ void W25QXXFlash::SPI_FLASH_BulkErase(void) {
257 257
 * Output         : None
258 258
 * Return         : None
259 259
 *******************************************************************************/
260
-void W25QXXFlash::SPI_FLASH_PageWrite(uint8_t* pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite) {
260
+void W25QXXFlash::SPI_FLASH_PageWrite(uint8_t *pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite) {
261 261
   // Enable the write access to the FLASH
262 262
   SPI_FLASH_WriteEnable();
263 263
 
@@ -300,7 +300,7 @@ void W25QXXFlash::SPI_FLASH_PageWrite(uint8_t* pBuffer, uint32_t WriteAddr, uint
300 300
 * Output         : None
301 301
 * Return         : None
302 302
 *******************************************************************************/
303
-void W25QXXFlash::SPI_FLASH_BufferWrite(uint8_t* pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite) {
303
+void W25QXXFlash::SPI_FLASH_BufferWrite(uint8_t *pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite) {
304 304
   uint8_t NumOfPage = 0, NumOfSingle = 0, Addr = 0, count = 0, temp = 0;
305 305
 
306 306
   Addr = WriteAddr % SPI_FLASH_PageSize;
@@ -364,7 +364,7 @@ void W25QXXFlash::SPI_FLASH_BufferWrite(uint8_t* pBuffer, uint32_t WriteAddr, ui
364 364
 * Output         : None
365 365
 * Return         : None
366 366
 *******************************************************************************/
367
-void W25QXXFlash::SPI_FLASH_BufferRead(uint8_t* pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead) {
367
+void W25QXXFlash::SPI_FLASH_BufferRead(uint8_t *pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead) {
368 368
   // Select the FLASH: Chip Select low
369 369
   W25QXX_CS_L;
370 370
 

+ 5
- 5
Marlin/src/libs/W25Qxx.h Parādīt failu

@@ -57,18 +57,18 @@ public:
57 57
   void init(uint8_t spiRate);
58 58
   static uint8_t spi_flash_Rec();
59 59
   static uint8_t spi_flash_read_write_byte(uint8_t data);
60
-  static void spi_flash_Read(uint8_t* buf, uint16_t nbyte);
60
+  static void spi_flash_Read(uint8_t *buf, uint16_t nbyte);
61 61
   static void spi_flash_Send(uint8_t b);
62
-  static void spi_flash_SendBlock(uint8_t token, const uint8_t* buf);
62
+  static void spi_flash_SendBlock(uint8_t token, const uint8_t *buf);
63 63
   static uint16_t W25QXX_ReadID(void);
64 64
   static void SPI_FLASH_WriteEnable(void);
65 65
   static void SPI_FLASH_WaitForWriteEnd(void);
66 66
   static void SPI_FLASH_SectorErase(uint32_t SectorAddr);
67 67
   static void SPI_FLASH_BlockErase(uint32_t BlockAddr);
68 68
   static void SPI_FLASH_BulkErase(void);
69
-  static void SPI_FLASH_PageWrite(uint8_t* pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite);
70
-  static void SPI_FLASH_BufferWrite(uint8_t* pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite);
71
-  static void SPI_FLASH_BufferRead(uint8_t* pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead);
69
+  static void SPI_FLASH_PageWrite(uint8_t *pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite);
70
+  static void SPI_FLASH_BufferWrite(uint8_t *pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite);
71
+  static void SPI_FLASH_BufferRead(uint8_t *pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead);
72 72
 };
73 73
 
74 74
 extern W25QXXFlash W25QXX;

+ 2
- 2
Marlin/src/libs/softspi.h Parādīt failu

@@ -715,7 +715,7 @@ class SoftSPI {
715 715
 
716 716
   FORCE_INLINE bool MODE_CPHA(uint8_t mode) { return bool(mode & 1); }
717 717
   FORCE_INLINE bool MODE_CPOL(uint8_t mode) { return bool(mode & 2); }
718
-  FORCE_INLINE void receiveBit(uint8_t bit, uint8_t* data) {
718
+  FORCE_INLINE void receiveBit(uint8_t bit, uint8_t *data) {
719 719
     if (MODE_CPHA(Mode)) fastDigitalWrite(SckPin, !MODE_CPOL(Mode));
720 720
     nop;
721 721
     nop;
@@ -734,7 +734,7 @@ class SoftSPI {
734 734
     if (!MODE_CPHA(Mode)) fastDigitalWrite(SckPin, MODE_CPOL(Mode));
735 735
   }
736 736
 
737
-  FORCE_INLINE void transferBit(uint8_t bit, uint8_t* rxData, uint8_t txData) {
737
+  FORCE_INLINE void transferBit(uint8_t bit, uint8_t *rxData, uint8_t txData) {
738 738
     if (MODE_CPHA(Mode)) fastDigitalWrite(SckPin, !MODE_CPOL(Mode));
739 739
     fastDigitalWrite(MosiPin, txData & _BV(bit));
740 740
     fastDigitalWrite(SckPin,

+ 5
- 5
Marlin/src/module/planner.cpp Parādīt failu

@@ -381,7 +381,7 @@ void Planner::init() {
381 381
               r9 = (d >> 8) & 0xFF,
382 382
               r10 = (d >> 16) & 0xFF,
383 383
               r2,r3,r4,r5,r6,r7,r11,r12,r13,r14,r15,r16,r17,r18;
384
-      const uint8_t* ptab = inv_tab;
384
+      const uint8_t *ptab = inv_tab;
385 385
 
386 386
       __asm__ __volatile__(
387 387
         // %8:%7:%6 = interval
@@ -775,7 +775,7 @@ block_t* Planner::get_current_block() {
775 775
  * is not and will not use the block while we modify it, so it is safe to
776 776
  * alter its values.
777 777
  */
778
-void Planner::calculate_trapezoid_for_block(block_t* const block, const float &entry_factor, const float &exit_factor) {
778
+void Planner::calculate_trapezoid_for_block(block_t * const block, const float &entry_factor, const float &exit_factor) {
779 779
 
780 780
   uint32_t initial_rate = CEIL(block->nominal_rate * entry_factor),
781 781
            final_rate = CEIL(block->nominal_rate * exit_factor); // (steps per second)
@@ -942,7 +942,7 @@ void Planner::calculate_trapezoid_for_block(block_t* const block, const float &e
942 942
 */
943 943
 
944 944
 // The kernel called by recalculate() when scanning the plan from last to first entry.
945
-void Planner::reverse_pass_kernel(block_t* const current, const block_t * const next) {
945
+void Planner::reverse_pass_kernel(block_t * const current, const block_t * const next) {
946 946
   if (current) {
947 947
     // If entry speed is already at the maximum entry speed, and there was no change of speed
948 948
     // in the next block, there is no need to recheck. Block is cruising and there is no need to
@@ -1039,7 +1039,7 @@ void Planner::reverse_pass() {
1039 1039
 }
1040 1040
 
1041 1041
 // The kernel called by recalculate() when scanning the plan from first to last entry.
1042
-void Planner::forward_pass_kernel(const block_t* const previous, block_t* const current, const uint8_t block_index) {
1042
+void Planner::forward_pass_kernel(const block_t * const previous, block_t * const current, const uint8_t block_index) {
1043 1043
   if (previous) {
1044 1044
     // If the previous block is an acceleration block, too short to complete the full speed
1045 1045
     // change, adjust the entry speed accordingly. Entry speeds have already been reset,
@@ -1440,7 +1440,7 @@ void Planner::check_axes_activity() {
1440 1440
 
1441 1441
     float high = 0.0;
1442 1442
     for (uint8_t b = block_buffer_tail; b != block_buffer_head; b = next_block_index(b)) {
1443
-      block_t* block = &block_buffer[b];
1443
+      block_t *block = &block_buffer[b];
1444 1444
       if (block->steps.x || block->steps.y || block->steps.z) {
1445 1445
         const float se = (float)block->steps.e / block->step_event_count * SQRT(block->nominal_speed_sqr); // mm/sec;
1446 1446
         NOLESS(high, se);

+ 3
- 3
Marlin/src/module/planner.h Parādīt failu

@@ -993,10 +993,10 @@ class Planner {
993 993
       }
994 994
     #endif
995 995
 
996
-    static void calculate_trapezoid_for_block(block_t* const block, const float &entry_factor, const float &exit_factor);
996
+    static void calculate_trapezoid_for_block(block_t * const block, const float &entry_factor, const float &exit_factor);
997 997
 
998
-    static void reverse_pass_kernel(block_t* const current, const block_t * const next);
999
-    static void forward_pass_kernel(const block_t * const previous, block_t* const current, uint8_t block_index);
998
+    static void reverse_pass_kernel(block_t * const current, const block_t * const next);
999
+    static void forward_pass_kernel(const block_t * const previous, block_t * const current, uint8_t block_index);
1000 1000
 
1001 1001
     static void reverse_pass();
1002 1002
     static void forward_pass();

+ 2
- 2
Marlin/src/module/stepper.cpp Parādīt failu

@@ -2362,7 +2362,7 @@ uint32_t Stepper::block_phase_isr() {
2362 2362
 // Check if the given block is busy or not - Must not be called from ISR contexts
2363 2363
 // The current_block could change in the middle of the read by an Stepper ISR, so
2364 2364
 // we must explicitly prevent that!
2365
-bool Stepper::is_block_busy(const block_t* const block) {
2365
+bool Stepper::is_block_busy(const block_t * const block) {
2366 2366
   #ifdef __AVR__
2367 2367
     // A SW memory barrier, to ensure GCC does not overoptimize loops
2368 2368
     #define sw_barrier() asm volatile("": : :"memory");
@@ -2372,7 +2372,7 @@ bool Stepper::is_block_busy(const block_t* const block) {
2372 2372
     // This works because stepper ISRs happen at a slower rate than
2373 2373
     // successive reads of a variable, so 2 consecutive reads with
2374 2374
     // the same value means no interrupt updated it.
2375
-    block_t* vold, *vnew = current_block;
2375
+    block_t *vold, *vnew = current_block;
2376 2376
     sw_barrier();
2377 2377
     do {
2378 2378
       vold = vnew;

+ 2
- 2
Marlin/src/module/stepper.h Parādīt failu

@@ -423,7 +423,7 @@ class Stepper {
423 423
     #endif
424 424
 
425 425
     // Check if the given block is busy or not - Must not be called from ISR contexts
426
-    static bool is_block_busy(const block_t* const block);
426
+    static bool is_block_busy(const block_t * const block);
427 427
 
428 428
     // Get the position of a stepper, in steps
429 429
     static int32_t position(const AxisEnum axis);
@@ -529,7 +529,7 @@ class Stepper {
529 529
     static void _set_position(const int32_t &a, const int32_t &b, const int32_t &c, const int32_t &e);
530 530
     FORCE_INLINE static void _set_position(const abce_long_t &spos) { _set_position(spos.a, spos.b, spos.c, spos.e); }
531 531
 
532
-    FORCE_INLINE static uint32_t calc_timer_interval(uint32_t step_rate, uint8_t* loops) {
532
+    FORCE_INLINE static uint32_t calc_timer_interval(uint32_t step_rate, uint8_t *loops) {
533 533
       uint32_t timer;
534 534
 
535 535
       // Scale the frequency, as requested by the caller

+ 3
- 3
Marlin/src/module/stepper/trinamic.cpp Parādīt failu

@@ -830,11 +830,11 @@ void reset_trinamic_drivers() {
830 830
   }
831 831
 
832 832
   constexpr bool sc_hw_done(size_t start, size_t end) { return start == end; }
833
-  constexpr bool sc_hw_skip(const char* port_name) { return !(*port_name); }
834
-  constexpr bool sc_hw_match(const char* port_name, uint32_t address, size_t start, size_t end) {
833
+  constexpr bool sc_hw_skip(const char *port_name) { return !(*port_name); }
834
+  constexpr bool sc_hw_match(const char *port_name, uint32_t address, size_t start, size_t end) {
835 835
     return !sc_hw_done(start, end) && !sc_hw_skip(port_name) && (address == sanity_tmc_hw_details[start].address && str_eq_ce(port_name, sanity_tmc_hw_details[start].port));
836 836
   }
837
-  constexpr int count_tmc_hw_serial_matches(const char* port_name, uint32_t address, size_t start, size_t end) {
837
+  constexpr int count_tmc_hw_serial_matches(const char *port_name, uint32_t address, size_t start, size_t end) {
838 838
     return sc_hw_done(start, end) ? 0 : ((sc_hw_skip(port_name) ? 0 : (sc_hw_match(port_name, address, start, end) ? 1 : 0)) + count_tmc_hw_serial_matches(port_name, address, start + 1, end));
839 839
   }
840 840
 

+ 11
- 11
Marlin/src/sd/Sd2Card.cpp Parādīt failu

@@ -63,7 +63,7 @@
63 63
       0x0E,0x07,0x1C,0x15,0x2A,0x23,0x38,0x31,0x46,0x4F,0x54,0x5D,0x62,0x6B,0x70,0x79
64 64
     };
65 65
 
66
-    static uint8_t CRC7(const uint8_t* data, uint8_t n) {
66
+    static uint8_t CRC7(const uint8_t *data, uint8_t n) {
67 67
       uint8_t crc = 0;
68 68
       while (n > 0) {
69 69
         crc = pgm_read_byte(&crctab7[ (crc << 1) ^ *data++ ]);
@@ -72,7 +72,7 @@
72 72
       return (crc << 1) | 1;
73 73
     }
74 74
   #else
75
-    static uint8_t CRC7(const uint8_t* data, uint8_t n) {
75
+    static uint8_t CRC7(const uint8_t *data, uint8_t n) {
76 76
       uint8_t crc = 0;
77 77
       LOOP_L_N(i, n) {
78 78
         uint8_t d = data[i];
@@ -338,7 +338,7 @@ bool Sd2Card::init(const uint8_t sckRateID, const pin_t chipSelectPin) {
338 338
  * \param[out] dst Pointer to the location that will receive the data.
339 339
  * \return true for success, false for failure.
340 340
  */
341
-bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
341
+bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t *dst) {
342 342
   #if IS_TEENSY_35_36 || IS_TEENSY_40_41
343 343
     return 0 == SDHC_CardReadBlock(dst, blockNumber);
344 344
   #endif
@@ -378,7 +378,7 @@ bool Sd2Card::readBlock(uint32_t blockNumber, uint8_t* dst) {
378 378
  *
379 379
  * \return true for success, false for failure.
380 380
  */
381
-bool Sd2Card::readData(uint8_t* dst) {
381
+bool Sd2Card::readData(uint8_t *dst) {
382 382
   chipSelect();
383 383
   return readData(dst, 512);
384 384
 }
@@ -421,7 +421,7 @@ bool Sd2Card::readData(uint8_t* dst) {
421 421
   };
422 422
     // faster CRC-CCITT
423 423
     // uses the x^16,x^12,x^5,x^1 polynomial.
424
-  static uint16_t CRC_CCITT(const uint8_t* data, size_t n) {
424
+  static uint16_t CRC_CCITT(const uint8_t *data, size_t n) {
425 425
     uint16_t crc = 0;
426 426
     for (size_t i = 0; i < n; i++) {
427 427
       crc = pgm_read_word(&crctab16[(crc >> 8 ^ data[i]) & 0xFF]) ^ (crc << 8);
@@ -431,7 +431,7 @@ bool Sd2Card::readData(uint8_t* dst) {
431 431
   #else
432 432
     // slower CRC-CCITT
433 433
     // uses the x^16,x^12,x^5,x^1 polynomial.
434
-    static uint16_t CRC_CCITT(const uint8_t* data, size_t n) {
434
+    static uint16_t CRC_CCITT(const uint8_t *data, size_t n) {
435 435
       uint16_t crc = 0;
436 436
       for (size_t i = 0; i < n; i++) {
437 437
         crc = (uint8_t)(crc >> 8) | (crc << 8);
@@ -445,7 +445,7 @@ bool Sd2Card::readData(uint8_t* dst) {
445 445
   #endif
446 446
 #endif // SD_CHECK_AND_RETRY
447 447
 
448
-bool Sd2Card::readData(uint8_t* dst, const uint16_t count) {
448
+bool Sd2Card::readData(uint8_t *dst, const uint16_t count) {
449 449
   bool success = false;
450 450
 
451 451
   const millis_t read_timeout = millis() + SD_READ_TIMEOUT;
@@ -478,7 +478,7 @@ bool Sd2Card::readData(uint8_t* dst, const uint16_t count) {
478 478
 
479 479
 /** read CID or CSR register */
480 480
 bool Sd2Card::readRegister(const uint8_t cmd, void* buf) {
481
-  uint8_t* dst = reinterpret_cast<uint8_t*>(buf);
481
+  uint8_t *dst = reinterpret_cast<uint8_t*>(buf);
482 482
   if (cardCommand(cmd, 0)) {
483 483
     error(SD_CARD_ERROR_READ_REG);
484 484
     chipDeselect();
@@ -555,7 +555,7 @@ bool Sd2Card::waitNotBusy(const millis_t timeout_ms) {
555 555
  * \param[in] src Pointer to the location of the data to be written.
556 556
  * \return true for success, false for failure.
557 557
  */
558
-bool Sd2Card::writeBlock(uint32_t blockNumber, const uint8_t* src) {
558
+bool Sd2Card::writeBlock(uint32_t blockNumber, const uint8_t *src) {
559 559
   if (ENABLED(SDCARD_READONLY)) return false;
560 560
 
561 561
   #if IS_TEENSY_35_36 || IS_TEENSY_40_41
@@ -586,7 +586,7 @@ bool Sd2Card::writeBlock(uint32_t blockNumber, const uint8_t* src) {
586 586
  * \param[in] src Pointer to the location of the data to be written.
587 587
  * \return true for success, false for failure.
588 588
  */
589
-bool Sd2Card::writeData(const uint8_t* src) {
589
+bool Sd2Card::writeData(const uint8_t *src) {
590 590
   if (ENABLED(SDCARD_READONLY)) return false;
591 591
 
592 592
   bool success = true;
@@ -601,7 +601,7 @@ bool Sd2Card::writeData(const uint8_t* src) {
601 601
 }
602 602
 
603 603
 // Send one block of data for write block or write multiple blocks
604
-bool Sd2Card::writeData(const uint8_t token, const uint8_t* src) {
604
+bool Sd2Card::writeData(const uint8_t token, const uint8_t *src) {
605 605
   if (ENABLED(SDCARD_READONLY)) return false;
606 606
 
607 607
   const uint16_t crc = TERN(SD_CHECK_AND_RETRY, CRC_CCITT(src, 512), 0xFFFF);

+ 8
- 8
Marlin/src/sd/Sd2Card.h Parādīt failu

@@ -124,7 +124,7 @@ public:
124 124
    */
125 125
   bool init(const uint8_t sckRateID, const pin_t chipSelectPin);
126 126
 
127
-  bool readBlock(uint32_t block, uint8_t* dst);
127
+  bool readBlock(uint32_t block, uint8_t *dst);
128 128
 
129 129
   /**
130 130
    * Read a card's CID register. The CID contains card identification
@@ -135,7 +135,7 @@ public:
135 135
    *
136 136
    * \return true for success or false for failure.
137 137
    */
138
-  bool readCID(cid_t* cid) { return readRegister(CMD10, cid); }
138
+  bool readCID(cid_t *cid) { return readRegister(CMD10, cid); }
139 139
 
140 140
   /**
141 141
    * Read a card's CSD register. The CSD contains Card-Specific Data that
@@ -145,9 +145,9 @@ public:
145 145
    *
146 146
    * \return true for success or false for failure.
147 147
    */
148
-  inline bool readCSD(csd_t* csd) { return readRegister(CMD9, csd); }
148
+  inline bool readCSD(csd_t *csd) { return readRegister(CMD9, csd); }
149 149
 
150
-  bool readData(uint8_t* dst);
150
+  bool readData(uint8_t *dst);
151 151
   bool readStart(uint32_t blockNumber);
152 152
   bool readStop();
153 153
   bool setSckRate(const uint8_t sckRateID);
@@ -157,8 +157,8 @@ public:
157 157
    * \return 0 - SD V1, 1 - SD V2, or 3 - SDHC.
158 158
    */
159 159
   int type() const {return type_;}
160
-  bool writeBlock(uint32_t blockNumber, const uint8_t* src);
161
-  bool writeData(const uint8_t* src);
160
+  bool writeBlock(uint32_t blockNumber, const uint8_t *src);
161
+  bool writeData(const uint8_t *src);
162 162
   bool writeStart(uint32_t blockNumber, const uint32_t eraseCount);
163 163
   bool writeStop();
164 164
 
@@ -176,11 +176,11 @@ private:
176 176
   }
177 177
   uint8_t cardCommand(const uint8_t cmd, const uint32_t arg);
178 178
 
179
-  bool readData(uint8_t* dst, const uint16_t count);
179
+  bool readData(uint8_t *dst, const uint16_t count);
180 180
   bool readRegister(const uint8_t cmd, void* buf);
181 181
   void chipDeselect();
182 182
   void chipSelect();
183 183
   inline void type(const uint8_t value) { type_ = value; }
184 184
   bool waitNotBusy(const millis_t timeout_ms);
185
-  bool writeData(const uint8_t token, const uint8_t* src);
185
+  bool writeData(const uint8_t token, const uint8_t *src);
186 186
 };

+ 37
- 37
Marlin/src/sd/SdBaseFile.cpp Parādīt failu

@@ -43,7 +43,7 @@
43 43
 SdBaseFile* SdBaseFile::cwd_ = 0;   // Pointer to Current Working Directory
44 44
 
45 45
 // callback function for date/time
46
-void (*SdBaseFile::dateTime_)(uint16_t* date, uint16_t* time) = 0;
46
+void (*SdBaseFile::dateTime_)(uint16_t *date, uint16_t *time) = 0;
47 47
 
48 48
 // add a cluster to a file
49 49
 bool SdBaseFile::addCluster() {
@@ -118,7 +118,7 @@ bool SdBaseFile::close() {
118 118
  * Reasons for failure include file is not contiguous, file has zero length
119 119
  * or an I/O error occurred.
120 120
  */
121
-bool SdBaseFile::contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock) {
121
+bool SdBaseFile::contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock) {
122 122
   // error if no blocks
123 123
   if (firstCluster_ == 0) return false;
124 124
 
@@ -155,7 +155,7 @@ bool SdBaseFile::contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock) {
155 155
  * a file is already open, the file already exists, the root
156 156
  * directory is full or an I/O error.
157 157
  */
158
-bool SdBaseFile::createContiguous(SdBaseFile* dirFile, const char* path, uint32_t size) {
158
+bool SdBaseFile::createContiguous(SdBaseFile* dirFile, const char *path, uint32_t size) {
159 159
   if (ENABLED(SDCARD_READONLY)) return false;
160 160
 
161 161
   uint32_t count;
@@ -186,8 +186,8 @@ bool SdBaseFile::createContiguous(SdBaseFile* dirFile, const char* path, uint32_
186 186
  *
187 187
  * \return true for success, false for failure.
188 188
  */
189
-bool SdBaseFile::dirEntry(dir_t* dir) {
190
-  dir_t* p;
189
+bool SdBaseFile::dirEntry(dir_t *dir) {
190
+  dir_t *p;
191 191
   // make sure fields on SD are correct
192 192
   if (!sync()) return false;
193 193
 
@@ -207,7 +207,7 @@ bool SdBaseFile::dirEntry(dir_t* dir) {
207 207
  * \param[in] dir The directory structure containing the name.
208 208
  * \param[out] name A 13 byte char array for the formatted name.
209 209
  */
210
-void SdBaseFile::dirName(const dir_t& dir, char* name) {
210
+void SdBaseFile::dirName(const dir_t& dir, char *name) {
211 211
   uint8_t j = 0;
212 212
   LOOP_L_N(i, 11) {
213 213
     if (dir.name[i] == ' ')continue;
@@ -229,7 +229,7 @@ void SdBaseFile::dirName(const dir_t& dir, char* name) {
229 229
  *
230 230
  * \return true if the file exists else false.
231 231
  */
232
-bool SdBaseFile::exists(const char* name) {
232
+bool SdBaseFile::exists(const char *name) {
233 233
   SdBaseFile file;
234 234
   return file.open(this, name, O_READ);
235 235
 }
@@ -254,7 +254,7 @@ bool SdBaseFile::exists(const char* name) {
254 254
  * \return For success fgets() returns the length of the string in \a str.
255 255
  * If no data is read, fgets() returns zero for EOF or -1 if an error occurred.
256 256
  **/
257
-int16_t SdBaseFile::fgets(char* str, int16_t num, char* delim) {
257
+int16_t SdBaseFile::fgets(char *str, int16_t num, char *delim) {
258 258
   char ch;
259 259
   int16_t n = 0;
260 260
   int16_t r = -1;
@@ -293,7 +293,7 @@ bool SdBaseFile::getDosName(char * const name) {
293 293
     return true;
294 294
   }
295 295
   // cache entry
296
-  dir_t* p = cacheDirEntry(SdVolume::CACHE_FOR_READ);
296
+  dir_t *p = cacheDirEntry(SdVolume::CACHE_FOR_READ);
297 297
   if (!p) return false;
298 298
 
299 299
   // format name
@@ -301,7 +301,7 @@ bool SdBaseFile::getDosName(char * const name) {
301 301
   return true;
302 302
 }
303 303
 
304
-void SdBaseFile::getpos(filepos_t* pos) {
304
+void SdBaseFile::getpos(filepos_t *pos) {
305 305
   pos->position = curPosition_;
306 306
   pos->cluster = curCluster_;
307 307
 }
@@ -386,7 +386,7 @@ int8_t SdBaseFile::lsPrintNext(uint8_t flags, uint8_t indent) {
386 386
 }
387 387
 
388 388
 // Format directory name field from a 8.3 name string
389
-bool SdBaseFile::make83Name(const char* str, uint8_t* name, const char** ptr) {
389
+bool SdBaseFile::make83Name(const char *str, uint8_t *name, const char** ptr) {
390 390
   uint8_t n = 7,                      // Max index until a dot is found
391 391
           i = 11;
392 392
   while (i) name[--i] = ' ';          // Set whole FILENAME.EXT to spaces
@@ -423,7 +423,7 @@ bool SdBaseFile::make83Name(const char* str, uint8_t* name, const char** ptr) {
423 423
  * Reasons for failure include this file is already open, \a parent is not a
424 424
  * directory, \a path is invalid or already exists in \a parent.
425 425
  */
426
-bool SdBaseFile::mkdir(SdBaseFile* parent, const char* path, bool pFlag) {
426
+bool SdBaseFile::mkdir(SdBaseFile* parent, const char *path, bool pFlag) {
427 427
   if (ENABLED(SDCARD_READONLY)) return false;
428 428
 
429 429
   uint8_t dname[11];
@@ -460,7 +460,7 @@ bool SdBaseFile::mkdir(SdBaseFile* parent, const uint8_t dname[11]) {
460 460
 
461 461
   uint32_t block;
462 462
   dir_t d;
463
-  dir_t* p;
463
+  dir_t *p;
464 464
 
465 465
   if (!parent->isDir()) return false;
466 466
 
@@ -523,7 +523,7 @@ bool SdBaseFile::mkdir(SdBaseFile* parent, const uint8_t dname[11]) {
523 523
  *
524 524
  * \return true for success, false for failure.
525 525
  */
526
-bool SdBaseFile::open(const char* path, uint8_t oflag) {
526
+bool SdBaseFile::open(const char *path, uint8_t oflag) {
527 527
   return open(cwd_, path, oflag);
528 528
 }
529 529
 
@@ -577,7 +577,7 @@ bool SdBaseFile::open(const char* path, uint8_t oflag) {
577 577
  * a directory, \a path is invalid, the file does not exist
578 578
  * or can't be opened in the access mode specified by oflag.
579 579
  */
580
-bool SdBaseFile::open(SdBaseFile* dirFile, const char* path, uint8_t oflag) {
580
+bool SdBaseFile::open(SdBaseFile* dirFile, const char *path, uint8_t oflag) {
581 581
   uint8_t dname[11];
582 582
   SdBaseFile dir1, dir2;
583 583
   SdBaseFile *parent = dirFile, *sub = &dir1;
@@ -608,7 +608,7 @@ bool SdBaseFile::open(SdBaseFile* dirFile, const char* path, uint8_t oflag) {
608 608
 bool SdBaseFile::open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag) {
609 609
   bool emptyFound = false, fileFound = false;
610 610
   uint8_t index;
611
-  dir_t* p;
611
+  dir_t *p;
612 612
 
613 613
   vol_ = dirFile->vol_;
614 614
 
@@ -697,7 +697,7 @@ bool SdBaseFile::open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t ofla
697 697
  * \return true for success or false for failure.
698 698
  */
699 699
 bool SdBaseFile::open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag) {
700
-  dir_t* p;
700
+  dir_t *p;
701 701
 
702 702
   vol_ = dirFile->vol_;
703 703
 
@@ -725,7 +725,7 @@ bool SdBaseFile::open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag) {
725 725
 
726 726
 // open a cached directory entry. Assumes vol_ is initialized
727 727
 bool SdBaseFile::openCachedEntry(uint8_t dirIndex, uint8_t oflag) {
728
-  dir_t* p;
728
+  dir_t *p;
729 729
 
730 730
   #if ENABLED(SDCARD_READONLY)
731 731
     if (oflag & (O_WRITE | O_CREAT | O_TRUNC)) goto FAIL;
@@ -785,7 +785,7 @@ bool SdBaseFile::openCachedEntry(uint8_t dirIndex, uint8_t oflag) {
785 785
  * \return true for success or false for failure.
786 786
  */
787 787
 bool SdBaseFile::openNext(SdBaseFile* dirFile, uint8_t oflag) {
788
-  dir_t* p;
788
+  dir_t *p;
789 789
   uint8_t index;
790 790
 
791 791
   if (!dirFile) return false;
@@ -827,7 +827,7 @@ bool SdBaseFile::openNext(SdBaseFile* dirFile, uint8_t oflag) {
827 827
  */
828 828
 bool SdBaseFile::openParent(SdBaseFile* dir) {
829 829
   dir_t entry;
830
-  dir_t* p;
830
+  dir_t *p;
831 831
   SdBaseFile file;
832 832
   uint32_t c;
833 833
   uint32_t cluster;
@@ -1009,7 +1009,7 @@ int16_t SdBaseFile::read() {
1009 1009
  * or an I/O error occurred.
1010 1010
  */
1011 1011
 int16_t SdBaseFile::read(void* buf, uint16_t nbyte) {
1012
-  uint8_t* dst = reinterpret_cast<uint8_t*>(buf);
1012
+  uint8_t *dst = reinterpret_cast<uint8_t*>(buf);
1013 1013
   uint16_t offset, toRead;
1014 1014
   uint32_t block;  // raw device block number
1015 1015
 
@@ -1049,7 +1049,7 @@ int16_t SdBaseFile::read(void* buf, uint16_t nbyte) {
1049 1049
     else {
1050 1050
       // read block to cache and copy data to caller
1051 1051
       if (!vol_->cacheRawBlock(block, SdVolume::CACHE_FOR_READ)) return -1;
1052
-      uint8_t* src = vol_->cache()->data + offset;
1052
+      uint8_t *src = vol_->cache()->data + offset;
1053 1053
       memcpy(dst, src, n);
1054 1054
     }
1055 1055
     dst += n;
@@ -1070,7 +1070,7 @@ int16_t SdBaseFile::read(void* buf, uint16_t nbyte) {
1070 1070
  * readDir() called before a directory has been opened, this is not
1071 1071
  * a directory file or an I/O error occurred.
1072 1072
  */
1073
-int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) {
1073
+int8_t SdBaseFile::readDir(dir_t *dir, char *longFilename) {
1074 1074
   int16_t n;
1075 1075
   // if not a directory file or miss-positioned return an error
1076 1076
   if (!isDir() || (0x1F & curPosition_)) return -1;
@@ -1096,7 +1096,7 @@ int8_t SdBaseFile::readDir(dir_t* dir, char* longFilename) {
1096 1096
     // Fill the long filename if we have a long filename entry.
1097 1097
     // Long filename entries are stored before the short filename.
1098 1098
     if (longFilename && DIR_IS_LONG_NAME(dir)) {
1099
-      vfat_t* VFAT = (vfat_t*)dir;
1099
+      vfat_t *VFAT = (vfat_t*)dir;
1100 1100
       // Sanity-check the VFAT entry. The first cluster is always set to zero. And the sequence number should be higher than 0
1101 1101
       if (VFAT->firstClusterLow == 0) {
1102 1102
         const uint8_t seq = VFAT->sequenceNumber & 0x1F;
@@ -1199,7 +1199,7 @@ dir_t* SdBaseFile::readDirCache() {
1199 1199
 bool SdBaseFile::remove() {
1200 1200
   if (ENABLED(SDCARD_READONLY)) return false;
1201 1201
 
1202
-  dir_t* d;
1202
+  dir_t *d;
1203 1203
   // free any clusters - will fail if read-only or directory
1204 1204
   if (!truncate(0)) return false;
1205 1205
 
@@ -1235,7 +1235,7 @@ bool SdBaseFile::remove() {
1235 1235
  * \a dirFile is not a directory, \a path is not found
1236 1236
  * or an I/O error occurred.
1237 1237
  */
1238
-bool SdBaseFile::remove(SdBaseFile* dirFile, const char* path) {
1238
+bool SdBaseFile::remove(SdBaseFile* dirFile, const char *path) {
1239 1239
   if (ENABLED(SDCARD_READONLY)) return false;
1240 1240
 
1241 1241
   SdBaseFile file;
@@ -1252,13 +1252,13 @@ bool SdBaseFile::remove(SdBaseFile* dirFile, const char* path) {
1252 1252
  * Reasons for failure include \a dirFile is not open or is not a directory
1253 1253
  * file, newPath is invalid or already exists, or an I/O error occurs.
1254 1254
  */
1255
-bool SdBaseFile::rename(SdBaseFile* dirFile, const char* newPath) {
1255
+bool SdBaseFile::rename(SdBaseFile* dirFile, const char *newPath) {
1256 1256
   if (ENABLED(SDCARD_READONLY)) return false;
1257 1257
 
1258 1258
   dir_t entry;
1259 1259
   uint32_t dirCluster = 0;
1260 1260
   SdBaseFile file;
1261
-  dir_t* d;
1261
+  dir_t *d;
1262 1262
 
1263 1263
   // must be an open file or subdirectory
1264 1264
   if (!(isFile() || isSubDir())) return false;
@@ -1356,7 +1356,7 @@ bool SdBaseFile::rmdir() {
1356 1356
 
1357 1357
   // make sure directory is empty
1358 1358
   while (curPosition_ < fileSize_) {
1359
-    dir_t* p = readDirCache();
1359
+    dir_t *p = readDirCache();
1360 1360
     if (!p) return false;
1361 1361
     // done if past last used entry
1362 1362
     if (p->name[0] == DIR_NAME_FREE) break;
@@ -1396,7 +1396,7 @@ bool SdBaseFile::rmRfStar() {
1396 1396
     // remember position
1397 1397
     index = curPosition_ / 32;
1398 1398
 
1399
-    dir_t* p = readDirCache();
1399
+    dir_t *p = readDirCache();
1400 1400
     if (!p) return false;
1401 1401
 
1402 1402
     // done if past last entry
@@ -1438,7 +1438,7 @@ bool SdBaseFile::rmRfStar() {
1438 1438
  * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive
1439 1439
  * OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
1440 1440
  */
1441
-SdBaseFile::SdBaseFile(const char* path, uint8_t oflag) {
1441
+SdBaseFile::SdBaseFile(const char *path, uint8_t oflag) {
1442 1442
   type_ = FAT_FILE_TYPE_CLOSED;
1443 1443
   writeError = false;
1444 1444
   open(path, oflag);
@@ -1481,7 +1481,7 @@ bool SdBaseFile::seekSet(const uint32_t pos) {
1481 1481
   return true;
1482 1482
 }
1483 1483
 
1484
-void SdBaseFile::setpos(filepos_t* pos) {
1484
+void SdBaseFile::setpos(filepos_t *pos) {
1485 1485
   curPosition_ = pos->position;
1486 1486
   curCluster_ = pos->cluster;
1487 1487
 }
@@ -1499,7 +1499,7 @@ bool SdBaseFile::sync() {
1499 1499
   if (ENABLED(SDCARD_READONLY) || !isOpen()) goto FAIL;
1500 1500
 
1501 1501
   if (flags_ & F_FILE_DIR_DIRTY) {
1502
-    dir_t* d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE);
1502
+    dir_t *d = cacheDirEntry(SdVolume::CACHE_FOR_WRITE);
1503 1503
     // check for deleted by another open file object
1504 1504
     if (!d || d->name[0] == DIR_NAME_DELETED) goto FAIL;
1505 1505
 
@@ -1537,7 +1537,7 @@ bool SdBaseFile::sync() {
1537 1537
  * \return true for success, false for failure.
1538 1538
  */
1539 1539
 bool SdBaseFile::timestamp(SdBaseFile* file) {
1540
-  dir_t* d;
1540
+  dir_t *d;
1541 1541
   dir_t dir;
1542 1542
 
1543 1543
   // get timestamps
@@ -1599,7 +1599,7 @@ bool SdBaseFile::timestamp(uint8_t flags, uint16_t year, uint8_t month,
1599 1599
   if (ENABLED(SDCARD_READONLY)) return false;
1600 1600
 
1601 1601
   uint16_t dirDate, dirTime;
1602
-  dir_t* d;
1602
+  dir_t *d;
1603 1603
 
1604 1604
   if (!isOpen()
1605 1605
       || year < 1980
@@ -1716,7 +1716,7 @@ int16_t SdBaseFile::write(const void* buf, uint16_t nbyte) {
1716 1716
   #endif
1717 1717
 
1718 1718
   // convert void* to uint8_t*  -  must be before goto statements
1719
-  const uint8_t* src = reinterpret_cast<const uint8_t*>(buf);
1719
+  const uint8_t *src = reinterpret_cast<const uint8_t*>(buf);
1720 1720
 
1721 1721
   // number of bytes left to write  -  must be before goto statements
1722 1722
   uint16_t nToWrite = nbyte;
@@ -1782,7 +1782,7 @@ int16_t SdBaseFile::write(const void* buf, uint16_t nbyte) {
1782 1782
         // rewrite part of block
1783 1783
         if (!vol_->cacheRawBlock(block, SdVolume::CACHE_FOR_WRITE)) goto FAIL;
1784 1784
       }
1785
-      uint8_t* dst = vol_->cache()->data + blockOffset;
1785
+      uint8_t *dst = vol_->cache()->data + blockOffset;
1786 1786
       memcpy(dst, src, n);
1787 1787
     }
1788 1788
     curPosition_ += n;

+ 19
- 19
Marlin/src/sd/SdBaseFile.h Parādīt failu

@@ -163,7 +163,7 @@ uint16_t const FAT_DEFAULT_TIME = (1 << 11);
163 163
 class SdBaseFile {
164 164
  public:
165 165
   SdBaseFile() : writeError(false), type_(FAT_FILE_TYPE_CLOSED) {}
166
-  SdBaseFile(const char* path, uint8_t oflag);
166
+  SdBaseFile(const char *path, uint8_t oflag);
167 167
   ~SdBaseFile() { if (isOpen()) close(); }
168 168
 
169 169
   /**
@@ -179,18 +179,18 @@ class SdBaseFile {
179 179
    * get position for streams
180 180
    * \param[out] pos struct to receive position
181 181
    */
182
-  void getpos(filepos_t* pos);
182
+  void getpos(filepos_t *pos);
183 183
 
184 184
   /**
185 185
    * set position for streams
186 186
    * \param[out] pos struct with value for new position
187 187
    */
188
-  void setpos(filepos_t* pos);
188
+  void setpos(filepos_t *pos);
189 189
 
190 190
   bool close();
191
-  bool contiguousRange(uint32_t* bgnBlock, uint32_t* endBlock);
191
+  bool contiguousRange(uint32_t *bgnBlock, uint32_t *endBlock);
192 192
   bool createContiguous(SdBaseFile* dirFile,
193
-                        const char* path, uint32_t size);
193
+                        const char *path, uint32_t size);
194 194
   /**
195 195
    * \return The current cluster number for a file or directory.
196 196
    */
@@ -213,7 +213,7 @@ class SdBaseFile {
213 213
    * function is of the form:
214 214
    *
215 215
    * \code
216
-   * void dateTime(uint16_t* date, uint16_t* time) {
216
+   * void dateTime(uint16_t *date, uint16_t *time) {
217 217
    *   uint16_t year;
218 218
    *   uint8_t month, day, hour, minute, second;
219 219
    *
@@ -235,7 +235,7 @@ class SdBaseFile {
235 235
    * See the timestamp() function.
236 236
    */
237 237
   static void dateTimeCallback(
238
-    void (*dateTime)(uint16_t* date, uint16_t* time)) {
238
+    void (*dateTime)(uint16_t *date, uint16_t *time)) {
239 239
     dateTime_ = dateTime;
240 240
   }
241 241
 
@@ -243,10 +243,10 @@ class SdBaseFile {
243 243
    * Cancel the date/time callback function.
244 244
    */
245 245
   static void dateTimeCallbackCancel() { dateTime_ = 0; }
246
-  bool dirEntry(dir_t* dir);
247
-  static void dirName(const dir_t& dir, char* name);
248
-  bool exists(const char* name);
249
-  int16_t fgets(char* str, int16_t num, char* delim = 0);
246
+  bool dirEntry(dir_t *dir);
247
+  static void dirName(const dir_t& dir, char *name);
248
+  bool exists(const char *name);
249
+  int16_t fgets(char *str, int16_t num, char *delim = 0);
250 250
 
251 251
   /**
252 252
    * \return The total number of bytes in a file or directory.
@@ -286,10 +286,10 @@ class SdBaseFile {
286 286
   bool getDosName(char * const name);
287 287
   void ls(uint8_t flags = 0, uint8_t indent = 0);
288 288
 
289
-  bool mkdir(SdBaseFile* dir, const char* path, bool pFlag = true);
289
+  bool mkdir(SdBaseFile* dir, const char *path, bool pFlag = true);
290 290
   bool open(SdBaseFile* dirFile, uint16_t index, uint8_t oflag);
291
-  bool open(SdBaseFile* dirFile, const char* path, uint8_t oflag);
292
-  bool open(const char* path, uint8_t oflag = O_READ);
291
+  bool open(SdBaseFile* dirFile, const char *path, uint8_t oflag);
292
+  bool open(const char *path, uint8_t oflag = O_READ);
293 293
   bool openNext(SdBaseFile* dirFile, uint8_t oflag);
294 294
   bool openRoot(SdVolume* vol);
295 295
   int peek();
@@ -298,15 +298,15 @@ class SdBaseFile {
298 298
   bool printName();
299 299
   int16_t read();
300 300
   int16_t read(void* buf, uint16_t nbyte);
301
-  int8_t readDir(dir_t* dir, char* longFilename);
302
-  static bool remove(SdBaseFile* dirFile, const char* path);
301
+  int8_t readDir(dir_t *dir, char *longFilename);
302
+  static bool remove(SdBaseFile* dirFile, const char *path);
303 303
   bool remove();
304 304
 
305 305
   /**
306 306
    * Set the file's current position to zero.
307 307
    */
308 308
   void rewind() { seekSet(0); }
309
-  bool rename(SdBaseFile* dirFile, const char* newPath);
309
+  bool rename(SdBaseFile* dirFile, const char *newPath);
310 310
   bool rmdir();
311 311
   bool rmRfStar();
312 312
 
@@ -348,7 +348,7 @@ class SdBaseFile {
348 348
   static SdBaseFile* cwd_;      // global pointer to cwd dir
349 349
 
350 350
   // data time callback function
351
-  static void (*dateTime_)(uint16_t* date, uint16_t* time);
351
+  static void (*dateTime_)(uint16_t *date, uint16_t *time);
352 352
 
353 353
   // bits defined in flags_
354 354
   static uint8_t const F_OFLAG = (O_ACCMODE | O_APPEND | O_SYNC),   // should be 0x0F
@@ -376,7 +376,7 @@ class SdBaseFile {
376 376
   bool addDirCluster();
377 377
   dir_t* cacheDirEntry(uint8_t action);
378 378
   int8_t lsPrintNext(uint8_t flags, uint8_t indent);
379
-  static bool make83Name(const char* str, uint8_t* name, const char** ptr);
379
+  static bool make83Name(const char *str, uint8_t *name, const char** ptr);
380 380
   bool mkdir(SdBaseFile* parent, const uint8_t dname[11]);
381 381
   bool open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag);
382 382
   bool openCachedEntry(uint8_t cacheIndex, uint8_t oflags);

+ 4
- 4
Marlin/src/sd/SdFatStructs.h Parādīt failu

@@ -571,7 +571,7 @@ uint8_t const DIR_NAME_0xE5     = 0x05,       // escape for name[0] = 0xE5
571 571
  *
572 572
  * \return true if the entry is for part of a long name else false.
573 573
  */
574
-static inline uint8_t DIR_IS_LONG_NAME(const dir_t* dir) {
574
+static inline uint8_t DIR_IS_LONG_NAME(const dir_t *dir) {
575 575
   return (dir->attributes & DIR_ATT_LONG_NAME_MASK) == DIR_ATT_LONG_NAME;
576 576
 }
577 577
 
@@ -584,7 +584,7 @@ uint8_t const DIR_ATT_FILE_TYPE_MASK = (DIR_ATT_VOLUME_ID | DIR_ATT_DIRECTORY);
584 584
  *
585 585
  * \return true if the entry is for a normal file else false.
586 586
  */
587
-static inline uint8_t DIR_IS_FILE(const dir_t* dir) {
587
+static inline uint8_t DIR_IS_FILE(const dir_t *dir) {
588 588
   return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == 0;
589 589
 }
590 590
 
@@ -594,7 +594,7 @@ static inline uint8_t DIR_IS_FILE(const dir_t* dir) {
594 594
  *
595 595
  * \return true if the entry is for a subdirectory else false.
596 596
  */
597
-static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) {
597
+static inline uint8_t DIR_IS_SUBDIR(const dir_t *dir) {
598 598
   return (dir->attributes & DIR_ATT_FILE_TYPE_MASK) == DIR_ATT_DIRECTORY;
599 599
 }
600 600
 
@@ -604,6 +604,6 @@ static inline uint8_t DIR_IS_SUBDIR(const dir_t* dir) {
604 604
  *
605 605
  * \return true if the entry is for a normal file or subdirectory else false.
606 606
  */
607
-static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t* dir) {
607
+static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t *dir) {
608 608
   return (dir->attributes & DIR_ATT_VOLUME_ID) == 0;
609 609
 }

+ 2
- 2
Marlin/src/sd/SdFile.cpp Parādīt failu

@@ -43,7 +43,7 @@
43 43
  * \param[in] oflag Values for \a oflag are constructed by a bitwise-inclusive
44 44
  * OR of open flags. see SdBaseFile::open(SdBaseFile*, const char*, uint8_t).
45 45
  */
46
-SdFile::SdFile(const char* path, uint8_t oflag) : SdBaseFile(path, oflag) { }
46
+SdFile::SdFile(const char *path, uint8_t oflag) : SdBaseFile(path, oflag) { }
47 47
 
48 48
 /**
49 49
  * Write data to an open file.
@@ -78,7 +78,7 @@ int16_t SdFile::write(const void* buf, uint16_t nbyte) { return SdBaseFile::writ
78 78
  * \param[in] str Pointer to the string.
79 79
  * Use writeError to check for errors.
80 80
  */
81
-void SdFile::write(const char* str) { SdBaseFile::write(str, strlen(str)); }
81
+void SdFile::write(const char *str) { SdBaseFile::write(str, strlen(str)); }
82 82
 
83 83
 /**
84 84
  * Write a PROGMEM string to a file.

+ 2
- 2
Marlin/src/sd/SdFile.h Parādīt failu

@@ -42,7 +42,7 @@
42 42
 class SdFile : public SdBaseFile {
43 43
  public:
44 44
   SdFile() {}
45
-  SdFile(const char* name, uint8_t oflag);
45
+  SdFile(const char *name, uint8_t oflag);
46 46
   #if ARDUINO >= 100
47 47
     size_t write(uint8_t b);
48 48
   #else
@@ -50,7 +50,7 @@ class SdFile : public SdBaseFile {
50 50
   #endif
51 51
 
52 52
   int16_t write(const void* buf, uint16_t nbyte);
53
-  void write(const char* str);
53
+  void write(const char *str);
54 54
   void write_P(PGM_P str);
55 55
   void writeln_P(PGM_P str);
56 56
 };

+ 5
- 5
Marlin/src/sd/SdVolume.cpp Parādīt failu

@@ -47,7 +47,7 @@
47 47
 #endif  // USE_MULTIPLE_CARDS
48 48
 
49 49
 // find a contiguous group of clusters
50
-bool SdVolume::allocContiguous(uint32_t count, uint32_t* curCluster) {
50
+bool SdVolume::allocContiguous(uint32_t count, uint32_t *curCluster) {
51 51
   if (ENABLED(SDCARD_READONLY)) return false;
52 52
 
53 53
   // start of group
@@ -149,7 +149,7 @@ bool SdVolume::cacheRawBlock(uint32_t blockNumber, bool dirty) {
149 149
 }
150 150
 
151 151
 // return the size in bytes of a cluster chain
152
-bool SdVolume::chainSize(uint32_t cluster, uint32_t* size) {
152
+bool SdVolume::chainSize(uint32_t cluster, uint32_t *size) {
153 153
   uint32_t s = 0;
154 154
   do {
155 155
     if (!fatGet(cluster, &cluster)) return false;
@@ -160,7 +160,7 @@ bool SdVolume::chainSize(uint32_t cluster, uint32_t* size) {
160 160
 }
161 161
 
162 162
 // Fetch a FAT entry
163
-bool SdVolume::fatGet(uint32_t cluster, uint32_t* value) {
163
+bool SdVolume::fatGet(uint32_t cluster, uint32_t *value) {
164 164
   uint32_t lba;
165 165
   if (cluster > (clusterCount_ + 1)) return false;
166 166
   if (FAT12_SUPPORT && fatType_ == 12) {
@@ -328,7 +328,7 @@ int32_t SdVolume::freeClusterCount() {
328 328
  */
329 329
 bool SdVolume::init(Sd2Card* dev, uint8_t part) {
330 330
   uint32_t totalBlocks, volumeStartBlock = 0;
331
-  fat32_boot_t* fbs;
331
+  fat32_boot_t *fbs;
332 332
 
333 333
   sdCard_ = dev;
334 334
   fatType_ = 0;
@@ -342,7 +342,7 @@ bool SdVolume::init(Sd2Card* dev, uint8_t part) {
342 342
   if (part) {
343 343
     if (part > 4) return false;
344 344
     if (!cacheRawBlock(volumeStartBlock, CACHE_FOR_READ)) return false;
345
-    part_t* p = &cacheBuffer_.mbr.part[part - 1];
345
+    part_t *p = &cacheBuffer_.mbr.part[part - 1];
346 346
     if ((p->boot & 0x7F) != 0  || p->totalSectors < 100 || p->firstSector == 0)
347 347
       return false; // not a valid partition
348 348
     volumeStartBlock = p->firstSector;

+ 6
- 6
Marlin/src/sd/SdVolume.h Parādīt failu

@@ -124,7 +124,7 @@ class SdVolume {
124 124
    * \param[out] v value of entry
125 125
    * \return true for success or false for failure
126 126
    */
127
-  bool dbgFat(uint32_t n, uint32_t* v) { return fatGet(n, v); }
127
+  bool dbgFat(uint32_t n, uint32_t *v) { return fatGet(n, v); }
128 128
 
129 129
  private:
130 130
   // Allow SdBaseFile access to SdVolume private data.
@@ -161,7 +161,7 @@ class SdVolume {
161 161
   uint16_t rootDirEntryCount_;  // number of entries in FAT16 root dir
162 162
   uint32_t rootDirStart_;       // root start block for FAT16, cluster for FAT32
163 163
 
164
-  bool allocContiguous(uint32_t count, uint32_t* curCluster);
164
+  bool allocContiguous(uint32_t count, uint32_t *curCluster);
165 165
   uint8_t blockOfCluster(uint32_t position) const { return (position >> 9) & (blocksPerCluster_ - 1); }
166 166
   uint32_t clusterStartBlock(uint32_t cluster) const { return dataStartBlock_ + ((cluster - 2) << clusterSizeShift_); }
167 167
   uint32_t blockNumber(uint32_t cluster, uint32_t position) const { return clusterStartBlock(cluster) + blockOfCluster(position); }
@@ -183,8 +183,8 @@ class SdVolume {
183 183
     cacheBlockNumber_  = blockNumber;
184 184
   }
185 185
   void cacheSetDirty() { cacheDirty_ |= CACHE_FOR_WRITE; }
186
-  bool chainSize(uint32_t beginCluster, uint32_t* size);
187
-  bool fatGet(uint32_t cluster, uint32_t* value);
186
+  bool chainSize(uint32_t beginCluster, uint32_t *size);
187
+  bool fatGet(uint32_t cluster, uint32_t *value);
188 188
   bool fatPut(uint32_t cluster, uint32_t value);
189 189
   bool fatPutEOC(uint32_t cluster) { return fatPut(cluster, 0x0FFFFFFF); }
190 190
   bool freeChain(uint32_t cluster);
@@ -193,6 +193,6 @@ class SdVolume {
193 193
     if (fatType_ == 16) return cluster >= FAT16EOC_MIN;
194 194
     return  cluster >= FAT32EOC_MIN;
195 195
   }
196
-  bool readBlock(uint32_t block, uint8_t* dst) { return sdCard_->readBlock(block, dst); }
197
-  bool writeBlock(uint32_t block, const uint8_t* dst) { return sdCard_->writeBlock(block, dst); }
196
+  bool readBlock(uint32_t block, uint8_t *dst) { return sdCard_->readBlock(block, dst); }
197
+  bool writeBlock(uint32_t block, const uint8_t *dst) { return sdCard_->writeBlock(block, dst); }
198 198
 };

+ 1
- 1
Marlin/src/sd/cardreader.h Parādīt failu

@@ -122,7 +122,7 @@ public:
122 122
 
123 123
   // Select a file
124 124
   static void selectFileByIndex(const uint16_t nr);
125
-  static void selectFileByName(const char* const match);
125
+  static void selectFileByName(const char * const match);
126 126
 
127 127
   // Print job
128 128
   static void openAndPrintFile(const char *name);   // (working directory)

+ 2
- 2
Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.cpp Parādīt failu

@@ -295,7 +295,7 @@ uint32_t Sd2Card::cardSize() {
295 295
   return lun0_capacity;
296 296
 }
297 297
 
298
-bool Sd2Card::readBlock(uint32_t block, uint8_t* dst) {
298
+bool Sd2Card::readBlock(uint32_t block, uint8_t *dst) {
299 299
   if (!isInserted()) return false;
300 300
   #if USB_DEBUG >= 3
301 301
     if (block >= lun0_capacity) {
@@ -309,7 +309,7 @@ bool Sd2Card::readBlock(uint32_t block, uint8_t* dst) {
309 309
   return bulk.Read(0, block, 512, 1, dst) == 0;
310 310
 }
311 311
 
312
-bool Sd2Card::writeBlock(uint32_t block, const uint8_t* src) {
312
+bool Sd2Card::writeBlock(uint32_t block, const uint8_t *src) {
313 313
   if (!isInserted()) return false;
314 314
   #if USB_DEBUG >= 3
315 315
     if (block >= lun0_capacity) {

+ 4
- 4
Marlin/src/sd/usb_flashdrive/Sd2Card_FlashDrive.h Parādīt failu

@@ -60,15 +60,15 @@ class Sd2Card {
60 60
     static void idle();
61 61
 
62 62
     inline bool readStart(const uint32_t block)                  { pos = block; return isReady(); }
63
-    inline bool readData(uint8_t* dst)                           { return readBlock(pos++, dst); }
63
+    inline bool readData(uint8_t *dst)                           { return readBlock(pos++, dst); }
64 64
     inline bool readStop() const                                 { return true; }
65 65
 
66 66
     inline bool writeStart(const uint32_t block, const uint32_t) { pos = block; return isReady(); }
67
-    inline bool writeData(uint8_t* src)                          { return writeBlock(pos++, src); }
67
+    inline bool writeData(uint8_t *src)                          { return writeBlock(pos++, src); }
68 68
     inline bool writeStop() const                                { return true; }
69 69
 
70
-    bool readBlock(uint32_t block, uint8_t* dst);
71
-    bool writeBlock(uint32_t blockNumber, const uint8_t* src);
70
+    bool readBlock(uint32_t block, uint8_t *dst);
71
+    bool writeBlock(uint32_t blockNumber, const uint8_t *src);
72 72
 
73 73
     bool readCSD(csd_t*)                                         { return true; }
74 74
 

+ 7
- 7
Marlin/src/sd/usb_flashdrive/lib-uhs2/Usb.cpp Parādīt failu

@@ -133,7 +133,7 @@ uint8_t USB::SetAddress(uint8_t addr, uint8_t ep, EpInfo **ppep, uint16_t *nak_l
133 133
 /* 00       =   success         */
134 134
 /* 01-0f    =   non-zero HRSLT  */
135 135
 uint8_t USB::ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bRequest, uint8_t wValLo, uint8_t wValHi,
136
-  uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t* dataptr, USBReadParser *p) {
136
+  uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t *dataptr, USBReadParser *p) {
137 137
   bool direction = false; // Request direction, IN or OUT
138 138
   uint8_t rcode;
139 139
   SETUP_PKT setup_pkt;
@@ -201,7 +201,7 @@ uint8_t USB::ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bReque
201 201
  * Keep sending INs and writes data to memory area pointed by 'data'
202 202
  * rcode 0 if no errors. rcode 01-0f is relayed from dispatchPkt(). Rcode f0 means RCVDAVIRQ error, fe = USB xfer timeout
203 203
  */
204
-uint8_t USB::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t* data, uint8_t bInterval /*= 0*/) {
204
+uint8_t USB::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval /*= 0*/) {
205 205
   EpInfo *pep = nullptr;
206 206
   uint16_t nak_limit = 0;
207 207
 
@@ -215,7 +215,7 @@ uint8_t USB::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t*
215 215
   return InTransfer(pep, nak_limit, nbytesptr, data, bInterval);
216 216
 }
217 217
 
218
-uint8_t USB::InTransfer(EpInfo *pep, uint16_t nak_limit, uint16_t *nbytesptr, uint8_t* data, uint8_t bInterval /*= 0*/) {
218
+uint8_t USB::InTransfer(EpInfo *pep, uint16_t nak_limit, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval /*= 0*/) {
219 219
   uint8_t rcode = 0;
220 220
   uint8_t pktsize;
221 221
 
@@ -286,7 +286,7 @@ uint8_t USB::InTransfer(EpInfo *pep, uint16_t nak_limit, uint16_t *nbytesptr, ui
286 286
  * Handles NAK bug per Maxim Application Note 4000 for single buffer transfer
287 287
  * rcode 0 if no errors. rcode 01-0f is relayed from HRSL
288 288
  */
289
-uint8_t USB::outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* data) {
289
+uint8_t USB::outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data) {
290 290
   EpInfo *pep = nullptr;
291 291
   uint16_t nak_limit = 0;
292 292
 
@@ -743,12 +743,12 @@ uint8_t USB::ReleaseDevice(uint8_t addr) {
743 743
 }
744 744
 
745 745
 // Get device descriptor
746
-uint8_t USB::getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* dataptr) {
746
+uint8_t USB::getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr) {
747 747
   return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, 0x00, USB_DESCRIPTOR_DEVICE, 0x0000, nbytes, nbytes, dataptr, nullptr);
748 748
 }
749 749
 
750 750
 // Get configuration descriptor
751
-uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t* dataptr) {
751
+uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t *dataptr) {
752 752
   return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, conf, USB_DESCRIPTOR_CONFIGURATION, 0x0000, nbytes, nbytes, dataptr, nullptr);
753 753
 }
754 754
 
@@ -774,7 +774,7 @@ uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint8_t conf, USBReadParser
774 774
 }
775 775
 
776 776
 // Get string descriptor
777
-uint8_t USB::getStrDescr(uint8_t addr, uint8_t ep, uint16_t ns, uint8_t index, uint16_t langid, uint8_t* dataptr) {
777
+uint8_t USB::getStrDescr(uint8_t addr, uint8_t ep, uint16_t ns, uint8_t index, uint16_t langid, uint8_t *dataptr) {
778 778
   return ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, index, USB_DESCRIPTOR_STRING, langid, ns, ns, dataptr, nullptr);
779 779
 }
780 780
 

+ 10
- 10
Marlin/src/sd/usb_flashdrive/lib-uhs2/UsbCore.h Parādīt failu

@@ -250,19 +250,19 @@ public:
250 250
   uint8_t setEpInfoEntry(uint8_t addr, uint8_t epcount, EpInfo* eprecord_ptr);
251 251
 
252 252
   /* Control requests */
253
-  uint8_t getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* dataptr);
254
-  uint8_t getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t* dataptr);
253
+  uint8_t getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr);
254
+  uint8_t getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t *dataptr);
255 255
 
256 256
   uint8_t getConfDescr(uint8_t addr, uint8_t ep, uint8_t conf, USBReadParser *p);
257 257
 
258
-  uint8_t getStrDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t index, uint16_t langid, uint8_t* dataptr);
258
+  uint8_t getStrDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t index, uint16_t langid, uint8_t *dataptr);
259 259
   uint8_t setAddr(uint8_t oldaddr, uint8_t ep, uint8_t newaddr);
260 260
   uint8_t setConf(uint8_t addr, uint8_t ep, uint8_t conf_value);
261 261
   /**/
262
-  uint8_t ctrlData(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* dataptr, bool direction);
262
+  uint8_t ctrlData(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr, bool direction);
263 263
   uint8_t ctrlStatus(uint8_t ep, bool direction, uint16_t nak_limit);
264
-  uint8_t inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t* data, uint8_t bInterval = 0);
265
-  uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* data);
264
+  uint8_t inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data, uint8_t bInterval = 0);
265
+  uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data);
266 266
   uint8_t dispatchPkt(uint8_t token, uint8_t ep, uint16_t nak_limit);
267 267
 
268 268
   void Task();
@@ -272,7 +272,7 @@ public:
272 272
   uint8_t ReleaseDevice(uint8_t addr);
273 273
 
274 274
   uint8_t ctrlReq(uint8_t addr, uint8_t ep, uint8_t bmReqType, uint8_t bRequest, uint8_t wValLo, uint8_t wValHi,
275
-    uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t* dataptr, USBReadParser *p);
275
+    uint16_t wInd, uint16_t total, uint16_t nbytes, uint8_t *dataptr, USBReadParser *p);
276 276
 
277 277
 private:
278 278
   void init();
@@ -285,17 +285,17 @@ private:
285 285
 #if 0 //defined(USB_METHODS_INLINE)
286 286
 //get device descriptor
287 287
 
288
-inline uint8_t USB::getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* dataptr) {
288
+inline uint8_t USB::getDevDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *dataptr) {
289 289
   return ( ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, 0x00, USB_DESCRIPTOR_DEVICE, 0x0000, nbytes, dataptr));
290 290
 }
291 291
 //get configuration descriptor
292 292
 
293
-inline uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t* dataptr) {
293
+inline uint8_t USB::getConfDescr(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t conf, uint8_t *dataptr) {
294 294
   return ( ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, conf, USB_DESCRIPTOR_CONFIGURATION, 0x0000, nbytes, dataptr));
295 295
 }
296 296
 //get string descriptor
297 297
 
298
-inline uint8_t USB::getStrDescr(uint8_t addr, uint8_t ep, uint16_t nuint8_ts, uint8_t index, uint16_t langid, uint8_t* dataptr) {
298
+inline uint8_t USB::getStrDescr(uint8_t addr, uint8_t ep, uint16_t nuint8_ts, uint8_t index, uint16_t langid, uint8_t *dataptr) {
299 299
   return ( ctrlReq(addr, ep, bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, index, USB_DESCRIPTOR_STRING, langid, nuint8_ts, dataptr));
300 300
 }
301 301
 //set address

+ 2
- 2
Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.cpp Parādīt failu

@@ -51,7 +51,7 @@ void MAX3421e::regWr(uint8_t reg, uint8_t data) {
51 51
 
52 52
 // multiple-byte write
53 53
 // return a pointer to memory position after last written
54
-uint8_t* MAX3421e::bytesWr(uint8_t reg, uint8_t nbytes, uint8_t* data_p) {
54
+uint8_t* MAX3421e::bytesWr(uint8_t reg, uint8_t nbytes, uint8_t *data_p) {
55 55
   cs();
56 56
   spiSend(reg | 0x02);
57 57
   while (nbytes--) spiSend(*data_p++);
@@ -79,7 +79,7 @@ uint8_t MAX3421e::regRd(uint8_t reg) {
79 79
 // multiple-byte register read
80 80
 
81 81
 // return a pointer to a memory position after last read
82
-uint8_t* MAX3421e::bytesRd(uint8_t reg, uint8_t nbytes, uint8_t* data_p) {
82
+uint8_t* MAX3421e::bytesRd(uint8_t reg, uint8_t nbytes, uint8_t *data_p) {
83 83
   cs();
84 84
   spiSend(reg);
85 85
   while (nbytes--) *data_p++ = spiRec();

+ 2
- 2
Marlin/src/sd/usb_flashdrive/lib-uhs2/usbhost.h Parādīt failu

@@ -37,10 +37,10 @@ class MAX3421e {
37 37
     bool      start();
38 38
 
39 39
     void      regWr(uint8_t reg, uint8_t data);
40
-    uint8_t*  bytesWr(uint8_t reg, uint8_t nbytes, uint8_t* data_p);
40
+    uint8_t*  bytesWr(uint8_t reg, uint8_t nbytes, uint8_t *data_p);
41 41
     void      gpioWr(uint8_t data);
42 42
     uint8_t   regRd(uint8_t reg);
43
-    uint8_t*  bytesRd(uint8_t reg, uint8_t nbytes, uint8_t* data_p);
43
+    uint8_t*  bytesRd(uint8_t reg, uint8_t nbytes, uint8_t *data_p);
44 44
     uint8_t   gpioRd();
45 45
     bool      reset();
46 46
 

+ 6
- 6
Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_host_INLINE.h Parādīt failu

@@ -594,7 +594,7 @@ void UHS_USB_HOST_BASE::ReleaseDevice(uint8_t addr) {
594 594
  * @param dataptr pointer to the data to return
595 595
  * @return status of the request, zero is success.
596 596
  */
597
-uint8_t UHS_USB_HOST_BASE::getDevDescr(uint8_t addr, uint16_t nbytes, uint8_t* dataptr) {
597
+uint8_t UHS_USB_HOST_BASE::getDevDescr(uint8_t addr, uint16_t nbytes, uint8_t *dataptr) {
598 598
         return ( ctrlReq(addr, mkSETUP_PKT8(UHS_bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, 0x00, USB_DESCRIPTOR_DEVICE, 0x0000, nbytes), nbytes, dataptr));
599 599
 }
600 600
 
@@ -607,7 +607,7 @@ uint8_t UHS_USB_HOST_BASE::getDevDescr(uint8_t addr, uint16_t nbytes, uint8_t* d
607 607
  * @param dataptr ointer to the data to return
608 608
  * @return status of the request, zero is success.
609 609
  */
610
-uint8_t UHS_USB_HOST_BASE::getConfDescr(uint8_t addr, uint16_t nbytes, uint8_t conf, uint8_t* dataptr) {
610
+uint8_t UHS_USB_HOST_BASE::getConfDescr(uint8_t addr, uint16_t nbytes, uint8_t conf, uint8_t *dataptr) {
611 611
         return ( ctrlReq(addr, mkSETUP_PKT8(UHS_bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, conf, USB_DESCRIPTOR_CONFIGURATION, 0x0000, nbytes), nbytes, dataptr));
612 612
 }
613 613
 
@@ -621,7 +621,7 @@ uint8_t UHS_USB_HOST_BASE::getConfDescr(uint8_t addr, uint16_t nbytes, uint8_t c
621 621
  * @param dataptr pointer to the data to return
622 622
  * @return status of the request, zero is success.
623 623
  */
624
-uint8_t UHS_USB_HOST_BASE::getStrDescr(uint8_t addr, uint16_t ns, uint8_t index, uint16_t langid, uint8_t* dataptr) {
624
+uint8_t UHS_USB_HOST_BASE::getStrDescr(uint8_t addr, uint16_t ns, uint8_t index, uint16_t langid, uint8_t *dataptr) {
625 625
         return ( ctrlReq(addr, mkSETUP_PKT8(UHS_bmREQ_GET_DESCR, USB_REQUEST_GET_DESCRIPTOR, index, USB_DESCRIPTOR_STRING, langid, ns), ns, dataptr));
626 626
 }
627 627
 
@@ -668,7 +668,7 @@ uint8_t UHS_USB_HOST_BASE::setConf(uint8_t addr, uint8_t conf_value) {
668 668
  * @param data pointer to buffer to hold transfer
669 669
  * @return zero for success or error code
670 670
  */
671
-uint8_t UHS_USB_HOST_BASE::outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* data) {
671
+uint8_t UHS_USB_HOST_BASE::outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data) {
672 672
         UHS_EpInfo *pep = NULL;
673 673
         uint16_t nak_limit = 0;
674 674
         HOST_DEBUG("outTransfer: addr: 0x%2.2x ep: 0x%2.2x nbytes: 0x%4.4x data: 0x%p\r\n", addr, ep, nbytes, data);
@@ -689,7 +689,7 @@ uint8_t UHS_USB_HOST_BASE::outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes
689 689
  * @param data pointer to buffer to hold transfer
690 690
  * @return zero for success or error code
691 691
  */
692
-uint8_t UHS_USB_HOST_BASE::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t* data) {
692
+uint8_t UHS_USB_HOST_BASE::inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data) {
693 693
         UHS_EpInfo *pep = NULL;
694 694
         uint16_t nak_limit = 0;
695 695
 
@@ -980,7 +980,7 @@ uint8_t UHS_USB_HOST_BASE::eat(UHS_EpInfo *pep, uint16_t *left, uint16_t *read,
980 980
         return rcode;
981 981
 }
982 982
 
983
-uint8_t UHS_USB_HOST_BASE::ctrlReq(uint8_t addr, uint64_t Request, uint16_t nbytes, uint8_t* dataptr) {
983
+uint8_t UHS_USB_HOST_BASE::ctrlReq(uint8_t addr, uint64_t Request, uint16_t nbytes, uint8_t *dataptr) {
984 984
         //bool direction = bmReqType & 0x80; //request direction, IN or OUT
985 985
         uint8_t rcode = 0;
986 986
 

+ 7
- 7
Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/UHS_usbhost.h Parādīt failu

@@ -103,7 +103,7 @@ public:
103 103
                 return (current_state == usb_task_state);
104 104
         };
105 105
 
106
-        virtual UHS_EpInfo * UHS_NI ctrlReqOpen(NOTUSED(uint8_t addr), NOTUSED(uint64_t Request), NOTUSED(uint8_t* dataptr)) {
106
+        virtual UHS_EpInfo * UHS_NI ctrlReqOpen(NOTUSED(uint8_t addr), NOTUSED(uint64_t Request), NOTUSED(uint8_t *dataptr)) {
107 107
                 return NULL;
108 108
         };
109 109
 
@@ -213,17 +213,17 @@ public:
213 213
 
214 214
         uint8_t UHS_NI EPClearHalt(uint8_t addr, uint8_t ep);
215 215
 
216
-        uint8_t UHS_NI ctrlReq(uint8_t addr, uint64_t Request, uint16_t nbytes, uint8_t* dataptr);
216
+        uint8_t UHS_NI ctrlReq(uint8_t addr, uint64_t Request, uint16_t nbytes, uint8_t *dataptr);
217 217
 
218
-        uint8_t UHS_NI getDevDescr(uint8_t addr, uint16_t nbytes, uint8_t* dataptr);
218
+        uint8_t UHS_NI getDevDescr(uint8_t addr, uint16_t nbytes, uint8_t *dataptr);
219 219
 
220
-        uint8_t UHS_NI getConfDescr(uint8_t addr, uint16_t nbytes, uint8_t conf, uint8_t* dataptr);
220
+        uint8_t UHS_NI getConfDescr(uint8_t addr, uint16_t nbytes, uint8_t conf, uint8_t *dataptr);
221 221
 
222 222
         uint8_t UHS_NI setAddr(uint8_t oldaddr, uint8_t newaddr);
223 223
 
224 224
         uint8_t UHS_NI setConf(uint8_t addr, uint8_t conf_value);
225 225
 
226
-        uint8_t UHS_NI getStrDescr(uint8_t addr, uint16_t nbytes, uint8_t index, uint16_t langid, uint8_t* dataptr);
226
+        uint8_t UHS_NI getStrDescr(uint8_t addr, uint16_t nbytes, uint8_t index, uint16_t langid, uint8_t *dataptr);
227 227
 
228 228
         void UHS_NI ReleaseDevice(uint8_t addr);
229 229
 
@@ -262,8 +262,8 @@ public:
262 262
         uint8_t enumerateInterface(ENUMERATION_INFO *ei);
263 263
         uint8_t getNextInterface(ENUMERATION_INFO *ei, UHS_EpInfo *pep, uint8_t data[], uint16_t *left, uint16_t *read, uint8_t *offset);
264 264
         uint8_t initDescrStream(ENUMERATION_INFO *ei, USB_FD_CONFIGURATION_DESCRIPTOR *ucd, UHS_EpInfo *pep, uint8_t *data, uint16_t *left, uint16_t *read, uint8_t *offset);
265
-        uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t* data);
266
-        uint8_t inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t* data);
265
+        uint8_t outTransfer(uint8_t addr, uint8_t ep, uint16_t nbytes, uint8_t *data);
266
+        uint8_t inTransfer(uint8_t addr, uint8_t ep, uint16_t *nbytesptr, uint8_t *data);
267 267
         uint8_t doSoftReset(uint8_t parent, uint8_t port, uint8_t address);
268 268
         uint8_t getone(UHS_EpInfo *pep, uint16_t *left, uint16_t *read, uint8_t *dataptr, uint8_t *offset);
269 269
         uint8_t eat(UHS_EpInfo *pep, uint16_t *left, uint16_t *read, uint8_t *dataptr, uint8_t *offset, uint16_t *yum);

+ 3
- 3
Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD.h Parādīt failu

@@ -388,7 +388,7 @@ public:
388 388
                 return (!condet);
389 389
         };
390 390
 
391
-        virtual UHS_EpInfo *ctrlReqOpen(uint8_t addr, uint64_t Request, uint8_t* dataptr);
391
+        virtual UHS_EpInfo *ctrlReqOpen(uint8_t addr, uint64_t Request, uint8_t *dataptr);
392 392
 
393 393
         virtual void UHS_NI vbusPower(VBUS_t state) {
394 394
                 regWr(rPINCTL, (bmFDUPSPI | bmIRQ_SENSE) | (uint8_t)(state));
@@ -483,8 +483,8 @@ public:
483 483
         void gpioWr(uint8_t data);
484 484
         uint8_t regRd(uint8_t reg);
485 485
         uint8_t gpioRd();
486
-        uint8_t* bytesWr(uint8_t reg, uint8_t nbytes, uint8_t* data_p);
487
-        uint8_t* bytesRd(uint8_t reg, uint8_t nbytes, uint8_t* data_p);
486
+        uint8_t* bytesWr(uint8_t reg, uint8_t nbytes, uint8_t *data_p);
487
+        uint8_t* bytesRd(uint8_t reg, uint8_t nbytes, uint8_t *data_p);
488 488
 
489 489
         // ARM/NVIC specific, used to emulate reentrant ISR.
490 490
 #ifdef SWI_IRQ_NUM

+ 0
- 0
Marlin/src/sd/usb_flashdrive/lib-uhs3/UHS_host/USB_HOST_SHIELD/USB_HOST_SHIELD_INLINE.h Parādīt failu


Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels

Notiek ielāde…
Atcelt
Saglabāt