Bläddra i källkod

[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.
Thomas Moore 7 år sedan
förälder
incheckning
84de428d30

+ 4
- 5
Marlin/src/HAL/HAL_AVR/MarlinSerial.h Visa fil

75
 #define HEX 16
75
 #define HEX 16
76
 #define OCT 8
76
 #define OCT 8
77
 #define BIN 2
77
 #define BIN 2
78
-#define BYTE 0
79
 
78
 
80
 #ifndef USBCON
79
 #ifndef USBCON
81
   // We're using a ring buffer (I think), in which rx_buffer_head is the index of the
80
   // We're using a ring buffer (I think), in which rx_buffer_head is the index of the
126
       FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
125
       FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
127
       FORCE_INLINE static void print(const char* str) { write(str); }
126
       FORCE_INLINE static void print(const char* str) { write(str); }
128
 
127
 
129
-      static void print(char, int = BYTE);
130
-      static void print(unsigned char, int = BYTE);
128
+      static void print(char, int = 0);
129
+      static void print(unsigned char, int = 0);
131
       static void print(int, int = DEC);
130
       static void print(int, int = DEC);
132
       static void print(unsigned int, int = DEC);
131
       static void print(unsigned int, int = DEC);
133
       static void print(long, int = DEC);
132
       static void print(long, int = DEC);
136
 
135
 
137
       static void println(const String& s);
136
       static void println(const String& s);
138
       static void println(const char[]);
137
       static void println(const char[]);
139
-      static void println(char, int = BYTE);
140
-      static void println(unsigned char, int = BYTE);
138
+      static void println(char, int = 0);
139
+      static void println(unsigned char, int = 0);
141
       static void println(int, int = DEC);
140
       static void println(int, int = DEC);
142
       static void println(unsigned int, int = DEC);
141
       static void println(unsigned int, int = DEC);
143
       static void println(long, int = DEC);
142
       static void println(long, int = DEC);

+ 4
- 5
Marlin/src/HAL/HAL_DUE/MarlinSerialUSB_Due.h Visa fil

38
 #define HEX 16
38
 #define HEX 16
39
 #define OCT 8
39
 #define OCT 8
40
 #define BIN 2
40
 #define BIN 2
41
-#define BYTE 0
42
 
41
 
43
 class MarlinSerialUSB {
42
 class MarlinSerialUSB {
44
 
43
 
65
   static FORCE_INLINE void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
64
   static FORCE_INLINE void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
66
   static FORCE_INLINE void print(const char* str) { write(str); }
65
   static FORCE_INLINE void print(const char* str) { write(str); }
67
 
66
 
68
-  static void print(char, int = BYTE);
69
-  static void print(unsigned char, int = BYTE);
67
+  static void print(char, int = 0);
68
+  static void print(unsigned char, int = 0);
70
   static void print(int, int = DEC);
69
   static void print(int, int = DEC);
71
   static void print(unsigned int, int = DEC);
70
   static void print(unsigned int, int = DEC);
72
   static void print(long, int = DEC);
71
   static void print(long, int = DEC);
75
 
74
 
76
   static void println(const String& s);
75
   static void println(const String& s);
77
   static void println(const char[]);
76
   static void println(const char[]);
78
-  static void println(char, int = BYTE);
79
-  static void println(unsigned char, int = BYTE);
77
+  static void println(char, int = 0);
78
+  static void println(unsigned char, int = 0);
80
   static void println(int, int = DEC);
79
   static void println(int, int = DEC);
81
   static void println(unsigned int, int = DEC);
80
   static void println(unsigned int, int = DEC);
82
   static void println(long, int = DEC);
81
   static void println(long, int = DEC);

+ 4
- 5
Marlin/src/HAL/HAL_DUE/MarlinSerial_Due.h Visa fil

39
 #define HEX 16
39
 #define HEX 16
40
 #define OCT 8
40
 #define OCT 8
41
 #define BIN 2
41
 #define BIN 2
42
-#define BYTE 0
43
 
42
 
44
 // Define constants and variables for buffering incoming serial data.  We're
43
 // Define constants and variables for buffering incoming serial data.  We're
45
 // using a ring buffer (I think), in which rx_buffer_head is the index of the
44
 // using a ring buffer (I think), in which rx_buffer_head is the index of the
106
   FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
105
   FORCE_INLINE static void print(const String& s) { for (int i = 0; i < (int)s.length(); i++) write(s[i]); }
107
   FORCE_INLINE static void print(const char* str) { write(str); }
106
   FORCE_INLINE static void print(const char* str) { write(str); }
108
 
107
 
109
-  static void print(char, int = BYTE);
110
-  static void print(unsigned char, int = BYTE);
108
+  static void print(char, int = 0);
109
+  static void print(unsigned char, int = 0);
111
   static void print(int, int = DEC);
110
   static void print(int, int = DEC);
112
   static void print(unsigned int, int = DEC);
111
   static void print(unsigned int, int = DEC);
113
   static void print(long, int = DEC);
112
   static void print(long, int = DEC);
116
 
115
 
117
   static void println(const String& s);
116
   static void println(const String& s);
118
   static void println(const char[]);
117
   static void println(const char[]);
119
-  static void println(char, int = BYTE);
120
-  static void println(unsigned char, int = BYTE);
118
+  static void println(char, int = 0);
119
+  static void println(unsigned char, int = 0);
121
   static void println(int, int = DEC);
120
   static void println(int, int = DEC);
122
   static void println(unsigned int, int = DEC);
121
   static void println(unsigned int, int = DEC);
123
   static void println(long, int = DEC);
122
   static void println(long, int = DEC);

+ 0
- 2
Marlin/src/HAL/HAL_LPC1768/HardwareSerial.h Visa fil

77
   #define HEX 16
77
   #define HEX 16
78
   #define OCT 8
78
   #define OCT 8
79
   #define BIN 2
79
   #define BIN 2
80
-  #define BYTE 0
81
-
82
 
80
 
83
   void print_bin(uint32_t value, uint8_t num_digits) {
81
   void print_bin(uint32_t value, uint8_t num_digits) {
84
     uint32_t mask = 1 << (num_digits -1);
82
     uint32_t mask = 1 << (num_digits -1);

+ 0
- 1
Marlin/src/HAL/HAL_LPC1768/serial.h Visa fil

129
   #define HEX 16
129
   #define HEX 16
130
   #define OCT 8
130
   #define OCT 8
131
   #define BIN 2
131
   #define BIN 2
132
-  #define BYTE 0
133
 
132
 
134
   void print_bin(uint32_t value, uint8_t num_digits) {
133
   void print_bin(uint32_t value, uint8_t num_digits) {
135
     uint32_t mask = 1 << (num_digits -1);
134
     uint32_t mask = 1 << (num_digits -1);

+ 1
- 1
Marlin/src/module/configuration_store.h Visa fil

116
       );
116
       );
117
       static bool size_error(const uint16_t size
117
       static bool size_error(const uint16_t size
118
         #if ADD_PORT_ARG
118
         #if ADD_PORT_ARG
119
-          const int8_t port=-1
119
+          , const int8_t port=-1
120
         #endif
120
         #endif
121
       );
121
       );
122
     #endif
122
     #endif

Laddar…
Avbryt
Spara