@@ -65,7 +65,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self,
6565 }
6666 displayio_display_core_construct (& self -> core , bus , width , height , ram_width , ram_height , colstart , rowstart , rotation ,
6767 color_depth , grayscale , pixels_in_byte_share_row , bytes_per_cell , reverse_pixels_in_byte , reverse_bytes_in_word ,
68- set_column_command , set_row_command , NO_COMMAND , NO_COMMAND , self -> data_as_commands , false /* always_toggle_chip_select */ ,
68+ set_column_command , set_row_command , NO_COMMAND , NO_COMMAND , data_as_commands , false /* always_toggle_chip_select */ ,
6969 SH1107_addressing && color_depth == 1 , false /*address_little_endian */ );
7070
7171 self -> write_ram_command = write_ram_command ;
@@ -86,7 +86,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self,
8686 while (!displayio_display_core_begin_transaction (& self -> core )) {
8787 RUN_BACKGROUND_TASKS ;
8888 }
89- if (self -> data_as_commands ) {
89+ if (self -> core . data_as_commands ) {
9090 uint8_t full_command [data_size + 1 ];
9191 full_command [0 ] = cmd [0 ];
9292 memcpy (full_command + 1 , data , data_size );
@@ -185,7 +185,7 @@ bool common_hal_displayio_display_set_brightness(displayio_display_obj_t *self,
185185 } else if (self -> brightness_command != NO_BRIGHTNESS_COMMAND ) {
186186 ok = displayio_display_core_begin_transaction (& self -> core );
187187 if (ok ) {
188- if (self -> data_as_commands ) {
188+ if (self -> core . data_as_commands ) {
189189 uint8_t set_brightness [2 ] = {self -> brightness_command , (uint8_t )(0xff * brightness )};
190190 self -> core .send (self -> core .bus , DISPLAY_COMMAND , CHIP_SELECT_TOGGLE_EVERY_BYTE , set_brightness , 2 );
191191 } else {
@@ -226,7 +226,7 @@ STATIC const displayio_area_t *_get_refresh_areas(displayio_display_obj_t *self)
226226}
227227
228228STATIC void _send_pixels (displayio_display_obj_t * self , uint8_t * pixels , uint32_t length ) {
229- if (!self -> data_as_commands ) {
229+ if (!self -> core . data_as_commands ) {
230230 self -> core .send (self -> core .bus , DISPLAY_COMMAND , CHIP_SELECT_TOGGLE_EVERY_BYTE , & self -> write_ram_command , 1 );
231231 }
232232 self -> core .send (self -> core .bus , DISPLAY_DATA , CHIP_SELECT_UNTOUCHED , pixels , length );
@@ -247,7 +247,7 @@ STATIC bool _refresh_area(displayio_display_obj_t *self, const displayio_area_t
247247 uint16_t subrectangles = 1 ;
248248 // for SH1107 and other boundary constrained controllers
249249 // write one single row at a time
250- if (self -> SH1107_addressing ) {
250+ if (self -> core . SH1107_addressing ) {
251251 subrectangles = rows_per_buffer / 8 ; // page addressing mode writes 8 rows at a time
252252 rows_per_buffer = 8 ;
253253 } else if (displayio_area_size (& clipped ) > buffer_size * pixels_per_word ) {
0 commit comments