Merge pull request #9393 from Bob-the-Kuhn/revert-parser-to-array-2.0.x
[2.0.x] Fix compile error when FASTER_GCODE_PARSER is disabled
This commit is contained in:
commit
434a2dcbf2
@ -91,12 +91,12 @@ void spiSendBlock(uint8_t token, const uint8_t* buf) {
|
|||||||
SPI.beginTransaction(spiConfig);
|
SPI.beginTransaction(spiConfig);
|
||||||
SPDR = token;
|
SPDR = token;
|
||||||
for (uint16_t i = 0; i < 512; i += 2) {
|
for (uint16_t i = 0; i < 512; i += 2) {
|
||||||
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
while (!TEST(SPSR, SPIF)) { /* nada */ };
|
||||||
SPDR = buf[i];
|
SPDR = buf[i];
|
||||||
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
while (!TEST(SPSR, SPIF)) { /* nada */ };
|
||||||
SPDR = buf[i + 1];
|
SPDR = buf[i + 1];
|
||||||
}
|
}
|
||||||
while (!TEST(SPSR, SPIF)) { /* Intentionally left empty */ }
|
while (!TEST(SPSR, SPIF)) { /* nada */ };
|
||||||
SPI.endTransaction();
|
SPI.endTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -32,6 +32,9 @@
|
|||||||
#include "../inc/MarlinConfig.h"
|
#include "../inc/MarlinConfig.h"
|
||||||
|
|
||||||
//#define DEBUG_GCODE_PARSER
|
//#define DEBUG_GCODE_PARSER
|
||||||
|
#if ENABLED(DEBUG_GCODE_PARSER)
|
||||||
|
#include "../libs/hex_print_routines.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GCode parser
|
* GCode parser
|
||||||
@ -90,16 +93,16 @@ public:
|
|||||||
|
|
||||||
#define LETTER_BIT(N) ((N) - 'A')
|
#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)
|
#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) {
|
FORCE_INLINE static bool valid_int(const char * const p) {
|
||||||
return NUMERIC(p[0]) || ((p[0] == '-' || p[0] == '+') && NUMERIC(p[1])); // [-+]?[0-9]
|
return NUMERIC(p[0]) || ((p[0] == '-' || p[0] == '+') && NUMERIC(p[1])); // [-+]?[0-9]
|
||||||
}
|
}
|
||||||
|
@ -28,10 +28,10 @@ extern u8g_dev_t u8g_dev_st7565_64128n_HAL_2x_hw_spi;
|
|||||||
class U8GLIB_64128N_2X_HAL : public U8GLIB
|
class U8GLIB_64128N_2X_HAL : public U8GLIB
|
||||||
{
|
{
|
||||||
public:
|
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(&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)
|
: 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
|
class U8GLIB_ST7920_128X64_4X_HAL : public U8GLIB
|
||||||
{
|
{
|
||||||
public:
|
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(&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
|
: 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
|
class U8GLIB_ST7920_128X64_RRD : public U8GLIB
|
||||||
{
|
{
|
||||||
public:
|
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
|
: U8GLIB(&u8g_dev_st7920_128x64_rrd_sw_spi, sck, mosi, cs, U8G_PIN_NONE, reset) // a0 = U8G_PIN_NONE
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
@ -214,8 +214,10 @@
|
|||||||
//
|
//
|
||||||
// Průša i3 MK2 Multiplexer Support
|
// Průša i3 MK2 Multiplexer Support
|
||||||
//
|
//
|
||||||
#define E_MUX0_PIN P0_03 // ( 0) Z_CS_PIN
|
#if SERIAL_PORT != 0 && SERIAL_PORT_2 != 0
|
||||||
#define E_MUX1_PIN P0_02 // ( 1) E0_CS_PIN
|
#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
|
#define E_MUX2_PIN P0_26 // (63) E1_CS_PIN
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user