Переглянути джерело

💡 Misc. cleanup, comments

Scott Lahteine 3 роки тому
джерело
коміт
24d1d3eb5c

+ 1
- 1
Marlin/src/HAL/ESP32/HAL.h Переглянути файл

@@ -139,7 +139,7 @@ inline void set_pwm_duty(const pin_t pin, const uint16_t v, const uint16_t=255,
139 139
 
140 140
 // Enable hooks into idle and setup for HAL
141 141
 #define HAL_IDLETASK 1
142
-#define BOARD_INIT() HAL_init_board();
142
+#define BOARD_INIT() HAL_init_board()
143 143
 void HAL_idletask();
144 144
 inline void HAL_init() {}
145 145
 void HAL_init_board();

+ 1
- 1
Marlin/src/gcode/feature/pause/G61.cpp Переглянути файл

@@ -41,7 +41,7 @@
41 41
  *
42 42
  *   If XYZE are not given, default restore uses the smart blocking move.
43 43
  */
44
-void GcodeSuite::G61(void) {
44
+void GcodeSuite::G61() {
45 45
 
46 46
   const uint8_t slot = parser.byteval('S');
47 47
 

+ 2
- 2
Marlin/src/lcd/TFTGLCD/lcdprint_TFTGLCD.cpp Переглянути файл

@@ -45,7 +45,7 @@
45 45
 
46 46
 #include <string.h>
47 47
 
48
-int lcd_glyph_height(void) { return 1; }
48
+int lcd_glyph_height() { return 1; }
49 49
 
50 50
 typedef struct _TFTGLCD_charmap_t {
51 51
   wchar_t uchar; // the unicode char
@@ -1119,7 +1119,7 @@ int lcd_put_u8str_max_P(PGM_P utf8_pstr, pixel_len_t max_length) {
1119 1119
     return 0;
1120 1120
   }
1121 1121
 
1122
-  int test_TFTGLCD_charmap_all(void) {
1122
+  int test_TFTGLCD_charmap_all() {
1123 1123
     int flg_error = 0;
1124 1124
     if (test_TFTGLCD_charmap(g_TFTGLCD_charmap_device, COUNT(g_TFTGLCD_charmap_device), "g_TFTGLCD_charmap_device", 0) < 0) {
1125 1125
       flg_error = 1;

+ 1
- 1
Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp Переглянути файл

@@ -265,7 +265,7 @@ void TFTGLCD::setContrast(uint16_t contrast) {
265 265
 extern volatile int8_t encoderDiff;
266 266
 
267 267
 // Read buttons and encoder states
268
-uint8_t MarlinUI::read_slow_buttons(void) {
268
+uint8_t MarlinUI::read_slow_buttons() {
269 269
   if (!PanelDetected)    return 0;
270 270
   #if ENABLED(TFTGLCD_PANEL_SPI)
271 271
     uint8_t b = 0;

+ 1
- 1
Marlin/src/lcd/dogm/status_screen_DOGM.cpp Переглянути файл

@@ -57,7 +57,7 @@
57 57
   #include "../../feature/cooler.h"
58 58
 #endif
59 59
 
60
-#if ENABLED(I2C_AMMETER)
60
+#if DO_DRAW_AMMETER
61 61
   #include "../../feature/ammeter.h"
62 62
 #endif
63 63
 

+ 1
- 1
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp Переглянути файл

@@ -63,7 +63,7 @@ char AnycubicTFTClass::SelectedDirectory[30];
63 63
 char AnycubicTFTClass::SelectedFile[FILENAME_LENGTH];
64 64
 
65 65
 // Serial helpers
66
-static void sendNewLine(void) { LCD_SERIAL.write('\r'); LCD_SERIAL.write('\n'); }
66
+static void sendNewLine() { LCD_SERIAL.write('\r'); LCD_SERIAL.write('\n'); }
67 67
 static void send(const char *str) { LCD_SERIAL.print(str); }
68 68
 static void send_P(PGM_P str) {
69 69
   while (const char c = pgm_read_byte(str++))

+ 3
- 3
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp Переглянути файл

@@ -1459,7 +1459,7 @@ void DGUSScreenHandler::LanguagePInit() {
1459 1459
   }
1460 1460
 }
1461 1461
 
1462
-void DGUSScreenHandler::DGUS_ExtrudeLoadInit(void) {
1462
+void DGUSScreenHandler::DGUS_ExtrudeLoadInit() {
1463 1463
   ex_filament.ex_length           = distanceFilament;
1464 1464
   ex_filament.ex_load_unload_flag = 0;
1465 1465
   ex_filament.ex_need_time        = filamentSpeed_mm_s;
@@ -1469,7 +1469,7 @@ void DGUSScreenHandler::DGUS_ExtrudeLoadInit(void) {
1469 1469
   ex_filament.ex_tick_start       = 0;
1470 1470
 }
1471 1471
 
1472
-void DGUSScreenHandler::DGUS_RunoutInit(void) {
1472
+void DGUSScreenHandler::DGUS_RunoutInit() {
1473 1473
   #if PIN_EXISTS(MT_DET_1)
1474 1474
     SET_INPUT_PULLUP(MT_DET_1_PIN);
1475 1475
   #endif
@@ -1479,7 +1479,7 @@ void DGUSScreenHandler::DGUS_RunoutInit(void) {
1479 1479
   runout_mks.runout_status = UNRUNOUT_STATUS;
1480 1480
 }
1481 1481
 
1482
-void DGUSScreenHandler::DGUS_Runout_Idle(void) {
1482
+void DGUSScreenHandler::DGUS_Runout_Idle() {
1483 1483
   #if ENABLED(DGUS_MKS_RUNOUT_SENSOR)
1484 1484
     // scanf runout pin
1485 1485
     switch (runout_mks.runout_status) {

+ 4
- 4
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h Переглянути файл

@@ -94,10 +94,10 @@ public:
94 94
   static void DGUS_LanguageDisplay(uint8_t var);
95 95
   static void TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr);
96 96
   static void GetTurnOffCtrl(DGUS_VP_Variable &var, void *val_ptr);
97
-  static void LanguagePInit(void);
98
-  static void DGUS_Runout_Idle(void);
99
-  static void DGUS_RunoutInit(void);
100
-  static void DGUS_ExtrudeLoadInit(void);
97
+  static void LanguagePInit();
98
+  static void DGUS_Runout_Idle();
99
+  static void DGUS_RunoutInit();
100
+  static void DGUS_ExtrudeLoadInit();
101 101
   static void LCD_BLK_Adjust(DGUS_VP_Variable &var, void *val_ptr);
102 102
   static void SD_FileBack(DGUS_VP_Variable &var, void *val_ptr);
103 103
 

+ 5
- 8
Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp Переглянути файл

@@ -313,7 +313,7 @@ void DGUSDisplay::ProcessRx() {
313 313
           gcode.reset_stepper_timeout();
314 314
 
315 315
           if (!vp.size) {
316
-            DEBUG_ECHOLN();
316
+            DEBUG_EOL();
317 317
             vp.rx_handler(vp, nullptr);
318 318
 
319 319
             rx_datagram_state = DGUS_IDLE;
@@ -325,18 +325,15 @@ void DGUSDisplay::ProcessRx() {
325 325
             memset(buffer, 0, vp.size);
326 326
 
327 327
             for (uint8_t i = 0; i < dlen; i++) {
328
-              if (i >= vp.size) {
329
-                break;
330
-              }
328
+              if (i >= vp.size) break;
331 329
 
332
-              if (i + 1 < dlen && tmp[i + 3] == 0xFF && tmp[i + 4] == 0xFF) {
330
+              if (i + 1 < dlen && tmp[i + 3] == 0xFF && tmp[i + 4] == 0xFF)
333 331
                 break;
334
-              }
335 332
 
336 333
               buffer[i] = tmp[i + 3];
337 334
             }
338 335
 
339
-            DEBUG_ECHOLN();
336
+            DEBUG_EOL();
340 337
             vp.rx_handler(vp, buffer);
341 338
 
342 339
             rx_datagram_state = DGUS_IDLE;
@@ -349,7 +346,7 @@ void DGUSDisplay::ProcessRx() {
349 346
             break;
350 347
           }
351 348
 
352
-          DEBUG_ECHOLN();
349
+          DEBUG_EOL();
353 350
           vp.rx_handler(vp, &tmp[3]);
354 351
 
355 352
           rx_datagram_state = DGUS_IDLE;

+ 5
- 5
Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.h Переглянути файл

@@ -39,17 +39,17 @@ class WifiSerial {
39 39
     void begin(uint32_t baud);
40 40
     void begin(uint32_t baud, uint8_t config);
41 41
     void end();
42
-    int available(void);
43
-    int read(void);
42
+    int available();
43
+    int read();
44 44
     int write(uint8_t);
45 45
 
46 46
     // Interrupt handlers
47 47
     static int _tx_complete_irq(serial_t *obj);
48 48
     static void _rx_complete_irq(serial_t *obj);
49 49
 
50
-    void flush(void);
51
-    bool isHalfDuplex(void) const;
52
-    void enableHalfDuplexRx(void);
50
+    void flush();
51
+    bool isHalfDuplex() const;
52
+    void enableHalfDuplexRx();
53 53
 
54 54
   private:
55 55
     void setRx(uint32_t _rx);

+ 3
- 3
Marlin/src/libs/W25Qxx.cpp Переглянути файл

@@ -133,7 +133,7 @@ uint16_t W25QXXFlash::W25QXX_ReadID(void) {
133 133
   return Temp;
134 134
 }
135 135
 
136
-void W25QXXFlash::SPI_FLASH_WriteEnable(void) {
136
+void W25QXXFlash::SPI_FLASH_WriteEnable() {
137 137
   // Select the FLASH: Chip Select low
138 138
   SPI_FLASH_CS_L();
139 139
   // Send "Write Enable" instruction
@@ -151,7 +151,7 @@ void W25QXXFlash::SPI_FLASH_WriteEnable(void) {
151 151
 * Output         : None
152 152
 * Return         : None
153 153
 *******************************************************************************/
154
-void W25QXXFlash::SPI_FLASH_WaitForWriteEnd(void) {
154
+void W25QXXFlash::SPI_FLASH_WaitForWriteEnd() {
155 155
   uint8_t FLASH_Status = 0;
156 156
 
157 157
   // Select the FLASH: Chip Select low
@@ -216,7 +216,7 @@ void W25QXXFlash::SPI_FLASH_BlockErase(uint32_t BlockAddr) {
216 216
 * Output         : None
217 217
 * Return         : None
218 218
 *******************************************************************************/
219
-void W25QXXFlash::SPI_FLASH_BulkErase(void) {
219
+void W25QXXFlash::SPI_FLASH_BulkErase() {
220 220
   // Send write enable instruction
221 221
   SPI_FLASH_WriteEnable();
222 222
 

+ 3
- 3
Marlin/src/libs/W25Qxx.h Переглянути файл

@@ -61,11 +61,11 @@ public:
61 61
   static void spi_flash_Send(uint8_t b);
62 62
   static void spi_flash_SendBlock(uint8_t token, const uint8_t *buf);
63 63
   static uint16_t W25QXX_ReadID(void);
64
-  static void SPI_FLASH_WriteEnable(void);
65
-  static void SPI_FLASH_WaitForWriteEnd(void);
64
+  static void SPI_FLASH_WriteEnable();
65
+  static void SPI_FLASH_WaitForWriteEnd();
66 66
   static void SPI_FLASH_SectorErase(uint32_t SectorAddr);
67 67
   static void SPI_FLASH_BlockErase(uint32_t BlockAddr);
68
-  static void SPI_FLASH_BulkErase(void);
68
+  static void SPI_FLASH_BulkErase();
69 69
   static void SPI_FLASH_PageWrite(uint8_t *pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite);
70 70
   static void SPI_FLASH_BufferWrite(uint8_t *pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite);
71 71
   static void SPI_FLASH_BufferRead(uint8_t *pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead);

Завантаження…
Відмінити
Зберегти