Просмотр исходного кода

update components/u8g2/u8x8_d_st7565.c.
屏幕最右侧会出现一条竖线,强制X偏移1列,解决问题。不知道为什么晶联讯这款屏幕会有列错位的问题。

Signed-off-by: 章骁程 <zxc4732@126.com>

章骁程 2 лет назад
Родитель
Сommit
360786a949
1 измененных файлов с 2 добавлено и 1 удалено
  1. 2 1
      components/u8g2/u8x8_d_st7565.c

+ 2 - 1
components/u8g2/u8x8_d_st7565.c

@@ -1291,7 +1291,7 @@ static const uint8_t u8x8_d_st7565_jlx12864g109pc_init_seq[] = {
     U8X8_C(0x02e), // 升压2
     U8X8_C(0x02f), // 升压3
 
-    U8X8_C(0x023), // 粗对比度
+    U8X8_C(0x023), // 粗对比度
     U8X8_C(0x081), // 微调对比度
     U8X8_C(0x027), // 微调对比度的值,可设置范围 0x00~0x3f
     U8X8_C(0x0a2), // 偏压比(bias)
@@ -1305,6 +1305,7 @@ static const uint8_t u8x8_d_st7565_jlx12864g109pc_init_seq[] = {
 
 uint8_t u8x8_d_st7565_jlx12864g109pc(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, void *arg_ptr)
 {
+    u8x8->x_offset = 1; // 2023年8月8日 屏幕最右侧会出现一条竖线,加上这一行可以解决问题
   /* call common procedure first and handle messages there */
   if ( u8x8_d_st7565_common(u8x8, msg, arg_int, arg_ptr) == 0 )
   {