Browse Source

[2.0.x] Fix compile errors (#9141)

* Update persistent_store_impl.cpp
* Remove define BYTE from serial functions since Arduino docs typically show 0 for the normal case.
pull/1/head
Thomas Moore 7 years ago
committed by Scott Lahteine
parent
commit
84de428d30
  1. 9
      Marlin/src/HAL/HAL_AVR/MarlinSerial.h
  2. 9
      Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.h
  3. 9
      Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.h
  4. 2
      Marlin/src/HAL/HAL_LPC1768/HardwareSerial.h
  5. 1
      Marlin/src/HAL/HAL_LPC1768/serial.h
  6. 2
      Marlin/src/module/configuration_store.h

9
Marlin/src/HAL/HAL_AVR/MarlinSerial.h

@ -75,7 +75,6 @@
#define HEX 16 #define HEX 16
#define OCT 8 #define OCT 8
#define BIN 2 #define BIN 2
#define BYTE 0
#ifndef USBCON #ifndef USBCON
// We're using a ring buffer (I think), in which rx_buffer_head is the index of the // We're using a ring buffer (I think), in which rx_buffer_head is the index of the
@ -126,8 +125,8 @@
FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); } FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
FORCE_INLINE static void print(const char* str) { write(str); } FORCE_INLINE static void print(const char* str) { write(str); }
static void print(char, int = BYTE); static void print(char, int = 0);
static void print(unsigned char, int = BYTE); static void print(unsigned char, int = 0);
static void print(int, int = DEC); static void print(int, int = DEC);
static void print(unsigned int, int = DEC); static void print(unsigned int, int = DEC);
static void print(long, int = DEC); static void print(long, int = DEC);
@ -136,8 +135,8 @@
static void println(const String& s); static void println(const String& s);
static void println(const char[]); static void println(const char[]);
static void println(char, int = BYTE); static void println(char, int = 0);
static void println(unsigned char, int = BYTE); static void println(unsigned char, int = 0);
static void println(int, int = DEC); static void println(int, int = DEC);
static void println(unsigned int, int = DEC); static void println(unsigned int, int = DEC);
static void println(long, int = DEC); static void println(long, int = DEC);

9
Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.h

@ -38,7 +38,6 @@
#define HEX 16 #define HEX 16
#define OCT 8 #define OCT 8
#define BIN 2 #define BIN 2
#define BYTE 0
class MarlinSerialUSB { class MarlinSerialUSB {
@ -65,8 +64,8 @@ public:
static FORCE_INLINE void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); } static FORCE_INLINE void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
static FORCE_INLINE void print(const char* str) { write(str); } static FORCE_INLINE void print(const char* str) { write(str); }
static void print(char, int = BYTE); static void print(char, int = 0);
static void print(unsigned char, int = BYTE); static void print(unsigned char, int = 0);
static void print(int, int = DEC); static void print(int, int = DEC);
static void print(unsigned int, int = DEC); static void print(unsigned int, int = DEC);
static void print(long, int = DEC); static void print(long, int = DEC);
@ -75,8 +74,8 @@ public:
static void println(const String& s); static void println(const String& s);
static void println(const char[]); static void println(const char[]);
static void println(char, int = BYTE); static void println(char, int = 0);
static void println(unsigned char, int = BYTE); static void println(unsigned char, int = 0);
static void println(int, int = DEC); static void println(int, int = DEC);
static void println(unsigned int, int = DEC); static void println(unsigned int, int = DEC);
static void println(long, int = DEC); static void println(long, int = DEC);

9
Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.h

@ -39,7 +39,6 @@
#define HEX 16 #define HEX 16
#define OCT 8 #define OCT 8
#define BIN 2 #define BIN 2
#define BYTE 0
// Define constants and variables for buffering incoming serial data. We're // Define constants and variables for buffering incoming serial data. We're
// using a ring buffer (I think), in which rx_buffer_head is the index of the // using a ring buffer (I think), in which rx_buffer_head is the index of the
@ -106,8 +105,8 @@ public:
FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); } FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
FORCE_INLINE static void print(const char* str) { write(str); } FORCE_INLINE static void print(const char* str) { write(str); }
static void print(char, int = BYTE); static void print(char, int = 0);
static void print(unsigned char, int = BYTE); static void print(unsigned char, int = 0);
static void print(int, int = DEC); static void print(int, int = DEC);
static void print(unsigned int, int = DEC); static void print(unsigned int, int = DEC);
static void print(long, int = DEC); static void print(long, int = DEC);
@ -116,8 +115,8 @@ public:
static void println(const String& s); static void println(const String& s);
static void println(const char[]); static void println(const char[]);
static void println(char, int = BYTE); static void println(char, int = 0);
static void println(unsigned char, int = BYTE); static void println(unsigned char, int = 0);
static void println(int, int = DEC); static void println(int, int = DEC);
static void println(unsigned int, int = DEC); static void println(unsigned int, int = DEC);
static void println(long, int = DEC); static void println(long, int = DEC);

2
Marlin/src/HAL/HAL_LPC1768/HardwareSerial.h

@ -77,8 +77,6 @@ public:
#define HEX 16 #define HEX 16
#define OCT 8 #define OCT 8
#define BIN 2 #define BIN 2
#define BYTE 0
void print_bin(uint32_t value, uint8_t num_digits) { void print_bin(uint32_t value, uint8_t num_digits) {
uint32_t mask = 1 << (num_digits -1); uint32_t mask = 1 << (num_digits -1);

1
Marlin/src/HAL/HAL_LPC1768/serial.h

@ -129,7 +129,6 @@ public:
#define HEX 16 #define HEX 16
#define OCT 8 #define OCT 8
#define BIN 2 #define BIN 2
#define BYTE 0
void print_bin(uint32_t value, uint8_t num_digits) { void print_bin(uint32_t value, uint8_t num_digits) {
uint32_t mask = 1 << (num_digits -1); uint32_t mask = 1 << (num_digits -1);

2
Marlin/src/module/configuration_store.h

@ -116,7 +116,7 @@ class MarlinSettings {
); );
static bool size_error(const uint16_t size static bool size_error(const uint16_t size
#if ADD_PORT_ARG #if ADD_PORT_ARG
const int8_t port=-1 , const int8_t port=-1
#endif #endif
); );
#endif #endif

Loading…
Cancel
Save