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

add: u8g2, sh1107添加128x128分辨率的配置

??? 6 месяцев назад
Родитель
Сommit
de75cb059c
2 измененных файлов с 3 добавлено и 2 удалено
  1. 1 0
      components/u8g2/luat_lib_u8g2.c
  2. 2 2
      components/u8g2/u8x8_d_sh1107.c

+ 1 - 0
components/u8g2/luat_lib_u8g2.c

@@ -64,6 +64,7 @@ static const luat_u8g2_dev_reg_t devregs[] = {
     {.name="sh1106",  .w=128, .h=64, .spi_i2c=0, .devcb=u8g2_Setup_sh1106_i2c_128x64_noname_f},        // sh1106 128x64,I2C
     {.name="sh1106",  .w=128, .h=64, .spi_i2c=0, .devcb=u8g2_Setup_sh1106_i2c_128x64_noname_f},        // sh1106 128x64,I2C
     {.name="sh1106",  .w=128, .h=64, .spi_i2c=1, .devcb=u8g2_Setup_sh1106_128x64_noname_f},        // sh1106 128x64,SPI
     {.name="sh1106",  .w=128, .h=64, .spi_i2c=1, .devcb=u8g2_Setup_sh1106_128x64_noname_f},        // sh1106 128x64,SPI
     {.name="sh1107",  .w=64, .h=128, .spi_i2c=0, .devcb=u8g2_Setup_ssd1306_i2c_128x64_noname_f},       // sh1107 64x128
     {.name="sh1107",  .w=64, .h=128, .spi_i2c=0, .devcb=u8g2_Setup_ssd1306_i2c_128x64_noname_f},       // sh1107 64x128
+    {.name="sh1107_128x128",  .w=128, .h=128, .spi_i2c=0, .devcb=u8g2_Setup_sh1107_i2c_128x128_f},       // sh1107 64x128
     {.name="sh1108",  .w=160, .h=160, .spi_i2c=0, .devcb=u8g2_Setup_sh1108_i2c_160x160_f},          // sh1108 160x160
     {.name="sh1108",  .w=160, .h=160, .spi_i2c=0, .devcb=u8g2_Setup_sh1108_i2c_160x160_f},          // sh1108 160x160
     {.name="st7567",  .w=128, .h=64, .spi_i2c=1, .devcb=u8g2_Setup_st7567_jlx12864_f},                 // st7567 128x64
     {.name="st7567",  .w=128, .h=64, .spi_i2c=1, .devcb=u8g2_Setup_st7567_jlx12864_f},                 // st7567 128x64
     {.name="uc1701",  .w=128, .h=64, .spi_i2c=1, .devcb=u8g2_Setup_uc1701_mini12864_f},                // uc1701
     {.name="uc1701",  .w=128, .h=64, .spi_i2c=1, .devcb=u8g2_Setup_uc1701_mini12864_f},                // uc1701

+ 2 - 2
components/u8g2/u8x8_d_sh1107.c

@@ -516,8 +516,8 @@ static const u8x8_display_info_t u8x8_sh1107_128x128_display_info =
   /* write_pulse_width_ns = */ 150,	/* sh1107: cycle time is 300ns, so use 300/2 = 150 */
   /* write_pulse_width_ns = */ 150,	/* sh1107: cycle time is 300ns, so use 300/2 = 150 */
   /* tile_width = */ 16,
   /* tile_width = */ 16,
   /* tile_height = */ 16,
   /* tile_height = */ 16,
-  /* default_x_offset = */ 96,
-  /* flipmode_x_offset = */ 96,
+  /* default_x_offset = */ 0,
+  /* flipmode_x_offset = */ 0,
   /* pixel_width = */ 128,
   /* pixel_width = */ 128,
   /* pixel_height = */ 128
   /* pixel_height = */ 128
 };
 };