Selaa lähdekoodia

[2.0.x] Miscellaneous fixes (#12039)

* Allow override of soft SPI pins in `pins_*.h`
* Add default case to avoid compiler warning.
* Additional pin definitions for Archim 2.
* Einsy Retro has same timings as Einsy Rambo.
Marcio Teixeira 5 vuotta sitten
vanhempi
commit
ec9aa4f468

+ 9
- 3
Marlin/src/HAL/HAL_DUE/spi_pins.h Näytä tiedosto

@@ -48,9 +48,15 @@
48 48
 #else
49 49
   // defaults
50 50
   #define DUE_SOFTWARE_SPI
51
-  #define SCK_PIN           52
52
-  #define MISO_PIN          50
53
-  #define MOSI_PIN          51
51
+  #ifndef SCK_PIN
52
+    #define SCK_PIN           52
53
+  #endif
54
+  #ifndef MISO_PIN
55
+    #define MISO_PIN          50
56
+  #endif
57
+  #ifndef MOSI_PIN
58
+    #define MOSI_PIN          51
59
+  #endif
54 60
 #endif
55 61
 
56 62
 /* A.28, A.29, B.21, C.26, C.29 */

+ 1
- 0
Marlin/src/lcd/dogm/status_screen_lite_ST7920.h Näytä tiedosto

@@ -94,6 +94,7 @@ void ST7920_Lite_Status_Screen::write_number(const int16_t value, const uint8_t
94 94
     case 3: fmt = PSTR("%3d"); break;
95 95
     case 2: fmt = PSTR("%2d"); break;
96 96
     case 1: fmt = PSTR("%1d"); break;
97
+    default: return;
97 98
   }
98 99
   sprintf_P(str, fmt, value);
99 100
   write_str(str);

+ 1
- 1
Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp Näytä tiedosto

@@ -60,7 +60,7 @@
60 60
   #define CPU_ST7920_DELAY_1 DELAY_NS(0)
61 61
   #define CPU_ST7920_DELAY_2 DELAY_NS(188)
62 62
   #define CPU_ST7920_DELAY_3 DELAY_NS(0)
63
-#elif MB(MINIRAMBO) || MB(EINSY_RAMBO)
63
+#elif MB(MINIRAMBO) || MB(EINSY_RAMBO) || MB(EINSY_RETRO)
64 64
   #define CPU_ST7920_DELAY_1 DELAY_NS(0)
65 65
   #define CPU_ST7920_DELAY_2 DELAY_NS(250)
66 66
   #define CPU_ST7920_DELAY_3 DELAY_NS(0)

+ 29
- 3
Marlin/src/pins/pins_ARCHIM2.h Näytä tiedosto

@@ -51,6 +51,12 @@
51 51
 #define E1_DIAG_PIN        25   // PD0 E2_DIAG
52 52
 
53 53
 //
54
+// Servos
55
+//
56
+#define SERVO0_PIN          20   // D20 PB12 (Header J20 20)
57
+#define SERVO1_PIN          21   // D21 PB13 (Header J20 19)
58
+
59
+//
54 60
 // Limit Switches
55 61
 //
56 62
 // Only use Diag Pins when SENSORLESS_HOMING is enabled for the TMC2130 drivers.
@@ -161,7 +167,27 @@
161 167
 //
162 168
 // Misc. Functions
163 169
 //
164
-#define SDSS               87   // D87 PA29 CS
170
+
171
+// Internal MicroSD card reader on the PCB
172
+#define INT_SCK_PIN         42   // D42 PA19/MCCK
173
+#define INT_MISO_PIN        43   // D43 PA20/MCCDA
174
+#define INT_MOSI_PIN        73   // D73 PA21/MCDA0
175
+#define INT_SDSS            55   // D55 PA24/MCDA3
176
+
177
+// The external SD card reader on SC2, as well as 2 Mbyte SPI Flash
178
+#define SCK_PIN             76   // D76 PA27
179
+#define MISO_PIN            74   // D74 PA25
180
+#define MOSI_PIN            75   // D75 PA26
181
+#define SDSS                87   // D87 PA29
182
+#define SPI_FLASH_SS        52   // D52 PB21
183
+
184
+// Filament runout sensor pins (or GPIO)
185
+#ifndef FIL_RUNOUT_PIN
186
+  #define FIL_RUNOUT_PIN    66   // D66 PB15 (Header J20 15)
187
+#endif
188
+#ifndef FIL_RUNOUT2_PIN
189
+  #define FIL_RUNOUT2_PIN   67   // D67 PB16 (Header J20 16)
190
+#endif
165 191
 
166 192
 //
167 193
 // LCD / Controller
@@ -182,5 +208,5 @@
182 208
     #define BTN_EN1        60   // D60 PA3_TIOB1
183 209
     #define BTN_EN2        13   // D13 PB27_TIOB0
184 210
     #define BTN_ENC        16   // D16 PA13_TXD1 // the click
185
-  #endif  // NEWPANEL
186
-#endif // ULTRA_LCD
211
+  #endif // NEWPANEL
212
+#endif // ULTRA_LCD || EXTENSIBLE_UI

Loading…
Peruuta
Tallenna