Browse Source

[2.0.x] Fix some 8-bit Teensyduino compile warnings (#8385)

* Fix some 8-bit Teensyduino compile warnings

-Override Teensyduino legacy NOT_A_PIN 127 define
-some fixups for Printrboard_RevF pins

* Proper cleanup of Printrboard Rev.F pins

* Apply LCD fixes to Printrboard v1
Dave Johnson 7 years ago
parent
commit
c009a990e4

+ 1
- 0
Marlin/src/inc/Conditionals_post.h View File

@@ -1150,6 +1150,7 @@
1150 1150
   #undef min
1151 1151
   #define min(a,b) ((a)<(b)?(a):(b))
1152 1152
 
1153
+  #undef NOT_A_PIN    // Override Teensyduino legacy CapSense define work-around
1153 1154
   #define NOT_A_PIN 0 // For PINS_DEBUGGING
1154 1155
 #endif
1155 1156
 

+ 27
- 33
Marlin/src/pins/pins_PRINTRBOARD.h View File

@@ -129,23 +129,6 @@
129 129
 // LCD / Controller
130 130
 //
131 131
 #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
132
-  // we have no buzzer installed
133
-  #define BEEPER_PIN       -1
134
-
135
-  // LCD Pins
136
-  #if ENABLED(LCD_I2C_PANELOLU2)
137
-    #define BTN_EN1         3   // D3 RX1   JP2-7
138
-    #define BTN_EN2         2   // D2 TX1   JP2-5
139
-    #define BTN_ENC        41   // F3       JP2-4
140
-    #define SDSS           38   // F0       B-THERM connector - use SD card on Panelolu2
141
-  #else
142
-    #define BTN_EN1        10   // C0       JP11-12
143
-    #define BTN_EN2        11   // C1       JP11-13
144
-    #define BTN_ENC        12   // C2       JP11-14
145
-  #endif
146
-
147
-  // not connected
148
-  #define SD_DETECT_PIN    -1
149 132
 
150 133
   #define LCD_PINS_RS       9   // E1       JP11-11
151 134
   #define LCD_PINS_ENABLE   8   // E0       JP11-10
@@ -154,24 +137,35 @@
154 137
   #define LCD_PINS_D6       5   // D5       JP11-6
155 138
   #define LCD_PINS_D7       4   // D4       JP11-5
156 139
 
157
-#endif // ULTRA_LCD && NEWPANEL
140
+  #if ENABLED(VIKI2) || ENABLED(miniVIKI)
141
+    #define BEEPER_PIN      8   // E0       JP11-10
158 142
 
159
-#if ENABLED(VIKI2) || ENABLED(miniVIKI)
160
-  #define BEEPER_PIN        8   // E0       JP11-10
161
-  // Pins for DOGM SPI LCD Support
162
-  #define DOGLCD_A0        40   // F2       JP2-2
163
-  #define DOGLCD_CS        41   // F3       JP2-4
164
-  #define LCD_SCREEN_ROT_180
143
+    #define DOGLCD_A0      40   // F2       JP2-2
144
+    #define DOGLCD_CS      41   // F3       JP2-4
145
+    #define LCD_SCREEN_ROT_180
165 146
 
166
-  // The encoder and click button
167
-  #define BTN_EN1           2   // D2 TX1   JP2-5
168
-  #define BTN_EN2           3   // D3 RX1   JP2-7
169
-  #define BTN_ENC          45   // F7 TDI   JP2-12
147
+    #define BTN_EN1         2   // D2 TX1   JP2-5
148
+    #define BTN_EN2         3   // D3 RX1   JP2-7
149
+    #define BTN_ENC        45   // F7 TDI   JP2-12
170 150
 
171
-  #define SDSS             43   // F5 TMS   JP2-8
172
-  #define SD_DETECT_PIN    -1
151
+    #define SDSS           43   // F5 TMS   JP2-8
173 152
 
174
-  #define STAT_LED_RED_PIN  12  // C2       JP11-14
175
-  #define STAT_LED_BLUE_PIN 10  // C0       JP11-12
153
+    #define STAT_LED_RED_PIN  12  // C2       JP11-14
154
+    #define STAT_LED_BLUE_PIN 10  // C0       JP11-12
176 155
 
177
-#endif
156
+  #elif ENABLED(LCD_I2C_PANELOLU2)
157
+
158
+    #define BTN_EN1         3   // D3 RX1   JP2-7
159
+    #define BTN_EN2         2   // D2 TX1   JP2-5
160
+    #define BTN_ENC        41   // F3       JP2-4
161
+    #define SDSS           38   // F0       B-THERM connector - use SD card on Panelolu2
162
+
163
+  #else
164
+
165
+    #define BTN_EN1        10   // C0       JP11-12
166
+    #define BTN_EN2        11   // C1       JP11-13
167
+    #define BTN_ENC        12   // C2       JP11-14
168
+
169
+  #endif
170
+
171
+#endif // ULTRA_LCD && NEWPANEL

+ 46
- 59
Marlin/src/pins/pins_PRINTRBOARD_REVF.h View File

@@ -135,8 +135,6 @@
135 135
 //#define USE_INTERNAL_SD
136 136
 
137 137
 #if ENABLED(ULTRA_LCD)
138
-  #define BEEPER_PIN       -1
139
-
140 138
   #define LCD_PINS_RS       9   // E1       JP11-11
141 139
   #define LCD_PINS_ENABLE   8   // E0       JP11-10
142 140
   #define LCD_PINS_D4       7   // D7       JP11-8
@@ -144,76 +142,65 @@
144 142
   #define LCD_PINS_D6       5   // D5       JP11-6
145 143
   #define LCD_PINS_D7       4   // D4       JP11-5
146 144
 
147
-  #define BTN_EN1          10   // C0       JP11-12
148
-  #define BTN_EN2          11   // C1       JP11-13
149
-  #define BTN_ENC          12   // C2       JP11-14
145
+  #if ENABLED(VIKI2) || ENABLED(miniVIKI)
150 146
 
151
-  #define SD_DETECT_PIN    -1
152
-#endif
147
+    #define BEEPER_PIN      8   // E0       JP11-10
148
+    #define DOGLCD_A0      40   // F2       JP2-2
149
+    #define DOGLCD_CS      41   // F3       JP2-4
150
+    #define LCD_SCREEN_ROT_180
153 151
 
154
-#if ENABLED(VIKI2) || ENABLED(miniVIKI)
155
-  #define BEEPER_PIN        8   // E0       JP11-10
156
-  #define DOGLCD_A0        40   // F2       JP2-2
157
-  #define DOGLCD_CS        41   // F3       JP2-4
158
-  #define LCD_SCREEN_ROT_180
152
+    #define BTN_EN1         2   // D2 TX1   JP2-5
153
+    #define BTN_EN2         3   // D3 RX1   JP2-7
154
+    #define BTN_ENC        45   // F7 TDI   JP2-12
159 155
 
160
-  #define BTN_EN1           2   // D2 TX1   JP2-5
161
-  #define BTN_EN2           3   // D3 RX1   JP2-7
162
-  #define BTN_ENC          45   // F7 TDI   JP2-12
156
+    #define SDSS            3   // F5 TMS   JP2-8
163 157
 
164
-  #define SDSS             43   // F5 TMS   JP2-8
165
-  #define SD_DETECT_PIN    -1
158
+    #define STAT_LED_RED_PIN  12  // C2       JP11-14
159
+    #define STAT_LED_BLUE_PIN 10  // C0       JP11-12
166 160
 
167
-  #define STAT_LED_RED_PIN  12  // C2       JP11-14
168
-  #define STAT_LED_BLUE_PIN 10  // C0       JP11-12
169
-#endif
161
+  #elif ENABLED(MINIPANEL)
162
+
163
+    #if DISABLED(USE_INTERNAL_SD)
164
+      //      PIN       FASTIO PIN#  ATUSB90 PIN# Teensy2.0++ PIN#  Printrboard RevF Conn.   MKSLCD12864 PIN#
165
+      #define SDSS               11  //        36               C1                EXP2-13             EXP2-07
166
+      #define SD_DETECT_PIN       9  //        34               E1                EXP2-11             EXP2-04
167
+    #endif
170 168
 
171
-#if ENABLED(MINIPANEL)
172
-  #if ENABLED(USE_INTERNAL_SD)
173
-    //      PIN       FASTIO PIN#  ATUSB90 PIN# Teensy2.0++ PIN#
174
-    #define SDSS               20  //        10               B0
175
-    #define SD_DETECT_PIN      -1  // no auto-detect SD insertion on built-in Printrboard SD reader
176
-  #else
177 169
     //      PIN       FASTIO PIN#  ATUSB90 PIN# Teensy2.0++ PIN#  Printrboard RevF Conn.   MKSLCD12864 PIN#
178
-    #define SDSS               11  //        36               C1                EXP2-13             EXP2-07
179
-    #define SD_DETECT_PIN       9  //        34               E1                EXP2-11             EXP2-04
170
+    #define DOGLCD_A0       4  //        29               D4                EXP2-05             EXP1-04
171
+    #define DOGLCD_CS       5  //        30               D5                EXP2-06             EXP1-05
172
+    #define BTN_ENC         6  //        31               D6                EXP2-07             EXP1-09
173
+    #define BEEPER_PIN      7  //        32               D7                EXP2-08             EXP1-10
174
+    #define KILL_PIN        8  //        33               E0                EXP2-10             EXP2-03
175
+    #define BTN_EN1        10  //        35               C0                EXP2-12             EXP2-06
176
+    #define BTN_EN2        12  //        37               C2                EXP2-14             EXP2-08
177
+    //#define LCD_BACKLIGHT_PIN 43  //        56               F5                EXP1-12     Not Implemented
178
+    //#define SCK          21  //        11               B1                ICSP-04             EXP2-09
179
+    //#define MOSI         22  //        12               B2                ICSP-03             EXP2-05
180
+    //#define MISO         23  //        13               B3                ICSP-06             EXP2-05
181
+
182
+    // increase delays
183
+    #define ST7920_DELAY_1 DELAY_5_NOP
184
+    #define ST7920_DELAY_2 DELAY_5_NOP
185
+    #define ST7920_DELAY_3 DELAY_5_NOP
186
+
187
+  #else
188
+
189
+    #define BTN_EN1        10   // C0       JP11-12
190
+    #define BTN_EN2        11   // C1       JP11-13
191
+    #define BTN_ENC        12   // C2       JP11-14
192
+
180 193
   #endif
181 194
 
182
-    //      PIN       FASTIO PIN#  ATUSB90 PIN# Teensy2.0++ PIN#  Printrboard RevF Conn.   MKSLCD12864 PIN#
183
-    #define DOGLCD_A0           4  //        29               D4                EXP2-05             EXP1-04
184
-    #define DOGLCD_CS           5  //        30               D5                EXP2-06             EXP1-05
185
-    #define BTN_ENC             6  //        31               D6                EXP2-07             EXP1-09
186
-    #define BEEPER_PIN          7  //        32               D7                EXP2-08             EXP1-10
187
-    #define KILL_PIN            8  //        33               E0                EXP2-10             EXP2-03
188
-    #define BTN_EN1            10  //        35               C0                EXP2-12             EXP2-06
189
-    #define BTN_EN2            12  //        37               C2                EXP2-14             EXP2-08
190
-  //#define LCD_BACKLIGHT_PIN  43  //        56               F5                EXP1-12     Not Implemented
191
-  //#define SCK                21  //        11               B1                ICSP-04             EXP2-09
192
-  //#define MOSI               22  //        12               B2                ICSP-03             EXP2-05
193
-  //#define MISO               23  //        13               B3                ICSP-06             EXP2-05
194
-
195
-  // encoder connections present
196
-  #define BLEN_A 0
197
-  #define BLEN_B 1
198
-  #define BLEN_C 2
199
-
200
-  // encoder rotation values
201
-  #define encrot0 0
202
-  #define encrot1 2
203
-  #define encrot2 3
204
-  #define encrot3 1
205
-
206
-  // increase delays to max
207
-  #define ST7920_DELAY_1 DELAY_5_NOP
208
-  #define ST7920_DELAY_2 DELAY_5_NOP
209
-  #define ST7920_DELAY_3 DELAY_5_NOP
210 195
 #endif
211 196
 
212 197
 //
213 198
 // Misc. Functions
214 199
 //
200
+//      PIN       FASTIO PIN#  ATUSB90 PIN# Teensy2.0++ PIN#  Printrboard RevF Conn.
215 201
 #ifndef SDSS
216
-  #define SDSS               20   // B0 SS
202
+  #define SDSS             20  //        10               B0
203
+#endif
204
+#ifndef FILWIDTH_PIN
205
+  #define FILWIDTH_PIN      2  // Analog Input 
217 206
 #endif
218
-
219
-#define FILWIDTH_PIN        2   // Analog Input

Loading…
Cancel
Save