@@ -65,7 +65,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self,
65
65
}
66
66
displayio_display_core_construct (& self -> core , bus , width , height , ram_width , ram_height , colstart , rowstart , rotation ,
67
67
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 */ ,
69
69
SH1107_addressing && color_depth == 1 , false /*address_little_endian */ );
70
70
71
71
self -> write_ram_command = write_ram_command ;
@@ -86,7 +86,7 @@ void common_hal_displayio_display_construct(displayio_display_obj_t *self,
86
86
while (!displayio_display_core_begin_transaction (& self -> core )) {
87
87
RUN_BACKGROUND_TASKS ;
88
88
}
89
- if (self -> data_as_commands ) {
89
+ if (self -> core . data_as_commands ) {
90
90
uint8_t full_command [data_size + 1 ];
91
91
full_command [0 ] = cmd [0 ];
92
92
memcpy (full_command + 1 , data , data_size );
@@ -185,7 +185,7 @@ bool common_hal_displayio_display_set_brightness(displayio_display_obj_t *self,
185
185
} else if (self -> brightness_command != NO_BRIGHTNESS_COMMAND ) {
186
186
ok = displayio_display_core_begin_transaction (& self -> core );
187
187
if (ok ) {
188
- if (self -> data_as_commands ) {
188
+ if (self -> core . data_as_commands ) {
189
189
uint8_t set_brightness [2 ] = {self -> brightness_command , (uint8_t )(0xff * brightness )};
190
190
self -> core .send (self -> core .bus , DISPLAY_COMMAND , CHIP_SELECT_TOGGLE_EVERY_BYTE , set_brightness , 2 );
191
191
} else {
@@ -226,7 +226,7 @@ STATIC const displayio_area_t *_get_refresh_areas(displayio_display_obj_t *self)
226
226
}
227
227
228
228
STATIC 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 ) {
230
230
self -> core .send (self -> core .bus , DISPLAY_COMMAND , CHIP_SELECT_TOGGLE_EVERY_BYTE , & self -> write_ram_command , 1 );
231
231
}
232
232
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
247
247
uint16_t subrectangles = 1 ;
248
248
// for SH1107 and other boundary constrained controllers
249
249
// write one single row at a time
250
- if (self -> SH1107_addressing ) {
250
+ if (self -> core . SH1107_addressing ) {
251
251
subrectangles = rows_per_buffer / 8 ; // page addressing mode writes 8 rows at a time
252
252
rows_per_buffer = 8 ;
253
253
} else if (displayio_area_size (& clipped ) > buffer_size * pixels_per_word ) {
0 commit comments