Przeglądaj źródła

SAMD51: Some LCD pin fixes (#14915)

Giuliano Zaro 5 lat temu
rodzic
commit
f085199f5b
1 zmienionych plików z 34 dodań i 32 usunięć
  1. 34
    32
      Marlin/src/pins/samd/pins_AGCM4_RURAMPS4D_13.h

+ 34
- 32
Marlin/src/pins/samd/pins_AGCM4_RURAMPS4D_13.h Wyświetl plik

@@ -170,67 +170,69 @@
170 170
 //
171 171
 #if HAS_SPI_LCD
172 172
 
173
-  #if EITHER(RADDS_DISPLAY, REPRAP_DISCOUNT_SMART_CONTROLLER)
173
+  #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
174 174
 
175
-    #error "Pin compatibility check needed!"
176
-    #define BEEPER_PIN     54
177
-    #define LCD_PINS_D4    48
178
-    #define LCD_PINS_D7    53
179
-    #define SD_DETECT_PIN  -1    // 51 can't be used, it's MOSI
180
-    #define LCD_PINS_RS    55
175
+    #define BEEPER_PIN      54
176
+    #define LCD_PINS_D4     48
177
+    #define SD_DETECT_PIN   -1    // 51 can't be used, it's MOSI
178
+    #define LCD_PINS_RS     55
181 179
     #define LCD_PINS_ENABLE 56
182 180
 
183
-  #elif ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
181
+  #elif EITHER(RADDS_DISPLAY, REPRAP_DISCOUNT_SMART_CONTROLLER)
184 182
 
185
-    #define BEEPER_PIN     54
186
-    #define LCD_PINS_D4    48
187
-    #define SD_DETECT_PIN  -1    // 51 can't be used, it's MOSI
188
-    #define LCD_PINS_RS    55
183
+    #error "Pin compatibility check needed!"
184
+    #define BEEPER_PIN      54
185
+    #define LCD_PINS_D4     48
186
+    #define LCD_PINS_D5     -1    // 50 can't be used, it's MISO
187
+    #define LCD_PINS_D6     -1    // 52 can't be used, it's SCK
188
+    #define LCD_PINS_D7     53
189
+    #define SD_DETECT_PIN   -1    // 51 can't be used, it's MOSI
190
+    #define LCD_PINS_RS     55
189 191
     #define LCD_PINS_ENABLE 56
190 192
 
191 193
   #elif HAS_SSD1306_OLED_I2C
192 194
 
193 195
     #error "Pin compatibility check needed!"
194
-    #define BEEPER_PIN     54
195
-    #define LCD_SDSS       10
196
-    #define SD_DETECT_PIN  -1    // 51 can't be used, it's MOSI
196
+    #define BEEPER_PIN      54
197
+    #define LCD_SDSS        10
198
+    #define SD_DETECT_PIN   -1    // 51 can't be used, it's MOSI
197 199
 
198 200
   #elif ENABLED(FYSETC_MINI_12864)
199 201
 
200
-    #error "Pin compatibility check needed!"
201
-    #define BEEPER_PIN     54
202
-    #define DOGLCD_CS      56
203
-    #define DOGLCD_A0      55
202
+    #define BEEPER_PIN      54
203
+    #define DOGLCD_CS       56
204
+    #define DOGLCD_A0       55
204 205
 
205
-    //#define FORCE_SOFT_SPI    // Use this if default of hardware SPI causes display problems
206
-                                // results in LCD soft SPI mode 3, SD soft SPI mode 0
206
+    //#define FORCE_SOFT_SPI       // Use this if default of hardware SPI causes display problems
207
+                                  //   results in LCD soft SPI mode 3, SD soft SPI mode 0
207 208
 
208
-    #define LCD_RESET_PIN  48   // Must be high or open for LCD to operate normally.
209
+    #define LCD_RESET_PIN   48    // Must be high or open for LCD to operate normally.
209 210
 
210 211
     #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
211
-      #error "Pin compatibility check needed! Grand central M4 pins 50, 51 and 52 are not GPIO pins, they are wired to MISO, MOSI, and SCK."
212
+      #error "Pin compatibility check needed!"
212 213
       #ifndef RGB_LED_R_PIN
213
-        #define RGB_LED_R_PIN 50   // D5
214
+        #define RGB_LED_R_PIN 50  // 50 can't be used, it's MISO
214 215
       #endif
215 216
       #ifndef RGB_LED_G_PIN
216
-        #define RGB_LED_G_PIN 52   // D6
217
+        #define RGB_LED_G_PIN 52  // 52 can't be used, it's SCK
217 218
       #endif
218 219
       #ifndef RGB_LED_B_PIN
219
-        #define RGB_LED_B_PIN 53   // D7
220
+        #define RGB_LED_B_PIN 53
220 221
       #endif
221 222
     #elif ENABLED(FYSETC_MINI_12864_2_1)
222
-      #error "Pin compatibility check needed! Grand central M4 pins 50, 51 and 52 are not GPIO pins, they are wired to MISO, MOSI, and SCK."
223
-      #define NEOPIXEL_PIN 50   // D5
223
+      #error "Pin compatibility check needed!"
224
+      #define NEOPIXEL_PIN 50     // 50 can't be used, it's MISO
224 225
     #endif
225 226
 
226 227
   #elif ENABLED(MKS_MINI_12864)
227
-    #error "Pin compatibility check needed! Grand central M4 pins 50, 51 and 52 are not GPIO pins, they are wired to MISO, MOSI, and SCK."
228
+
229
+    #error "Pin compatibility check needed!"
228 230
     #define ORIG_BEEPER_PIN 75
229 231
 
230
-    #define DOGLCD_A0      52
231
-    #define DOGLCD_CS      50
232
+    #define DOGLCD_A0      52     // 52 can't be used, it's SCK
233
+    #define DOGLCD_CS      50     // 50 can't be used, it's MISO
232 234
 
233
-    #define SD_DETECT_PIN  -1    // 51 can't be used, it's MOSI
235
+    #define SD_DETECT_PIN  -1     // 51 can't be used, it's MOSI
234 236
 
235 237
   #endif
236 238
 

Ładowanie…
Anuluj
Zapisz