瀏覽代碼

💡 Misc. cleanup, comments

Scott Lahteine 3 年之前
父節點
當前提交
24d1d3eb5c

+ 1
- 1
Marlin/src/HAL/ESP32/HAL.h 查看文件

139
 
139
 
140
 // Enable hooks into idle and setup for HAL
140
 // Enable hooks into idle and setup for HAL
141
 #define HAL_IDLETASK 1
141
 #define HAL_IDLETASK 1
142
-#define BOARD_INIT() HAL_init_board();
142
+#define BOARD_INIT() HAL_init_board()
143
 void HAL_idletask();
143
 void HAL_idletask();
144
 inline void HAL_init() {}
144
 inline void HAL_init() {}
145
 void HAL_init_board();
145
 void HAL_init_board();

+ 1
- 1
Marlin/src/gcode/feature/pause/G61.cpp 查看文件

41
  *
41
  *
42
  *   If XYZE are not given, default restore uses the smart blocking move.
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
   const uint8_t slot = parser.byteval('S');
46
   const uint8_t slot = parser.byteval('S');
47
 
47
 

+ 2
- 2
Marlin/src/lcd/TFTGLCD/lcdprint_TFTGLCD.cpp 查看文件

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

+ 1
- 1
Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp 查看文件

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

+ 1
- 1
Marlin/src/lcd/dogm/status_screen_DOGM.cpp 查看文件

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

+ 1
- 1
Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp 查看文件

63
 char AnycubicTFTClass::SelectedFile[FILENAME_LENGTH];
63
 char AnycubicTFTClass::SelectedFile[FILENAME_LENGTH];
64
 
64
 
65
 // Serial helpers
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
 static void send(const char *str) { LCD_SERIAL.print(str); }
67
 static void send(const char *str) { LCD_SERIAL.print(str); }
68
 static void send_P(PGM_P str) {
68
 static void send_P(PGM_P str) {
69
   while (const char c = pgm_read_byte(str++))
69
   while (const char c = pgm_read_byte(str++))

+ 3
- 3
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp 查看文件

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

+ 4
- 4
Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h 查看文件

94
   static void DGUS_LanguageDisplay(uint8_t var);
94
   static void DGUS_LanguageDisplay(uint8_t var);
95
   static void TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr);
95
   static void TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr);
96
   static void GetTurnOffCtrl(DGUS_VP_Variable &var, void *val_ptr);
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
   static void LCD_BLK_Adjust(DGUS_VP_Variable &var, void *val_ptr);
101
   static void LCD_BLK_Adjust(DGUS_VP_Variable &var, void *val_ptr);
102
   static void SD_FileBack(DGUS_VP_Variable &var, void *val_ptr);
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
           gcode.reset_stepper_timeout();
313
           gcode.reset_stepper_timeout();
314
 
314
 
315
           if (!vp.size) {
315
           if (!vp.size) {
316
-            DEBUG_ECHOLN();
316
+            DEBUG_EOL();
317
             vp.rx_handler(vp, nullptr);
317
             vp.rx_handler(vp, nullptr);
318
 
318
 
319
             rx_datagram_state = DGUS_IDLE;
319
             rx_datagram_state = DGUS_IDLE;
325
             memset(buffer, 0, vp.size);
325
             memset(buffer, 0, vp.size);
326
 
326
 
327
             for (uint8_t i = 0; i < dlen; i++) {
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
                 break;
331
                 break;
334
-              }
335
 
332
 
336
               buffer[i] = tmp[i + 3];
333
               buffer[i] = tmp[i + 3];
337
             }
334
             }
338
 
335
 
339
-            DEBUG_ECHOLN();
336
+            DEBUG_EOL();
340
             vp.rx_handler(vp, buffer);
337
             vp.rx_handler(vp, buffer);
341
 
338
 
342
             rx_datagram_state = DGUS_IDLE;
339
             rx_datagram_state = DGUS_IDLE;
349
             break;
346
             break;
350
           }
347
           }
351
 
348
 
352
-          DEBUG_ECHOLN();
349
+          DEBUG_EOL();
353
           vp.rx_handler(vp, &tmp[3]);
350
           vp.rx_handler(vp, &tmp[3]);
354
 
351
 
355
           rx_datagram_state = DGUS_IDLE;
352
           rx_datagram_state = DGUS_IDLE;

+ 5
- 5
Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.h 查看文件

39
     void begin(uint32_t baud);
39
     void begin(uint32_t baud);
40
     void begin(uint32_t baud, uint8_t config);
40
     void begin(uint32_t baud, uint8_t config);
41
     void end();
41
     void end();
42
-    int available(void);
43
-    int read(void);
42
+    int available();
43
+    int read();
44
     int write(uint8_t);
44
     int write(uint8_t);
45
 
45
 
46
     // Interrupt handlers
46
     // Interrupt handlers
47
     static int _tx_complete_irq(serial_t *obj);
47
     static int _tx_complete_irq(serial_t *obj);
48
     static void _rx_complete_irq(serial_t *obj);
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
   private:
54
   private:
55
     void setRx(uint32_t _rx);
55
     void setRx(uint32_t _rx);

+ 3
- 3
Marlin/src/libs/W25Qxx.cpp 查看文件

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

+ 3
- 3
Marlin/src/libs/W25Qxx.h 查看文件

61
   static void spi_flash_Send(uint8_t b);
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
   static uint16_t W25QXX_ReadID(void);
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
   static void SPI_FLASH_SectorErase(uint32_t SectorAddr);
66
   static void SPI_FLASH_SectorErase(uint32_t SectorAddr);
67
   static void SPI_FLASH_BlockErase(uint32_t BlockAddr);
67
   static void SPI_FLASH_BlockErase(uint32_t BlockAddr);
68
-  static void SPI_FLASH_BulkErase(void);
68
+  static void SPI_FLASH_BulkErase();
69
   static void SPI_FLASH_PageWrite(uint8_t *pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite);
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);
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);
71
   static void SPI_FLASH_BufferRead(uint8_t *pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead);

Loading…
取消
儲存