Browse Source

Fix RRD/CR10 LCD on STM32F1/F4 (#15172)

Tanguy Pruvot 6 years ago
parent
commit
50e1bf57b9

+ 1
- 1
Marlin/src/lcd/dogm/u8g_dev_st7920_128x64_HAL.cpp View File

@@ -201,7 +201,7 @@ u8g_dev_t u8g_dev_st7920_128x64_HAL_4x_sw_spi = { u8g_dev_st7920_128x64_HAL_4x_f
201 201
 U8G_PB_DEV(u8g_dev_st7920_128x64_HAL_hw_spi, LCD_PIXEL_WIDTH, LCD_PIXEL_HEIGHT, PAGE_HEIGHT, u8g_dev_st7920_128x64_HAL_fn, U8G_COM_ST7920_HAL_HW_SPI);
202 202
 u8g_dev_t u8g_dev_st7920_128x64_HAL_4x_hw_spi = { u8g_dev_st7920_128x64_HAL_4x_fn, &u8g_dev_st7920_128x64_HAL_4x_pb, U8G_COM_ST7920_HAL_HW_SPI };
203 203
 
204
-#if !defined(__AVR__) || defined(U8G_HAL_LINKS)
204
+#if NONE(__AVR__, ARDUINO_ARCH_STM32) || defined(U8G_HAL_LINKS)
205 205
   // Also use this device for HAL version of rrd class. This results in the same device being used
206 206
   // for the ST7920 for HAL systems no matter what is selected in ultralcd_impl_DOGM.h.
207 207
   u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = { u8g_dev_st7920_128x64_HAL_4x_fn, &u8g_dev_st7920_128x64_HAL_4x_pb, U8G_COM_ST7920_HAL_SW_SPI };

+ 3
- 1
Marlin/src/lcd/dogm/ultralcd_st7920_u8glib_rrd_AVR.cpp View File

@@ -23,7 +23,9 @@
23 23
 // NOTE - the HAL version of the rrd device uses a generic ST7920 device.  See the
24 24
 // file u8g_dev_st7920_128x64_HAL.cpp for the HAL version.
25 25
 
26
-#if defined(__AVR__) && !defined(U8G_HAL_LINKS)
26
+#include "../../inc/MarlinConfigPre.h"
27
+
28
+#if !defined(U8G_HAL_LINKS) && ANY(__AVR__, ARDUINO_ARCH_STM32)
27 29
 
28 30
 #include "../../inc/MarlinConfig.h"
29 31
 

Loading…
Cancel
Save