SAMD51 LCD support (#15113)

This commit is contained in:
Giuliano Zaro
2019-09-02 12:45:02 +02:00
committed by Scott Lahteine
parent 23bb40d0ea
commit 12c595c61f
5 changed files with 56 additions and 45 deletions

View File

@@ -23,9 +23,11 @@
// NOTE - the HAL version of the rrd device uses a generic ST7920 device. See the
// file u8g_dev_st7920_128x64_HAL.cpp for the HAL version.
#if defined(__AVR__) && !defined(U8G_HAL_LINKS)
#include "../../inc/MarlinConfig.h"
#if ENABLED(U8GLIB_ST7920) && !defined(U8G_HAL_LINKS) && !defined(__SAM3X8E__)
#if ENABLED(U8GLIB_ST7920)
#include "ultralcd_st7920_u8glib_rrd_AVR.h"
@@ -135,8 +137,8 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo
}
uint8_t u8g_dev_st7920_128x64_rrd_buf[(LCD_PIXEL_WIDTH) * (PAGE_HEIGHT) / 8] U8G_NOCOMMON;
u8g_pb_t u8g_dev_st7920_128x64_rrd_pb = {{PAGE_HEIGHT, LCD_PIXEL_HEIGHT, 0, 0, 0}, LCD_PIXEL_WIDTH, u8g_dev_st7920_128x64_rrd_buf};
u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn, &u8g_dev_st7920_128x64_rrd_pb, &u8g_com_null_fn};
u8g_pb_t u8g_dev_st7920_128x64_rrd_pb = { { PAGE_HEIGHT, LCD_PIXEL_HEIGHT, 0, 0, 0 }, LCD_PIXEL_WIDTH, u8g_dev_st7920_128x64_rrd_buf };
u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = { u8g_dev_rrd_st7920_128x64_fn, &u8g_dev_st7920_128x64_rrd_pb, &u8g_com_null_fn };
#pragma GCC reset_options
@@ -149,4 +151,5 @@ u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn, &u8g
void ST7920_write_byte(const uint8_t val) { ST7920_WRITE_BYTE(val); }
#endif
#endif // U8GLIB_ST7920 && !U8G_HAL_LINKS && !__SAM3X8E__
#endif // U8GLIB_ST7920
#endif // __AVR__ && !U8G_HAL_LINKS