@@ -253,8 +253,16 @@ void displayio_display_core_set_region_to_update(displayio_display_core_t* self,
253253 data [data_length ++ ] = x2 >> 8 ;
254254 data [data_length ++ ] = x2 & 0xff ;
255255 }
256+ // Quirk for SH1107 "column_and_page_addressing"
257+ // Column lower command = 0x00, Column upper command = 0x10
258+ if (column_and_page_addressing ) {
259+ data [0 ] = 0x00 | (x1 & 0x0F );
260+ data [1 ] = 0x10 | (x1 >> 4 );
261+ data_length = 2 ;
262+ }
256263 self -> send (self -> bus , data_type , chip_select , data , data_length );
257264 displayio_display_core_end_transaction (self );
265+
258266 if (set_current_column_command != NO_COMMAND ) {
259267 uint8_t command = set_current_column_command ;
260268 displayio_display_core_begin_transaction (self );
@@ -283,6 +291,14 @@ void displayio_display_core_set_region_to_update(displayio_display_core_t* self,
283291 data [data_length ++ ] = y2 >> 8 ;
284292 data [data_length ++ ] = y2 & 0xff ;
285293 }
294+ // Quirk for SH1107 "column_and_page_addressing"
295+ // Page address command = 0xB0
296+ if (column_and_page_addressing ) {
297+ data [0 ] = 0xB0 | (y1 & 0x07 );
298+ data_length = 1 ;
299+ }
300+ self -> send (self -> bus , data_type , chip_select , data , data_length );
301+
286302 self -> send (self -> bus , data_type , chip_select , data , data_length );
287303 displayio_display_core_end_transaction (self );
288304
0 commit comments