Browse Source

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
pull/1/head
Scott Lahteine 7 years ago
committed by GitHub
parent
commit
434a2dcbf2
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      Marlin/src/HAL/HAL_TEENSY35_36/HAL_spi_Teensy.cpp
  2. 17
      Marlin/src/gcode/parser.h
  3. 10
      Marlin/src/lcd/dogm/HAL_LCD_class_defines.h
  4. 6
      Marlin/src/pins/pins_RAMPS_RE_ARM.h

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

17
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,15 +93,15 @@ public:
#define LETTER_BIT(N) ((N) - 'A')
#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_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_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_int(const char * const p) {
return NUMERIC(p[0]) || ((p[0] == '-' || p[0] == '+') && NUMERIC(p[1])); // [-+]?[0-9]

10
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
{ }
};

6
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
/**

Loading…
Cancel
Save