|
@@ -989,7 +989,6 @@ void lcd_init()
|
989
|
989
|
#ifdef NEWPANEL
|
990
|
990
|
pinMode(BTN_EN1,INPUT);
|
991
|
991
|
pinMode(BTN_EN2,INPUT);
|
992
|
|
- pinMode(SDCARDDETECT,INPUT);
|
993
|
992
|
WRITE(BTN_EN1,HIGH);
|
994
|
993
|
WRITE(BTN_EN2,HIGH);
|
995
|
994
|
#if BTN_ENC > 0
|
|
@@ -1003,11 +1002,11 @@ void lcd_init()
|
1003
|
1002
|
WRITE(SHIFT_OUT,HIGH);
|
1004
|
1003
|
WRITE(SHIFT_LD,HIGH);
|
1005
|
1004
|
#endif
|
1006
|
|
-#else
|
1007
|
|
- #ifdef SR_LCD_2W_NL
|
|
1005
|
+#else // Not NEWPANEL
|
|
1006
|
+ #ifdef SR_LCD_2W_NL // Non latching 2 wire shiftregister
|
1008
|
1007
|
pinMode (SR_DATA_PIN, OUTPUT);
|
1009
|
1008
|
pinMode (SR_CLK_PIN, OUTPUT);
|
1010
|
|
- #else
|
|
1009
|
+ #elif defined(SHIFT_CLK)
|
1011
|
1010
|
pinMode(SHIFT_CLK,OUTPUT);
|
1012
|
1011
|
pinMode(SHIFT_LD,OUTPUT);
|
1013
|
1012
|
pinMode(SHIFT_EN,OUTPUT);
|
|
@@ -1015,16 +1014,21 @@ void lcd_init()
|
1015
|
1014
|
WRITE(SHIFT_OUT,HIGH);
|
1016
|
1015
|
WRITE(SHIFT_LD,HIGH);
|
1017
|
1016
|
WRITE(SHIFT_EN,LOW);
|
1018
|
|
- #endif // SR_LCD_2W_NL
|
|
1017
|
+ #else
|
|
1018
|
+ #ifdef ULTIPANEL
|
|
1019
|
+ #error ULTIPANEL requires an encoder
|
|
1020
|
+ #endif
|
|
1021
|
+ #endif // SR_LCD_2W_NL
|
1019
|
1022
|
#endif//!NEWPANEL
|
1020
|
1023
|
|
1021
|
|
-#if (SDCARDDETECT > 0)
|
|
1024
|
+#if defined (SDSUPPORT) && defined(SDCARDDETECT) && (SDCARDDETECT > 0)
|
|
1025
|
+ pinMode(SDCARDDETECT,INPUT);
|
1022
|
1026
|
WRITE(SDCARDDETECT, HIGH);
|
1023
|
1027
|
lcd_oldcardstatus = IS_SD_INSERTED;
|
1024
|
1028
|
#endif//(SDCARDDETECT > 0)
|
1025
|
|
- #ifdef LCD_HAS_SLOW_BUTTONS
|
|
1029
|
+#ifdef LCD_HAS_SLOW_BUTTONS
|
1026
|
1030
|
slow_buttons = 0;
|
1027
|
|
- #endif
|
|
1031
|
+#endif
|
1028
|
1032
|
lcd_buttons_update();
|
1029
|
1033
|
#ifdef ULTIPANEL
|
1030
|
1034
|
encoderDiff = 0;
|