@ -119,10 +119,12 @@ uint8_t u8g_dev_rrd_st7920_128x64_fn(u8g_t *u8g, u8g_dev_t *dev, uint8_t msg, vo
ST7920_CS ( ) ;
ST7920_CS ( ) ;
u8g_Delay ( 120 ) ; //initial delay for boot up
u8g_Delay ( 120 ) ; //initial delay for boot up
ST7920_SET_CMD ( ) ;
ST7920_SET_CMD ( ) ;
ST7920_WRITE_NIBBLES ( 0x20 ) ; //non-extended mode
ST7920_WRITE_NIBBLES ( 0x08 ) ; //display off, cursor+blink off
ST7920_WRITE_NIBBLES ( 0x08 ) ; //display off, cursor+blink off
ST7920_WRITE_NIBBLES ( 0x01 ) ; //clear CGRAM ram
ST7920_WRITE_NIBBLES ( 0x01 ) ; //clear DDRAM ram
u8g_Delay ( 15 ) ; //delay for CGRAM clear
u8g_Delay ( 15 ) ; //delay for DDRAM clear
ST7920_WRITE_NIBBLES ( 0x3E ) ; //extended mode + GDRAM active
ST7920_WRITE_NIBBLES ( 0x24 ) ; //extended mode
ST7920_WRITE_NIBBLES ( 0x26 ) ; //extended mode + GDRAM active
for ( y = 0 ; y < ( LCD_PIXEL_HEIGHT ) / 2 ; y + + ) { //clear GDRAM
for ( y = 0 ; y < ( LCD_PIXEL_HEIGHT ) / 2 ; y + + ) { //clear GDRAM
ST7920_WRITE_NIBBLES ( 0x80 | y ) ; //set y
ST7920_WRITE_NIBBLES ( 0x80 | y ) ; //set y
ST7920_WRITE_NIBBLES ( 0x80 ) ; //set x = 0
ST7920_WRITE_NIBBLES ( 0x80 ) ; //set x = 0
@ -178,6 +180,14 @@ uint8_t u8g_dev_st7920_128x64_rrd_buf[(LCD_PIXEL_WIDTH) * (PAGE_HEIGHT) / 8] U
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_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_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 } ;
# if ENABLED(USE_ST7920_LIGHTWEIGHT_UI)
typedef const __FlashStringHelper * progmem_str ;
// We have to include the code for the lightweight UI here
// as it relies on macros that are only defined in this file.
# include "ultralcd_impl_st7920_lite_status_screen_impl_spi.h"
# endif
# pragma GCC reset_options
# pragma GCC reset_options
# endif // U8G_HAL_LINKS
# endif // U8G_HAL_LINKS