diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp index e50e42556e..3ec7c3148f 100644 --- a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp +++ b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp @@ -91,12 +91,12 @@ void spiSendBlock(uint8_t token, const uint8_t* buf) { SPI.beginTransaction(spiConfig); SPDR = token; for (uint16_t i = 0; i < 512; i += 2) { - while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } + while (!TEST(SPSR, SPIF)) { /* nada */ }; SPDR = buf[i]; - while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } + while (!TEST(SPSR, SPIF)) { /* nada */ }; SPDR = buf[i + 1]; } - while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ } + while (!TEST(SPSR, SPIF)) { /* nada */ }; SPI.endTransaction(); } diff --git a/Marlin/src/gcode/parser.h b/Marlin/src/gcode/parser.h index d4bd897fba..378435c0f2 100644 --- a/Marlin/src/gcode/parser.h +++ b/Marlin/src/gcode/parser.h @@ -32,6 +32,9 @@ #include "../inc/MarlinConfig.h" //#define DEBUG_GCODE_PARSER +#if ENABLED(DEBUG_GCODE_PARSER) + #include "../libs/hex_print_routines.h" +#endif /** * GCode parser @@ -90,16 +93,16 @@ public: #define LETTER_BIT(N) ((N) - 'A') + FORCE_INLINE static bool valid_signless(const char * const p) { + return NUMERIC(p[0]) || (p[0] == '.' && NUMERIC(p[1])); // .?[0-9] + } + + FORCE_INLINE static bool valid_float(const char * const p) { + return valid_signless(p) || ((p[0] == '-' || p[0] == '+') && valid_signless(&p[1])); // [-+]?.?[0-9] + } + #if ENABLED(FASTER_GCODE_PARSER) - FORCE_INLINE static bool valid_signless(const char * const p) { - return NUMERIC(p[0]) || (p[0] == '.' && NUMERIC(p[1])); // .?[0-9] - } - - FORCE_INLINE static bool valid_float(const char * const p) { - return valid_signless(p) || ((p[0] == '-' || p[0] == '+') && valid_signless(&p[1])); // [-+]?.?[0-9] - } - FORCE_INLINE static bool valid_int(const char * const p) { return NUMERIC(p[0]) || ((p[0] == '-' || p[0] == '+') && NUMERIC(p[1])); // [-+]?[0-9] } diff --git a/Marlin/src/lcd/dogm/HAL_LCD_class_defines.h b/Marlin/src/lcd/dogm/HAL_LCD_class_defines.h index 33666d33ff..d6e7396d7e 100644 --- a/Marlin/src/lcd/dogm/HAL_LCD_class_defines.h +++ b/Marlin/src/lcd/dogm/HAL_LCD_class_defines.h @@ -28,10 +28,10 @@ extern u8g_dev_t u8g_dev_st7565_64128n_HAL_2x_hw_spi; class U8GLIB_64128N_2X_HAL : public U8GLIB { public: - U8GLIB_64128N_2X_HAL(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) + U8GLIB_64128N_2X_HAL(pin_t sck, pin_t mosi, pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) : U8GLIB(&u8g_dev_st7565_64128n_HAL_2x_sw_spi, sck, mosi, cs, a0, reset) { } - U8GLIB_64128N_2X_HAL(uint8_t cs, uint8_t a0, uint8_t reset = U8G_PIN_NONE) + U8GLIB_64128N_2X_HAL(pin_t cs, pin_t a0, pin_t reset = U8G_PIN_NONE) : U8GLIB(&u8g_dev_st7565_64128n_HAL_2x_hw_spi, cs, a0, reset) { } }; @@ -42,10 +42,10 @@ extern u8g_dev_t u8g_dev_st7920_128x64_HAL_4x_hw_spi; class U8GLIB_ST7920_128X64_4X_HAL : public U8GLIB { public: - U8GLIB_ST7920_128X64_4X_HAL(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t reset = U8G_PIN_NONE) + U8GLIB_ST7920_128X64_4X_HAL(pin_t sck, pin_t mosi, pin_t cs, pin_t reset = U8G_PIN_NONE) : U8GLIB(&u8g_dev_st7920_128x64_HAL_4x_sw_spi, sck, mosi, cs, U8G_PIN_NONE, reset) // a0 = U8G_PIN_NONE { } - U8GLIB_ST7920_128X64_4X_HAL(uint8_t cs, uint8_t reset = U8G_PIN_NONE) + U8GLIB_ST7920_128X64_4X_HAL(pin_t cs, pin_t reset = U8G_PIN_NONE) : U8GLIB(&u8g_dev_st7920_128x64_HAL_4x_hw_spi, cs, U8G_PIN_NONE, reset) // a0 = U8G_PIN_NONE { } }; @@ -56,7 +56,7 @@ extern u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi; class U8GLIB_ST7920_128X64_RRD : public U8GLIB { public: - U8GLIB_ST7920_128X64_RRD(uint8_t sck, uint8_t mosi, uint8_t cs, uint8_t reset = U8G_PIN_NONE) + U8GLIB_ST7920_128X64_RRD(pin_t sck, pin_t mosi, pin_t cs, pin_t reset = U8G_PIN_NONE) : U8GLIB(&u8g_dev_st7920_128x64_rrd_sw_spi, sck, mosi, cs, U8G_PIN_NONE, reset) // a0 = U8G_PIN_NONE { } }; diff --git a/Marlin/src/pins/pins_RAMPS_RE_ARM.h b/Marlin/src/pins/pins_RAMPS_RE_ARM.h index 66e06e241f..cf62ea763e 100644 --- a/Marlin/src/pins/pins_RAMPS_RE_ARM.h +++ b/Marlin/src/pins/pins_RAMPS_RE_ARM.h @@ -214,8 +214,10 @@ // // Průša i3 MK2 Multiplexer Support // -#define E_MUX0_PIN P0_03 // ( 0) Z_CS_PIN -#define E_MUX1_PIN P0_02 // ( 1) E0_CS_PIN +#if SERIAL_PORT != 0 && SERIAL_PORT_2 != 0 + #define E_MUX0_PIN P0_03 // ( 0) Z_CS_PIN + #define E_MUX1_PIN P0_02 // ( 1) E0_CS_PIN +#endif #define E_MUX2_PIN P0_26 // (63) E1_CS_PIN /**