소스 검색

Added support for OLED SSD1306 I2C based LCDs.

fmalpartida 10 년 전
부모
커밋
93da52d011
4개의 변경된 파일18개의 추가작업 그리고 1개의 파일을 삭제
  1. 10
    0
      Marlin/Conditionals.h
  2. 4
    0
      Marlin/Configuration.h
  3. 3
    0
      Marlin/dogm_lcd_implementation.h
  4. 1
    1
      Marlin/pins_SAV_MKI.h

+ 10
- 0
Marlin/Conditionals.h 파일 보기

42
     #define ENCODER_STEPS_PER_MENU_ITEM 1
42
     #define ENCODER_STEPS_PER_MENU_ITEM 1
43
   #endif
43
   #endif
44
 
44
 
45
+  // Generic support for SSD1306 OLED based LCDs.
46
+  #if defined(U8GLIB_SSD1306)
47
+    #define ULTRA_LCD  //general LCD support, also 16x2
48
+    #define DOGLCD  // Support for I2C LCD 128x64 (Controller SSD1306 graphic Display Family)
49
+  #endif
50
+
51
+
45
   #ifdef PANEL_ONE
52
   #ifdef PANEL_ONE
46
     #define SDSUPPORT
53
     #define SDSUPPORT
47
     #define ULTIMAKERCONTROLLER
54
     #define ULTIMAKERCONTROLLER
199
     #ifdef U8GLIB_ST7920
206
     #ifdef U8GLIB_ST7920
200
       #undef HAS_LCD_CONTRAST
207
       #undef HAS_LCD_CONTRAST
201
     #endif
208
     #endif
209
+    #ifdef U8GLIB_SSD1306
210
+      #undef HAS_LCD_CONTRAST
211
+    #endif  
202
   #endif
212
   #endif
203
 
213
 
204
 #else // CONFIGURATION_LCD
214
 #else // CONFIGURATION_LCD

+ 4
- 0
Marlin/Configuration.h 파일 보기

702
 
702
 
703
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
703
 // Panucatt VIKI LCD with status LEDs, integrated click & L/R/U/P buttons, separate encoder inputs
704
 //#define LCD_I2C_VIKI
704
 //#define LCD_I2C_VIKI
705
+  
706
+// SSD1306 OLED generic display support
707
+// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib
708
+//#define U8GLIB_SSD1306
705
 
709
 
706
 // Shift register panels
710
 // Shift register panels
707
 // ---------------------
711
 // ---------------------

+ 3
- 0
Marlin/dogm_lcd_implementation.h 파일 보기

125
 #elif defined(U8GLIB_LM6059_AF)
125
 #elif defined(U8GLIB_LM6059_AF)
126
   // Based on the Adafruit ST7565 (http://www.adafruit.com/products/250)
126
   // Based on the Adafruit ST7565 (http://www.adafruit.com/products/250)
127
   U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0);
127
   U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0);
128
+#elif defined U8GLIB_SSD1306
129
+  // Generic support for SSD1306 OLED I2C LCDs
130
+  U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE);
128
 #else
131
 #else
129
   // for regular DOGM128 display with HW-SPI
132
   // for regular DOGM128 display with HW-SPI
130
   U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0);  // HW-SPI Com: CS, A0
133
   U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0);  // HW-SPI Com: CS, A0

+ 1
- 1
Marlin/pins_SAV_MKI.h 파일 보기

79
   #define BTN_ENC            12
79
   #define BTN_ENC            12
80
 
80
 
81
   #define KILL_PIN           42 // A2 = 42 - teensy = 40
81
   #define KILL_PIN           42 // A2 = 42 - teensy = 40
82
-  #define HOME_PIN          -1 // A4 = marlin 44 - teensy = 42
82
+  #define HOME_PIN           44 // A4 = marlin 44 - teensy = 42
83
 
83
 
84
   #ifdef NUM_SERVOS
84
   #ifdef NUM_SERVOS
85
     #define SERVO0_PIN       41 // In teensy's pin definition for pinMode (in servo.cpp)
85
     #define SERVO0_PIN       41 // In teensy's pin definition for pinMode (in servo.cpp)

Loading…
취소
저장