@@ -253,8 +253,16 @@ void displayio_display_core_set_region_to_update(displayio_display_core_t* self,
253
253
data [data_length ++ ] = x2 >> 8 ;
254
254
data [data_length ++ ] = x2 & 0xff ;
255
255
}
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
+ }
256
263
self -> send (self -> bus , data_type , chip_select , data , data_length );
257
264
displayio_display_core_end_transaction (self );
265
+
258
266
if (set_current_column_command != NO_COMMAND ) {
259
267
uint8_t command = set_current_column_command ;
260
268
displayio_display_core_begin_transaction (self );
@@ -283,6 +291,14 @@ void displayio_display_core_set_region_to_update(displayio_display_core_t* self,
283
291
data [data_length ++ ] = y2 >> 8 ;
284
292
data [data_length ++ ] = y2 & 0xff ;
285
293
}
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
+
286
302
self -> send (self -> bus , data_type , chip_select , data , data_length );
287
303
displayio_display_core_end_transaction (self );
288
304
0 commit comments