diff --git a/Marlin/src/HAL/ESP32/HAL.h b/Marlin/src/HAL/ESP32/HAL.h index 8473e3c4e4..78eebc8d82 100644 --- a/Marlin/src/HAL/ESP32/HAL.h +++ b/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, // Enable hooks into idle and setup for HAL #define HAL_IDLETASK 1 -#define BOARD_INIT() HAL_init_board(); +#define BOARD_INIT() HAL_init_board() void HAL_idletask(); inline void HAL_init() {} void HAL_init_board(); diff --git a/Marlin/src/gcode/feature/pause/G61.cpp b/Marlin/src/gcode/feature/pause/G61.cpp index 18667501e4..e0e1983a25 100644 --- a/Marlin/src/gcode/feature/pause/G61.cpp +++ b/Marlin/src/gcode/feature/pause/G61.cpp @@ -41,7 +41,7 @@ * * If XYZE are not given, default restore uses the smart blocking move. */ -void GcodeSuite::G61(void) { +void GcodeSuite::G61() { const uint8_t slot = parser.byteval('S'); diff --git a/Marlin/src/lcd/TFTGLCD/lcdprint_TFTGLCD.cpp b/Marlin/src/lcd/TFTGLCD/lcdprint_TFTGLCD.cpp index 106ce76138..d0cf5795d2 100644 --- a/Marlin/src/lcd/TFTGLCD/lcdprint_TFTGLCD.cpp +++ b/Marlin/src/lcd/TFTGLCD/lcdprint_TFTGLCD.cpp @@ -45,7 +45,7 @@ #include -int lcd_glyph_height(void) { return 1; } +int lcd_glyph_height() { return 1; } typedef struct _TFTGLCD_charmap_t { 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) { return 0; } - int test_TFTGLCD_charmap_all(void) { + int test_TFTGLCD_charmap_all() { int flg_error = 0; if (test_TFTGLCD_charmap(g_TFTGLCD_charmap_device, COUNT(g_TFTGLCD_charmap_device), "g_TFTGLCD_charmap_device", 0) < 0) { flg_error = 1; diff --git a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp index 420bd7cd66..e9d3c73302 100644 --- a/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp +++ b/Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp @@ -265,7 +265,7 @@ void TFTGLCD::setContrast(uint16_t contrast) { extern volatile int8_t encoderDiff; // Read buttons and encoder states -uint8_t MarlinUI::read_slow_buttons(void) { +uint8_t MarlinUI::read_slow_buttons() { if (!PanelDetected) return 0; #if ENABLED(TFTGLCD_PANEL_SPI) uint8_t b = 0; diff --git a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp index 52554e5df8..aabca82fde 100644 --- a/Marlin/src/lcd/dogm/status_screen_DOGM.cpp +++ b/Marlin/src/lcd/dogm/status_screen_DOGM.cpp @@ -57,7 +57,7 @@ #include "../../feature/cooler.h" #endif -#if ENABLED(I2C_AMMETER) +#if DO_DRAW_AMMETER #include "../../feature/ammeter.h" #endif diff --git a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp index 98534ba65f..729d4547a8 100644 --- a/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp +++ b/Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp @@ -63,7 +63,7 @@ char AnycubicTFTClass::SelectedDirectory[30]; char AnycubicTFTClass::SelectedFile[FILENAME_LENGTH]; // Serial helpers -static void sendNewLine(void) { LCD_SERIAL.write('\r'); LCD_SERIAL.write('\n'); } +static void sendNewLine() { LCD_SERIAL.write('\r'); LCD_SERIAL.write('\n'); } static void send(const char *str) { LCD_SERIAL.print(str); } static void send_P(PGM_P str) { while (const char c = pgm_read_byte(str++)) diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp index 8054181353..695f50852b 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp @@ -1459,7 +1459,7 @@ void DGUSScreenHandler::LanguagePInit() { } } -void DGUSScreenHandler::DGUS_ExtrudeLoadInit(void) { +void DGUSScreenHandler::DGUS_ExtrudeLoadInit() { ex_filament.ex_length = distanceFilament; ex_filament.ex_load_unload_flag = 0; ex_filament.ex_need_time = filamentSpeed_mm_s; @@ -1469,7 +1469,7 @@ void DGUSScreenHandler::DGUS_ExtrudeLoadInit(void) { ex_filament.ex_tick_start = 0; } -void DGUSScreenHandler::DGUS_RunoutInit(void) { +void DGUSScreenHandler::DGUS_RunoutInit() { #if PIN_EXISTS(MT_DET_1) SET_INPUT_PULLUP(MT_DET_1_PIN); #endif @@ -1479,7 +1479,7 @@ void DGUSScreenHandler::DGUS_RunoutInit(void) { runout_mks.runout_status = UNRUNOUT_STATUS; } -void DGUSScreenHandler::DGUS_Runout_Idle(void) { +void DGUSScreenHandler::DGUS_Runout_Idle() { #if ENABLED(DGUS_MKS_RUNOUT_SENSOR) // scanf runout pin switch (runout_mks.runout_status) { diff --git a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h index ee423b7bb9..ce557e738f 100644 --- a/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h +++ b/Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h @@ -94,10 +94,10 @@ public: static void DGUS_LanguageDisplay(uint8_t var); static void TMC_ChangeConfig(DGUS_VP_Variable &var, void *val_ptr); static void GetTurnOffCtrl(DGUS_VP_Variable &var, void *val_ptr); - static void LanguagePInit(void); - static void DGUS_Runout_Idle(void); - static void DGUS_RunoutInit(void); - static void DGUS_ExtrudeLoadInit(void); + static void LanguagePInit(); + static void DGUS_Runout_Idle(); + static void DGUS_RunoutInit(); + static void DGUS_ExtrudeLoadInit(); static void LCD_BLK_Adjust(DGUS_VP_Variable &var, void *val_ptr); static void SD_FileBack(DGUS_VP_Variable &var, void *val_ptr); diff --git a/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp index 1d97902c71..c03f655fba 100644 --- a/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp +++ b/Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp @@ -313,7 +313,7 @@ void DGUSDisplay::ProcessRx() { gcode.reset_stepper_timeout(); if (!vp.size) { - DEBUG_ECHOLN(); + DEBUG_EOL(); vp.rx_handler(vp, nullptr); rx_datagram_state = DGUS_IDLE; @@ -325,18 +325,15 @@ void DGUSDisplay::ProcessRx() { memset(buffer, 0, vp.size); for (uint8_t i = 0; i < dlen; i++) { - if (i >= vp.size) { - break; - } + if (i >= vp.size) break; - if (i + 1 < dlen && tmp[i + 3] == 0xFF && tmp[i + 4] == 0xFF) { + if (i + 1 < dlen && tmp[i + 3] == 0xFF && tmp[i + 4] == 0xFF) break; - } buffer[i] = tmp[i + 3]; } - DEBUG_ECHOLN(); + DEBUG_EOL(); vp.rx_handler(vp, buffer); rx_datagram_state = DGUS_IDLE; @@ -349,7 +346,7 @@ void DGUSDisplay::ProcessRx() { break; } - DEBUG_ECHOLN(); + DEBUG_EOL(); vp.rx_handler(vp, &tmp[3]); rx_datagram_state = DGUS_IDLE; diff --git a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.h b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.h index cf32bad396..a7281fed4a 100644 --- a/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.h +++ b/Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.h @@ -39,17 +39,17 @@ class WifiSerial { void begin(uint32_t baud); void begin(uint32_t baud, uint8_t config); void end(); - int available(void); - int read(void); + int available(); + int read(); int write(uint8_t); // Interrupt handlers static int _tx_complete_irq(serial_t *obj); static void _rx_complete_irq(serial_t *obj); - void flush(void); - bool isHalfDuplex(void) const; - void enableHalfDuplexRx(void); + void flush(); + bool isHalfDuplex() const; + void enableHalfDuplexRx(); private: void setRx(uint32_t _rx); diff --git a/Marlin/src/libs/W25Qxx.cpp b/Marlin/src/libs/W25Qxx.cpp index b458a7c965..033402d04a 100644 --- a/Marlin/src/libs/W25Qxx.cpp +++ b/Marlin/src/libs/W25Qxx.cpp @@ -133,7 +133,7 @@ uint16_t W25QXXFlash::W25QXX_ReadID(void) { return Temp; } -void W25QXXFlash::SPI_FLASH_WriteEnable(void) { +void W25QXXFlash::SPI_FLASH_WriteEnable() { // Select the FLASH: Chip Select low SPI_FLASH_CS_L(); // Send "Write Enable" instruction @@ -151,7 +151,7 @@ void W25QXXFlash::SPI_FLASH_WriteEnable(void) { * Output : None * Return : None *******************************************************************************/ -void W25QXXFlash::SPI_FLASH_WaitForWriteEnd(void) { +void W25QXXFlash::SPI_FLASH_WaitForWriteEnd() { uint8_t FLASH_Status = 0; // Select the FLASH: Chip Select low @@ -216,7 +216,7 @@ void W25QXXFlash::SPI_FLASH_BlockErase(uint32_t BlockAddr) { * Output : None * Return : None *******************************************************************************/ -void W25QXXFlash::SPI_FLASH_BulkErase(void) { +void W25QXXFlash::SPI_FLASH_BulkErase() { // Send write enable instruction SPI_FLASH_WriteEnable(); diff --git a/Marlin/src/libs/W25Qxx.h b/Marlin/src/libs/W25Qxx.h index 1133af2e74..778463477d 100644 --- a/Marlin/src/libs/W25Qxx.h +++ b/Marlin/src/libs/W25Qxx.h @@ -61,11 +61,11 @@ public: static void spi_flash_Send(uint8_t b); static void spi_flash_SendBlock(uint8_t token, const uint8_t *buf); static uint16_t W25QXX_ReadID(void); - static void SPI_FLASH_WriteEnable(void); - static void SPI_FLASH_WaitForWriteEnd(void); + static void SPI_FLASH_WriteEnable(); + static void SPI_FLASH_WaitForWriteEnd(); static void SPI_FLASH_SectorErase(uint32_t SectorAddr); static void SPI_FLASH_BlockErase(uint32_t BlockAddr); - static void SPI_FLASH_BulkErase(void); + static void SPI_FLASH_BulkErase(); static void SPI_FLASH_PageWrite(uint8_t *pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite); static void SPI_FLASH_BufferWrite(uint8_t *pBuffer, uint32_t WriteAddr, uint16_t NumByteToWrite); static void SPI_FLASH_BufferRead(uint8_t *pBuffer, uint32_t ReadAddr, uint16_t NumByteToRead);