Fix bad opcode in LIGHTWEIGHT_UI; add 32-bit HAL and Due compatibility (#13751)
This commit is contained in:
committed by
Scott Lahteine
parent
7c8ee0cd5b
commit
08f21335a6
@ -158,9 +158,7 @@ void ST7920_Lite_Status_Screen::entry_mode_select(const bool ac_increase, const
|
||||
// function for scroll_or_addr_select()
|
||||
void ST7920_Lite_Status_Screen::_scroll_or_addr_select(const bool sa) {
|
||||
extended_function_set(true);
|
||||
cmd(0b00100010 |
|
||||
(sa ? 0b000001 : 0)
|
||||
);
|
||||
cmd(0b00000010 | (sa ? 0b00000001 : 0));
|
||||
current_bits.sa = sa;
|
||||
}
|
||||
|
||||
@ -907,34 +905,6 @@ void ST7920_Lite_Status_Screen::clear_text_buffer() {
|
||||
ncs();
|
||||
}
|
||||
|
||||
#if ENABLED(U8GLIB_ST7920) && !defined(U8G_HAL_LINKS) && !defined(__SAM3X8E__)
|
||||
|
||||
#include "ultralcd_st7920_u8glib_rrd_AVR.h"
|
||||
|
||||
void ST7920_Lite_Status_Screen::cs() {
|
||||
ST7920_CS();
|
||||
current_bits.synced = false;
|
||||
}
|
||||
|
||||
void ST7920_Lite_Status_Screen::ncs() {
|
||||
ST7920_NCS();
|
||||
current_bits.synced = false;
|
||||
}
|
||||
|
||||
void ST7920_Lite_Status_Screen::sync_cmd() {
|
||||
ST7920_SET_CMD();
|
||||
}
|
||||
|
||||
void ST7920_Lite_Status_Screen::sync_dat() {
|
||||
ST7920_SET_DAT();
|
||||
}
|
||||
|
||||
void ST7920_Lite_Status_Screen::write_byte(const uint8_t data) {
|
||||
ST7920_WRITE_BYTE(data);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void MarlinUI::draw_status_screen() {
|
||||
ST7920_Lite_Status_Screen::update(false);
|
||||
}
|
||||
|
@ -15,6 +15,8 @@
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include "../../HAL/shared/HAL_ST7920.h"
|
||||
|
||||
#include "../../core/macros.h"
|
||||
#include "../../libs/duration_t.h"
|
||||
|
||||
@ -28,11 +30,11 @@ class ST7920_Lite_Status_Screen {
|
||||
uint8_t sa : 1;
|
||||
} current_bits;
|
||||
|
||||
static void cs();
|
||||
static void ncs();
|
||||
static void sync_cmd();
|
||||
static void sync_dat();
|
||||
static void write_byte(const uint8_t w);
|
||||
static void cs() { ST7920_cs(); current_bits.synced = false; }
|
||||
static void ncs() { ST7920_cs(); current_bits.synced = false; }
|
||||
static void sync_cmd() { ST7920_set_cmd(); }
|
||||
static void sync_dat() { ST7920_set_dat(); }
|
||||
static void write_byte(const uint8_t w) { ST7920_write_byte(w); }
|
||||
|
||||
FORCE_INLINE static void write_word(const uint16_t w) {
|
||||
write_byte((w >> 8) & 0xFF);
|
||||
|
@ -134,4 +134,13 @@ u8g_dev_t u8g_dev_st7920_128x64_rrd_sw_spi = {u8g_dev_rrd_st7920_128x64_fn, &u8g
|
||||
|
||||
#pragma GCC reset_options
|
||||
|
||||
#if ENABLED(LIGHTWEIGHT_UI)
|
||||
#include "../../HAL/shared/HAL_ST7920.h"
|
||||
void ST7920_cs() { ST7920_CS(); }
|
||||
void ST7920_ncs() { ST7920_NCS(); }
|
||||
void ST7920_set_cmd() { ST7920_SET_CMD(); }
|
||||
void ST7920_set_dat() { ST7920_SET_DAT(); }
|
||||
void ST7920_write_byte(const uint8_t val) { ST7920_WRITE_BYTE(val); }
|
||||
#endif
|
||||
|
||||
#endif // U8GLIB_ST7920 && !U8G_HAL_LINKS && !__SAM3X8E__
|
||||
|
Reference in New Issue
Block a user