Browse Source

💡 Misc. cleanup, comments

FB4S_WIFI
Scott Lahteine 2 years ago
committed by Scott Lahteine
parent
commit
2ee4a667e1
  1. 2
      Marlin/src/gcode/feature/pause/G61.cpp
  2. 4
      Marlin/src/lcd/TFTGLCD/lcdprint_TFTGLCD.cpp
  3. 2
      Marlin/src/lcd/TFTGLCD/marlinui_TFTGLCD.cpp
  4. 2
      Marlin/src/lcd/dogm/status_screen_DOGM.cpp
  5. 2
      Marlin/src/lcd/extui/anycubic_i3mega/anycubic_i3mega_lcd.cpp
  6. 6
      Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.cpp
  7. 8
      Marlin/src/lcd/extui/dgus/mks/DGUSScreenHandler.h
  8. 13
      Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp
  9. 10
      Marlin/src/lcd/extui/mks_ui/wifiSerial_STM32.h
  10. 6
      Marlin/src/libs/W25Qxx.cpp
  11. 6
      Marlin/src/libs/W25Qxx.h

2
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');

4
Marlin/src/lcd/TFTGLCD/lcdprint_TFTGLCD.cpp

@ -45,7 +45,7 @@
#include <string.h>
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;

2
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;

2
Marlin/src/lcd/dogm/status_screen_DOGM.cpp

@ -61,7 +61,7 @@
#include "../../feature/cooler.h"
#endif
#if ENABLED(I2C_AMMETER)
#if DO_DRAW_AMMETER
#include "../../feature/ammeter.h"
#endif

2
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++))

6
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) {

8
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);

13
Marlin/src/lcd/extui/dgus_reloaded/DGUSDisplay.cpp

@ -318,7 +318,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;
@ -330,18 +330,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;
@ -354,7 +351,7 @@ void DGUSDisplay::ProcessRx() {
break;
}
DEBUG_ECHOLN();
DEBUG_EOL();
vp.rx_handler(vp, &tmp[3]);
rx_datagram_state = DGUS_IDLE;

10
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);

6
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();

6
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);

Loading…
Cancel
Save