Skip to content

Commit b921543

Browse files
committed
Requested changes take 1
1 parent 19dbff6 commit b921543

File tree

18 files changed

+41
-36
lines changed

18 files changed

+41
-36
lines changed

ports/atmel-samd/boards/hallowing_m0_express/board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ void board_init(void) {
110110
false, // data_as_commands
111111
true, // auto_refresh
112112
60, // native_frames_per_second
113-
true); // backlight_on_high
113+
true, // backlight_on_high
114+
false); // not SH1107
114115
}
115116

116117
bool board_requests_safe_mode(void) {

ports/atmel-samd/boards/hallowing_m4_express/board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ void board_init(void) {
9191
false, // data_as_commands
9292
true, // auto_refresh
9393
60, // native_frames_per_second
94-
true); // backlight_on_high
94+
true, // backlight_on_high
95+
false); // not SH1107
9596
}
9697

9798
bool board_requests_safe_mode(void) {

ports/atmel-samd/boards/monster_m4sk/board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ void board_init(void) {
9292
false, // data_as_commands
9393
true, // auto_refresh
9494
60, // native_frames_per_second
95-
true); // backlight_on_high
95+
true, // backlight_on_high
96+
false); // SH1107_addressing
9697
}
9798

9899
bool board_requests_safe_mode(void) {

ports/atmel-samd/boards/pewpew_m4/board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,8 @@ void board_init(void) {
143143
false, // data_as_commands
144144
false, // auto_refresh
145145
20, // native_frames_per_second
146-
true); // backlight_on_high
146+
true, // backlight_on_high
147+
false); // SH1107_addressing
147148
}
148149

149150
bool board_requests_safe_mode(void) {

ports/atmel-samd/boards/pybadge/board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ void board_init(void) {
114114
false, // data_as_commands
115115
true, // auto_refresh
116116
60, // native_frames_per_second
117-
true); // backlight_on_high
117+
true, // backlight_on_high
118+
false); // SH1107_addressing
118119
}
119120

120121
bool board_requests_safe_mode(void) {

ports/atmel-samd/boards/pybadge_airlift/board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ void board_init(void) {
9292
false, // data_as_commands
9393
true, // auto_refresh
9494
60, // native_frames_per_second
95-
true); // backlight_on_high
95+
true, // backlight_on_high
96+
false); // SH1107_addressing
9697
}
9798

9899
bool board_requests_safe_mode(void) {

ports/atmel-samd/boards/pygamer/board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,8 @@ void board_init(void) {
114114
false, // data_as_commands
115115
true, // auto_refresh
116116
60, // native_frames_per_second
117-
true); // backlight_on_high
117+
true, // backlight_on_high
118+
false); // SH1107_addressing
118119
}
119120

120121
bool board_requests_safe_mode(void) {

ports/atmel-samd/boards/pygamer_advance/board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ void board_init(void) {
9292
false, // data_as_commands
9393
true, // auto_refresh
9494
60, // native_frames_per_second
95-
true); // backlight_on_high
95+
true, // backlight_on_high
96+
false); // SH1107_addressing
9697
}
9798

9899
bool board_requests_safe_mode(void) {

ports/atmel-samd/boards/pyportal/board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ void board_init(void) {
100100
false, // data_as_commands
101101
true, // auto_refresh
102102
60, // native_frames_per_second
103-
true); // backlight_on_high
103+
true, // backlight_on_high
104+
false); // SH1107_addressing
104105
}
105106

106107
bool board_requests_safe_mode(void) {

ports/atmel-samd/boards/pyportal_titano/board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,8 @@ void board_init(void) {
117117
false, // data_as_commands
118118
true, // auto_refresh
119119
60, // native_frames_per_second
120-
true); // backlight_on_high
120+
true, // backlight_on_high
121+
false); // SH1107_addressing
121122
}
122123

123124
bool board_requests_safe_mode(void) {

ports/atmel-samd/boards/seeeduino_wio_terminal/board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ void board_init(void) {
105105
false, // data_as_commands
106106
true, // auto_refresh
107107
60, // native_frames_per_second
108-
true); // backlight_on_high
108+
true, // backlight_on_high
109+
false); // SH1107_addressing
109110
}
110111

111112
bool board_requests_safe_mode(void) {

ports/nrf/boards/clue_nrf52840_express/board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ void board_init(void) {
9191
false, // data_as_commands
9292
true, // auto_refresh
9393
60, // native_frames_per_second
94-
true); // backlight_on_high
94+
true, // backlight_on_high
95+
false); // not SH1107
9596
}
9697

9798
bool board_requests_safe_mode(void) {

ports/nrf/boards/hiibot_bluefi/board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ void board_init(void) {
9292
false, // data_as_commands
9393
true, // auto_refresh
9494
60, // native_frames_per_second
95-
true); // backlight_on_high
95+
true, // backlight_on_high
96+
false); // SH1107_addressing
9697
}
9798

