Set page address correctly for st75256_jlx256160

This fixes the page address (row) setting for flip mode. When flip mode is enabled the offset should be 1, default is 0.
This commit is contained in:
Anthony DiGirolamo 2018-10-02 19:01:23 -07:00 committed by GitHub
parent 4dd7a01271
commit 8c69fd419b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 5 deletions

View File

@ -883,8 +883,8 @@ static const u8x8_display_info_t u8x8_st75256_256x160_display_info =
/* write_pulse_width_ns = */ 70,
/* tile_width = */ 32,
/* tile_hight = */ 20,
/* default_x_offset = */ 0, /* x offset in flipmode 0 */
/* flipmode_x_offset = */ 0, /* */
/* default_x_offset = */ 0, /* */
/* flipmode_x_offset = */ 1, /* x offset in flipmode = 1 */
/* pixel_width = */ 256,
/* pixel_height = */ 160
};
@ -931,8 +931,8 @@ static const uint8_t u8x8_d_st75256_256x160_init_seq[] = {
U8X8_C( 0x030 ), /* select 00 commands */
U8X8_CAA(0x75, 0, 0x4f), /* row range */
U8X8_CAA(0x15, 0, 255), /* col range */
U8X8_CAA(0x75, 0, 0x28), /* row range */
U8X8_CAA(0x15, 0, 0xFF), /* col range */
//U8X8_C( 0x030 ), /* select 00 commands */
U8X8_CA( 0xbc, 0x02 ), /* data scan dir */
@ -977,7 +977,7 @@ uint8_t u8x8_d_st75256_jlx256160(u8x8_t *u8x8, uint8_t msg, uint8_t arg_int, voi
u8x8_cad_SendCmd(u8x8, 0x030 ); /* select command set */
u8x8_cad_SendCmd(u8x8, 0x075 ); /* row */
if ( u8x8->x_offset == 0 ) /* 0 means flip mode 1 */
if ( u8x8->x_offset == 1 ) /* 1 means flip mode 1 */
u8x8_cad_SendArg(u8x8, 1+(((u8x8_tile_t *)arg_ptr)->y_pos));
else
u8x8_cad_SendArg(u8x8, (((u8x8_tile_t *)arg_ptr)->y_pos));