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

This commit is contained in:
Bob-the-Kuhn 2018-03-20 15:53:21 -05:00 committed by Scott Lahteine
parent b5b39af531
commit 7308ef7809
5 changed files with 11 additions and 6 deletions

View File

@ -52,7 +52,7 @@
// Public functions // Public functions
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
#if ENABLED(SOFTWARE_SPI) #if ENABLED(DUE_SOFTWARE_SPI)
// -------------------------------------------------------------------------- // --------------------------------------------------------------------------
// software SPI // software SPI

View File

@ -47,7 +47,7 @@
#define MOSI_PIN 75 #define MOSI_PIN 75
#else #else
// defaults // defaults
#define SOFTWARE_SPI #define DUE_SOFTWARE_SPI
#define SCK_PIN 52 #define SCK_PIN 52
#define MISO_PIN 50 #define MISO_PIN 50
#define MOSI_PIN 51 #define MOSI_PIN 51

View File

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

View File

@ -547,6 +547,10 @@
#define ADC_KEYPAD_PIN 12 #define ADC_KEYPAD_PIN 12
#elif ENABLED(AZSMZ_12864)
// Pins only defined for RAMPS_SMART currently
#else #else
// Beeper on AUX-4 // Beeper on AUX-4

View File

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