Browse Source

Add conditional, give DUE SPI a unique name, fix compiler warnings (#10168)

Bob-the-Kuhn 7 years ago
parent
commit
7308ef7809

+ 1
- 1
Marlin/src/HAL/HAL_DUE/HAL_spi_Due.cpp View File

52
 // Public functions
52
 // Public functions
53
 // --------------------------------------------------------------------------
53
 // --------------------------------------------------------------------------
54
 
54
 
55
-#if ENABLED(SOFTWARE_SPI)
55
+#if ENABLED(DUE_SOFTWARE_SPI)
56
 
56
 
57
   // --------------------------------------------------------------------------
57
   // --------------------------------------------------------------------------
58
   // software SPI
58
   // software SPI

+ 1
- 1
Marlin/src/HAL/HAL_DUE/spi_pins.h View File

47
   #define MOSI_PIN          75
47
   #define MOSI_PIN          75
48
 #else
48
 #else
49
   // defaults
49
   // defaults
50
-  #define SOFTWARE_SPI
50
+  #define DUE_SOFTWARE_SPI
51
   #define SCK_PIN           52
51
   #define SCK_PIN           52
52
   #define MISO_PIN          50
52
   #define MISO_PIN          50
53
   #define MOSI_PIN          51
53
   #define MOSI_PIN          51

+ 3
- 2
Marlin/src/lcd/ultralcd_impl_DOGM.h View File

186
     U8GLIB_LM6059_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes
186
     U8GLIB_LM6059_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes
187
 
187
 
188
 #elif ENABLED(U8GLIB_ST7565_64128N)
188
 #elif ENABLED(U8GLIB_ST7565_64128N)
189
-  // The MaKrPanel, Mini Viki, and Viki 2.0, ST7565 controller
190
-  #if DOGLCD_SCK == SCK_PIN && DOGLCD_MOSI == MOSI_PIN
189
+  // The MaKrPanel, Mini Viki, Viki 2.0 & AZSMZ 12864 ST7565 controller
190
+  #define SMART_RAMPS (MB(RAMPS_SMART_EFB) || MB(RAMPS_SMART_EEB) || MB(RAMPS_SMART_EFF) || MB(RAMPS_SMART_EEF) || MB(RAMPS_SMART_SF))
191
+  #if DOGLCD_SCK == SCK_PIN && DOGLCD_MOSI == MOSI_PIN && !SMART_RAMPS
191
     U8GLIB_64128N_2X_HAL u8g(DOGLCD_CS, DOGLCD_A0);  // using HW-SPI
192
     U8GLIB_64128N_2X_HAL u8g(DOGLCD_CS, DOGLCD_A0);  // using HW-SPI
192
   #else
193
   #else
193
     U8GLIB_64128N_2X_HAL u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0);  // using SW-SPI
194
     U8GLIB_64128N_2X_HAL u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0);  // using SW-SPI

+ 4
- 0
Marlin/src/pins/pins_RAMPS.h View File

547
 
547
 
548
       #define ADC_KEYPAD_PIN    12
548
       #define ADC_KEYPAD_PIN    12
549
 
549
 
550
+    #elif ENABLED(AZSMZ_12864)
551
+
552
+      // Pins only defined for RAMPS_SMART currently
553
+
550
     #else
554
     #else
551
 
555
 
552
       // Beeper on AUX-4
556
       // Beeper on AUX-4

+ 2
- 2
Marlin/src/pins/pins_RAMPS_SMART.h View File

90
 //
90
 //
91
 // Support for AZSMZ 12864 LCD with SD Card 3D printer smart controller control panel
91
 // Support for AZSMZ 12864 LCD with SD Card 3D printer smart controller control panel
92
 #if ENABLED(AZSMZ_12864)
92
 #if ENABLED(AZSMZ_12864)
93
-  #define BEEPER_PIN       66
93
+  #define BEEPER_PIN       66 // Smart RAMPS 1.42 pinout diagram on RepRap WIKI erroneously says this should be pin 65
94
   #define DOGLCD_A0        59
94
   #define DOGLCD_A0        59
95
   #define DOGLCD_CS        44
95
   #define DOGLCD_CS        44
96
   #define BTN_EN1          58
96
   #define BTN_EN1          58
97
   #define BTN_EN2          40
97
   #define BTN_EN2          40
98
-  #define BTN_ENC          67
98
+  #define BTN_ENC          67 // Smart RAMPS 1.42 pinout diagram on RepRap WIKI erroneously says this should be pin 66
99
   #define SD_DETECT_PIN    49 // Pin 49 for display sd interface, 72 for easy adapter board
99
   #define SD_DETECT_PIN    49 // Pin 49 for display sd interface, 72 for easy adapter board
100
   #define KILL_PIN         42
100
   #define KILL_PIN         42
101
 #endif
101
 #endif

Loading…
Cancel
Save