9899
bool board_requests_safe_mode(void) {

ports/nrf/boards/makerdiary_nrf52840_m2_devkit/board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ void board_init(void) {
9292
false, // data_as_commands
9393
true, // auto_refresh
9494
60, // native_frames_per_second
95-
true); // backlight_on_high
95+
true, // backlight_on_high
96+
false); // SH1107_addressing
9697
}
9798

9899
bool board_requests_safe_mode(void) {

ports/nrf/boards/ohs2020_badge/board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,8 @@ void board_init(void) {
9191
false, // data_as_commands
9292
true, // auto_refresh
9393
60, // native_frames_per_second
94-
false); // backlight_on_high
94+
false, // backlight_on_high
95+
false); // SH1107_addressing
9596
}
9697

9798
bool board_requests_safe_mode(void) {

ports/stm/boards/meowbit_v121/board.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ void board_init(void) {
111111
false, // data_as_commands
112112
true, // auto_refresh
113113
60, // native_frames_per_second
114-
true); // backlight_on_high
114+
true, // backlight_on_high
115+
false); // SH1107_addressing
115116
}
116117

117118
bool board_requests_safe_mode(void) {

shared-module/displayio/Display.c

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -252,14 +252,8 @@ STATIC bool _refresh_area(displayio_display_obj_t* self, const displayio_area_t*
252252
// write one single row at a time
253253
if (self->SH1107_addressing) {
254254
subrectangles = rows_per_buffer; // vertical (column mode) write each separately (height times)
255-
}
256-
257-
// Skip this recalculation of subrectangles if SH1107 (each subrectangle is a single row)
258-
// [mdroberts1243] I am worried/confused about the pixels_in_byte_share_row calculation though
259-
// since it makes sense to be on a byte boundary (actually a page boundary too)
260-
// seems to work as is though.
261-
if ((displayio_area_size(&clipped) > buffer_size * pixels_per_word)
262-
&& (!self->SH1107_addressing)) {
255+
rows_per_buffer = 1;
256+
} else if (displayio_area_size(&clipped) > buffer_size * pixels_per_word) {
263257
rows_per_buffer = buffer_size * pixels_per_word / displayio_area_width(&clipped);
264258
if (rows_per_buffer == 0) {
265259
rows_per_buffer = 1;
@@ -297,18 +291,13 @@ STATIC bool _refresh_area(displayio_display_obj_t* self, const displayio_area_t*
297291
.y2 = clipped.y1 + rows_per_buffer * (j + 1)
298292
};
299293
if (self->SH1107_addressing) {
300-
// one row only for SH1107 in vertical (column) mode
301-
subrectangle.y1 = clipped.y1 + j;
302-
subrectangle.y2 = clipped.y1 + (j + 1);
303-
};
304-
if ((remaining_rows < rows_per_buffer) && (!self->SH1107_addressing)) {
294+
// one row only for SH1107 in vertical (column) mode
295+
subrectangle.y1 = clipped.y1 + j;
296+
subrectangle.y2 = clipped.y1 + (j + 1);
297+
} else if (remaining_rows < rows_per_buffer) {
305298
subrectangle.y2 = subrectangle.y1 + remaining_rows;
306299
}
307-
if (self->SH1107_addressing) {
308-
remaining_rows -= 1;
309-
} else {
310-
remaining_rows -= rows_per_buffer;
311-
}
300+
remaining_rows -= rows_per_buffer;
312301

313302
displayio_display_core_set_region_to_update(&self->core, self->set_column_command,
314303
self->set_row_command, NO_COMMAND, NO_COMMAND, self->data_as_commands, false,

shared-module/displayio/display_core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
#include <string.h>
4242

4343
#define DISPLAYIO_CORE_DEBUG(...) (void)0
44-
//#define DISPLAYIO_CORE_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__)
44+
// #define DISPLAYIO_CORE_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__)
4545

4646
void displayio_display_core_construct(displayio_display_core_t* self,
4747
mp_obj_t bus, uint16_t width, uint16_t height, uint16_t ram_width, uint16_t ram_height, int16_t colstart, int16_t rowstart, uint16_t rotation,
@@ -322,7 +322,7 @@ void displayio_display_core_start_refresh(displayio_display_core_t* self) {
322322

323323
void displayio_display_core_finish_refresh(displayio_display_core_t* self) {
324324
if (self->current_group != NULL) {
325-
// DISPLAYIO_CORE_DEBUG("displayiocore group_finish_refresh\n");
325+
DISPLAYIO_CORE_DEBUG("displayiocore group_finish_refresh\n");
326326
displayio_group_finish_refresh(self->current_group);
327327
}
328328
self->full_refresh = false;

0 commit comments

Comments
 (0)