[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
This commit is contained in:
Dave Johnson 2017-11-12 23:07:59 -08:00 committed by Scott Lahteine
parent e8e92f8969
commit c009a990e4
3 changed files with 78 additions and 96 deletions

View File

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

View File

@ -129,23 +129,6 @@
// LCD / Controller // LCD / Controller
// //
#if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL) #if ENABLED(ULTRA_LCD) && ENABLED(NEWPANEL)
// we have no buzzer installed
#define BEEPER_PIN -1
// LCD Pins
#if ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 3 // D3 RX1 JP2-7
#define BTN_EN2 2 // D2 TX1 JP2-5
#define BTN_ENC 41 // F3 JP2-4
#define SDSS 38 // F0 B-THERM connector - use SD card on Panelolu2
#else
#define BTN_EN1 10 // C0 JP11-12
#define BTN_EN2 11 // C1 JP11-13
#define BTN_ENC 12 // C2 JP11-14
#endif
// not connected
#define SD_DETECT_PIN -1
#define LCD_PINS_RS 9 // E1 JP11-11 #define LCD_PINS_RS 9 // E1 JP11-11
#define LCD_PINS_ENABLE 8 // E0 JP11-10 #define LCD_PINS_ENABLE 8 // E0 JP11-10
@ -154,24 +137,35 @@
#define LCD_PINS_D6 5 // D5 JP11-6 #define LCD_PINS_D6 5 // D5 JP11-6
#define LCD_PINS_D7 4 // D4 JP11-5 #define LCD_PINS_D7 4 // D4 JP11-5
#endif // ULTRA_LCD && NEWPANEL #if ENABLED(VIKI2) || ENABLED(miniVIKI)
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
#define BEEPER_PIN 8 // E0 JP11-10 #define BEEPER_PIN 8 // E0 JP11-10
// Pins for DOGM SPI LCD Support
#define DOGLCD_A0 40 // F2 JP2-2 #define DOGLCD_A0 40 // F2 JP2-2
#define DOGLCD_CS 41 // F3 JP2-4 #define DOGLCD_CS 41 // F3 JP2-4
#define LCD_SCREEN_ROT_180 #define LCD_SCREEN_ROT_180
// The encoder and click button
#define BTN_EN1 2 // D2 TX1 JP2-5 #define BTN_EN1 2 // D2 TX1 JP2-5
#define BTN_EN2 3 // D3 RX1 JP2-7 #define BTN_EN2 3 // D3 RX1 JP2-7
#define BTN_ENC 45 // F7 TDI JP2-12 #define BTN_ENC 45 // F7 TDI JP2-12
#define SDSS 43 // F5 TMS JP2-8 #define SDSS 43 // F5 TMS JP2-8
#define SD_DETECT_PIN -1
#define STAT_LED_RED_PIN 12 // C2 JP11-14 #define STAT_LED_RED_PIN 12 // C2 JP11-14
#define STAT_LED_BLUE_PIN 10 // C0 JP11-12 #define STAT_LED_BLUE_PIN 10 // C0 JP11-12
#endif #elif ENABLED(LCD_I2C_PANELOLU2)
#define BTN_EN1 3 // D3 RX1 JP2-7
#define BTN_EN2 2 // D2 TX1 JP2-5
#define BTN_ENC 41 // F3 JP2-4
#define SDSS 38 // F0 B-THERM connector - use SD card on Panelolu2
#else
#define BTN_EN1 10 // C0 JP11-12
#define BTN_EN2 11 // C1 JP11-13
#define BTN_ENC 12 // C2 JP11-14
#endif
#endif // ULTRA_LCD && NEWPANEL

View File

@ -135,8 +135,6 @@
//#define USE_INTERNAL_SD //#define USE_INTERNAL_SD
#if ENABLED(ULTRA_LCD) #if ENABLED(ULTRA_LCD)
#define BEEPER_PIN -1
#define LCD_PINS_RS 9 // E1 JP11-11 #define LCD_PINS_RS 9 // E1 JP11-11
#define LCD_PINS_ENABLE 8 // E0 JP11-10 #define LCD_PINS_ENABLE 8 // E0 JP11-10
#define LCD_PINS_D4 7 // D7 JP11-8 #define LCD_PINS_D4 7 // D7 JP11-8
@ -144,14 +142,8 @@
#define LCD_PINS_D6 5 // D5 JP11-6 #define LCD_PINS_D6 5 // D5 JP11-6
#define LCD_PINS_D7 4 // D4 JP11-5 #define LCD_PINS_D7 4 // D4 JP11-5
#define BTN_EN1 10 // C0 JP11-12 #if ENABLED(VIKI2) || ENABLED(miniVIKI)
#define BTN_EN2 11 // C1 JP11-13
#define BTN_ENC 12 // C2 JP11-14
#define SD_DETECT_PIN -1
#endif
#if ENABLED(VIKI2) || ENABLED(miniVIKI)
#define BEEPER_PIN 8 // E0 JP11-10 #define BEEPER_PIN 8 // E0 JP11-10
#define DOGLCD_A0 40 // F2 JP2-2 #define DOGLCD_A0 40 // F2 JP2-2
#define DOGLCD_CS 41 // F3 JP2-4 #define DOGLCD_CS 41 // F3 JP2-4
@ -161,19 +153,14 @@
#define BTN_EN2 3 // D3 RX1 JP2-7 #define BTN_EN2 3 // D3 RX1 JP2-7
#define BTN_ENC 45 // F7 TDI JP2-12 #define BTN_ENC 45 // F7 TDI JP2-12
#define SDSS 43 // F5 TMS JP2-8 #define SDSS 3 // F5 TMS JP2-8
#define SD_DETECT_PIN -1
#define STAT_LED_RED_PIN 12 // C2 JP11-14 #define STAT_LED_RED_PIN 12 // C2 JP11-14
#define STAT_LED_BLUE_PIN 10 // C0 JP11-12 #define STAT_LED_BLUE_PIN 10 // C0 JP11-12
#endif
#if ENABLED(MINIPANEL) #elif ENABLED(MINIPANEL)
#if ENABLED(USE_INTERNAL_SD)
// PIN FASTIO PIN# ATUSB90 PIN# Teensy2.0++ PIN# #if DISABLED(USE_INTERNAL_SD)
#define SDSS 20 // 10 B0
#define SD_DETECT_PIN -1 // no auto-detect SD insertion on built-in Printrboard SD reader
#else
// PIN FASTIO PIN# ATUSB90 PIN# Teensy2.0++ PIN# Printrboard RevF Conn. MKSLCD12864 PIN# // PIN FASTIO PIN# ATUSB90 PIN# Teensy2.0++ PIN# Printrboard RevF Conn. MKSLCD12864 PIN#
#define SDSS 11 // 36 C1 EXP2-13 EXP2-07 #define SDSS 11 // 36 C1 EXP2-13 EXP2-07
#define SD_DETECT_PIN 9 // 34 E1 EXP2-11 EXP2-04 #define SD_DETECT_PIN 9 // 34 E1 EXP2-11 EXP2-04
@ -192,28 +179,28 @@
//#define MOSI 22 // 12 B2 ICSP-03 EXP2-05 //#define MOSI 22 // 12 B2 ICSP-03 EXP2-05
//#define MISO 23 // 13 B3 ICSP-06 EXP2-05 //#define MISO 23 // 13 B3 ICSP-06 EXP2-05
// encoder connections present // increase delays
#define BLEN_A 0
#define BLEN_B 1
#define BLEN_C 2
// encoder rotation values
#define encrot0 0
#define encrot1 2
#define encrot2 3
#define encrot3 1
// increase delays to max
#define ST7920_DELAY_1 DELAY_5_NOP #define ST7920_DELAY_1 DELAY_5_NOP
#define ST7920_DELAY_2 DELAY_5_NOP #define ST7920_DELAY_2 DELAY_5_NOP
#define ST7920_DELAY_3 DELAY_5_NOP #define ST7920_DELAY_3 DELAY_5_NOP
#else
#define BTN_EN1 10 // C0 JP11-12
#define BTN_EN2 11 // C1 JP11-13
#define BTN_ENC 12 // C2 JP11-14
#endif
#endif #endif
// //
// Misc. Functions // Misc. Functions
// //
// PIN FASTIO PIN# ATUSB90 PIN# Teensy2.0++ PIN# Printrboard RevF Conn.
#ifndef SDSS #ifndef SDSS
#define SDSS 20 // B0 SS #define SDSS 20 // 10 B0
#endif
#ifndef FILWIDTH_PIN
#define FILWIDTH_PIN 2 // Analog Input
#endif #endif
#define FILWIDTH_PIN 2 // Analog Input