Sfoglia il codice sorgente

fixed error, updated defaults, added notes

Travis fix - only allow ultralcd_st7920_u8glib_rrd_AVR.cpp to compile when ST7920 selected
Bob-the-Kuhn 7 anni fa
parent
commit
fc40d56131

+ 1
- 1
Marlin/src/lcd/dogm/HAL_LCD_class_defines.h Vedi File

51
 };
51
 };
52
 
52
 
53
 
53
 
54
-
54
+// AVR version uses ultralcd_st7920_u8glib_rrd_AVR.cpp, HAL version uses u8g_dev_st7920_128x64_HAL.cpp
55
 extern u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi;
55
 extern u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi;
56
 class U8GLIB_ST7920_128X64_RRD : public U8GLIB
56
 class U8GLIB_ST7920_128X64_RRD : public U8GLIB
57
 {
57
 {

+ 2
- 16
Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp Vedi File

25
 
25
 
26
 #include "../../inc/MarlinConfig.h"
26
 #include "../../inc/MarlinConfig.h"
27
 
27
 
28
-#if ENABLED(DOGLCD)
28
+#if ENABLED(U8GLIB_ST7920)
29
 
29
 
30
 #ifndef U8G_HAL_LINKS
30
 #ifndef U8G_HAL_LINKS
31
 
31
 
32
-//#include "../../Marlin.h"
33
-
34
-//#if ENABLED(U8GLIB_ST7920)
35
-//#if ( ENABLED(SHARED_SPI) || !ENABLED(SHARED_SPI) && (defined(LCD_PINS_D4) &&  LCD_PINS_D4 >= 0) &&  (defined(LCD_PINS_ENABLE) &&  LCD_PINS_ENABLE >= 0))
36
-
37
-#define ST7920_CLK_PIN  23
38
-#define ST7920_DAT_PIN  17
39
-#define ST7920_CS_PIN   16
40
-
41
-/*
42
 #define ST7920_CLK_PIN  LCD_PINS_D4
32
 #define ST7920_CLK_PIN  LCD_PINS_D4
43
 #define ST7920_DAT_PIN  LCD_PINS_ENABLE
33
 #define ST7920_DAT_PIN  LCD_PINS_ENABLE
44
 #define ST7920_CS_PIN   LCD_PINS_RS
34
 #define ST7920_CS_PIN   LCD_PINS_RS
45
-*/
46
 
35
 
47
 //#define PAGE_HEIGHT 8   //128 byte framebuffer
36
 //#define PAGE_HEIGHT 8   //128 byte framebuffer
48
 #define PAGE_HEIGHT 16  //256 byte framebuffer
37
 #define PAGE_HEIGHT 16  //256 byte framebuffer
192
 
181
 
193
 #pragma GCC reset_options
182
 #pragma GCC reset_options
194
 
183
 
195
-//#endif //( ENABLED(SHARED_SPI) || !ENABLED(SHARED_SPI) && (defined(LCD_PINS_D4) &&  LCD_PINS_D4 >= 0) &&  (defined(LCD_PINS_ENABLE) &&  LCD_PINS_ENABLE >= 0))
196
-//#endif // U8GLIB_ST7920
197
-
198
 #endif // U8G_HAL_LINKS
184
 #endif // U8G_HAL_LINKS
199
 
185
 
200
-#endif // DOGLCD
186
+#endif // U8GLIB_ST7920

+ 7
- 9
Marlin/src/lcd/ultralcd_impl_DOGM.h Vedi File

164
 
164
 
165
 // LCD selection
165
 // LCD selection
166
 #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
166
 #if ENABLED(REPRAPWORLD_GRAPHICAL_LCD)
167
-  #ifdef CPU_32_BIT // SPI too fast with 32bit?
167
+  #ifdef CPU_32_BIT 
168
     U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Original u8glib device. 2 stripes, SW SPI
168
     U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Original u8glib device. 2 stripes, SW SPI
169
   #else
169
   #else
170
-    U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_RS); // 2 stripes, HW SPI
170
+    U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_RS); // 2 stripes, HW SPI (shared with SD card)
171
   #endif
171
   #endif
172
 #elif ENABLED(U8GLIB_ST7920)
172
 #elif ENABLED(U8GLIB_ST7920)
173
   // RepRap Discount Full Graphics Smart Controller
173
   // RepRap Discount Full Graphics Smart Controller
174
-    //U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_RS); // 2 stripes, HW SPI
174
+    //U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_RS); // 2 stripes, HW SPI (shared with SD card, on AVR does not use standard LCD adapter)
175
     //U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Original u8glib device. 2 stripes, SW SPI
175
     //U8GLIB_ST7920_128X64_4X u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Original u8glib device. 2 stripes, SW SPI
176
     U8GLIB_ST7920_128X64_RRD u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Number of stripes can be adjusted in ultralcd_st7920_u8glib_rrd.h with PAGE_HEIGHT
176
     U8GLIB_ST7920_128X64_RRD u8g(LCD_PINS_D4, LCD_PINS_ENABLE, LCD_PINS_RS); // Number of stripes can be adjusted in ultralcd_st7920_u8glib_rrd.h with PAGE_HEIGHT
177
                                                                            // AVR version ignores these pin settings
177
                                                                            // AVR version ignores these pin settings
192
 
192
 
193
 #elif ENABLED(U8GLIB_SSD1306)
193
 #elif ENABLED(U8GLIB_SSD1306)
194
   // Generic support for SSD1306 OLED I2C LCDs
194
   // Generic support for SSD1306 OLED I2C LCDs
195
-    //U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST);  // 8 stripes
195
+    //U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE  u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
196
-    U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE  u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
196
+    U8GLIB_SSD1306_128X64_2X u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
197
-    //U8GLIB_SSD1306_128X64_2X u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
198
 
197
 
199
 #elif ENABLED(MKS_12864OLED)
198
 #elif ENABLED(MKS_12864OLED)
200
   // MKS 128x64 (SH1106) OLED I2C LCD
199
   // MKS 128x64 (SH1106) OLED I2C LCD
202
     //U8GLIB_SH1106_128X64_2X u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // 4 stripes
201
     //U8GLIB_SH1106_128X64_2X u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // 4 stripes
203
 #elif ENABLED(U8GLIB_SH1106)
202
 #elif ENABLED(U8GLIB_SH1106)
204
   // Generic support for SH1106 OLED I2C LCDs
203
   // Generic support for SH1106 OLED I2C LCDs
205
-    //U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST);  // 8 stripes
204
+    //U8GLIB_SH1106_128X64_2X_I2C_2_WIRE  u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
206
-    U8GLIB_SH1106_128X64_2X_I2C_2_WIRE  u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
205
+    U8GLIB_SH1106_128X64_2X u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
207
-    //U8GLIB_SH1106_128X64_2X u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes
208
 #elif ENABLED(MINIPANEL)
206
 #elif ENABLED(MINIPANEL)
209
   // The MINIPanel display
207
   // The MINIPanel display
210
     //U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0);  // 8 stripes
208
     //U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0);  // 8 stripes

Loading…
Annulla
Salva