Requested changes take 1
This commit is contained in:
parent
19dbff67f2
commit
b921543571
|
@ -110,7 +110,8 @@ void board_init(void) {
|
||||||
false, // data_as_commands
|
false, // data_as_commands
|
||||||
true, // auto_refresh
|
true, // auto_refresh
|
||||||
60, // native_frames_per_second
|
60, // native_frames_per_second
|
||||||
true); // backlight_on_high
|
true, // backlight_on_high
|
||||||
|
false); // not SH1107
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -91,7 +91,8 @@ void board_init(void) {
|
||||||
false, // data_as_commands
|
false, // data_as_commands
|
||||||
true, // auto_refresh
|
true, // auto_refresh
|
||||||
60, // native_frames_per_second
|
60, // native_frames_per_second
|
||||||
true); // backlight_on_high
|
true, // backlight_on_high
|
||||||
|
false); // not SH1107
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -92,7 +92,8 @@ void board_init(void) {
|
||||||
false, // data_as_commands
|
false, // data_as_commands
|
||||||
true, // auto_refresh
|
true, // auto_refresh
|
||||||
60, // native_frames_per_second
|
60, // native_frames_per_second
|
||||||
true); // backlight_on_high
|
true, // backlight_on_high
|
||||||
|
false); // SH1107_addressing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -143,7 +143,8 @@ void board_init(void) {
|
||||||
false, // data_as_commands
|
false, // data_as_commands
|
||||||
false, // auto_refresh
|
false, // auto_refresh
|
||||||
20, // native_frames_per_second
|
20, // native_frames_per_second
|
||||||
true); // backlight_on_high
|
true, // backlight_on_high
|
||||||
|
false); // SH1107_addressing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -114,7 +114,8 @@ void board_init(void) {
|
||||||
false, // data_as_commands
|
false, // data_as_commands
|
||||||
true, // auto_refresh
|
true, // auto_refresh
|
||||||
60, // native_frames_per_second
|
60, // native_frames_per_second
|
||||||
true); // backlight_on_high
|
true, // backlight_on_high
|
||||||
|
false); // SH1107_addressing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -92,7 +92,8 @@ void board_init(void) {
|
||||||
false, // data_as_commands
|
false, // data_as_commands
|
||||||
true, // auto_refresh
|
true, // auto_refresh
|
||||||
60, // native_frames_per_second
|
60, // native_frames_per_second
|
||||||
true); // backlight_on_high
|
true, // backlight_on_high
|
||||||
|
false); // SH1107_addressing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -114,7 +114,8 @@ void board_init(void) {
|
||||||
false, // data_as_commands
|
false, // data_as_commands
|
||||||
true, // auto_refresh
|
true, // auto_refresh
|
||||||
60, // native_frames_per_second
|
60, // native_frames_per_second
|
||||||
true); // backlight_on_high
|
true, // backlight_on_high
|
||||||
|
false); // SH1107_addressing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -92,7 +92,8 @@ void board_init(void) {
|
||||||
false, // data_as_commands
|
false, // data_as_commands
|
||||||
true, // auto_refresh
|
true, // auto_refresh
|
||||||
60, // native_frames_per_second
|
60, // native_frames_per_second
|
||||||
true); // backlight_on_high
|
true, // backlight_on_high
|
||||||
|
false); // SH1107_addressing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -100,7 +100,8 @@ void board_init(void) {
|
||||||
false, // data_as_commands
|
false, // data_as_commands
|
||||||
true, // auto_refresh
|
true, // auto_refresh
|
||||||
60, // native_frames_per_second
|
60, // native_frames_per_second
|
||||||
true); // backlight_on_high
|
true, // backlight_on_high
|
||||||
|
false); // SH1107_addressing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -117,7 +117,8 @@ void board_init(void) {
|
||||||
false, // data_as_commands
|
false, // data_as_commands
|
||||||
true, // auto_refresh
|
true, // auto_refresh
|
||||||
60, // native_frames_per_second
|
60, // native_frames_per_second
|
||||||
true); // backlight_on_high
|
true, // backlight_on_high
|
||||||
|
false); // SH1107_addressing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -105,7 +105,8 @@ void board_init(void) {
|
||||||
false, // data_as_commands
|
false, // data_as_commands
|
||||||
true, // auto_refresh
|
true, // auto_refresh
|
||||||
60, // native_frames_per_second
|
60, // native_frames_per_second
|
||||||
true); // backlight_on_high
|
true, // backlight_on_high
|
||||||
|
false); // SH1107_addressing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -91,7 +91,8 @@ void board_init(void) {
|
||||||
false, // data_as_commands
|
false, // data_as_commands
|
||||||
true, // auto_refresh
|
true, // auto_refresh
|
||||||
60, // native_frames_per_second
|
60, // native_frames_per_second
|
||||||
true); // backlight_on_high
|
true, // backlight_on_high
|
||||||
|
false); // not SH1107
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -92,7 +92,8 @@ void board_init(void) {
|
||||||
false, // data_as_commands
|
false, // data_as_commands
|
||||||
true, // auto_refresh
|
true, // auto_refresh
|
||||||
60, // native_frames_per_second
|
60, // native_frames_per_second
|
||||||
true); // backlight_on_high
|
true, // backlight_on_high
|
||||||
|
false); // SH1107_addressing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -92,7 +92,8 @@ void board_init(void) {
|
||||||
false, // data_as_commands
|
false, // data_as_commands
|
||||||
true, // auto_refresh
|
true, // auto_refresh
|
||||||
60, // native_frames_per_second
|
60, // native_frames_per_second
|
||||||
true); // backlight_on_high
|
true, // backlight_on_high
|
||||||
|
false); // SH1107_addressing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -91,7 +91,8 @@ void board_init(void) {
|
||||||
false, // data_as_commands
|
false, // data_as_commands
|
||||||
true, // auto_refresh
|
true, // auto_refresh
|
||||||
60, // native_frames_per_second
|
60, // native_frames_per_second
|
||||||
false); // backlight_on_high
|
false, // backlight_on_high
|
||||||
|
false); // SH1107_addressing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -111,7 +111,8 @@ void board_init(void) {
|
||||||
false, // data_as_commands
|
false, // data_as_commands
|
||||||
true, // auto_refresh
|
true, // auto_refresh
|
||||||
60, // native_frames_per_second
|
60, // native_frames_per_second
|
||||||
true); // backlight_on_high
|
true, // backlight_on_high
|
||||||
|
false); // SH1107_addressing
|
||||||
}
|
}
|
||||||
|
|
||||||
bool board_requests_safe_mode(void) {
|
bool board_requests_safe_mode(void) {
|
||||||
|
|
|
@ -252,14 +252,8 @@ STATIC bool _refresh_area(displayio_display_obj_t* self, const displayio_area_t*
|
||||||
// write one single row at a time
|
// write one single row at a time
|
||||||
if (self->SH1107_addressing) {
|
if (self->SH1107_addressing) {
|
||||||
subrectangles = rows_per_buffer; // vertical (column mode) write each separately (height times)
|
subrectangles = rows_per_buffer; // vertical (column mode) write each separately (height times)
|
||||||
}
|
rows_per_buffer = 1;
|
||||||
|
} else if (displayio_area_size(&clipped) > buffer_size * pixels_per_word) {
|
||||||
// Skip this recalculation of subrectangles if SH1107 (each subrectangle is a single row)
|
|
||||||
// [mdroberts1243] I am worried/confused about the pixels_in_byte_share_row calculation though
|
|
||||||
// since it makes sense to be on a byte boundary (actually a page boundary too)
|
|
||||||
// seems to work as is though.
|
|
||||||
if ((displayio_area_size(&clipped) > buffer_size * pixels_per_word)
|
|
||||||
&& (!self->SH1107_addressing)) {
|
|
||||||
rows_per_buffer = buffer_size * pixels_per_word / displayio_area_width(&clipped);
|
rows_per_buffer = buffer_size * pixels_per_word / displayio_area_width(&clipped);
|
||||||
if (rows_per_buffer == 0) {
|
if (rows_per_buffer == 0) {
|
||||||
rows_per_buffer = 1;
|
rows_per_buffer = 1;
|
||||||
|
@ -300,15 +294,10 @@ STATIC bool _refresh_area(displayio_display_obj_t* self, const displayio_area_t*
|
||||||
// one row only for SH1107 in vertical (column) mode
|
// one row only for SH1107 in vertical (column) mode
|
||||||
subrectangle.y1 = clipped.y1 + j;
|
subrectangle.y1 = clipped.y1 + j;
|
||||||
subrectangle.y2 = clipped.y1 + (j + 1);
|
subrectangle.y2 = clipped.y1 + (j + 1);
|
||||||
};
|
} else if (remaining_rows < rows_per_buffer) {
|
||||||
if ((remaining_rows < rows_per_buffer) && (!self->SH1107_addressing)) {
|
|
||||||
subrectangle.y2 = subrectangle.y1 + remaining_rows;
|
subrectangle.y2 = subrectangle.y1 + remaining_rows;
|
||||||
}
|
}
|
||||||
if (self->SH1107_addressing) {
|
|
||||||
remaining_rows -= 1;
|
|
||||||
} else {
|
|
||||||
remaining_rows -= rows_per_buffer;
|
remaining_rows -= rows_per_buffer;
|
||||||
}
|
|
||||||
|
|
||||||
displayio_display_core_set_region_to_update(&self->core, self->set_column_command,
|
displayio_display_core_set_region_to_update(&self->core, self->set_column_command,
|
||||||
self->set_row_command, NO_COMMAND, NO_COMMAND, self->data_as_commands, false,
|
self->set_row_command, NO_COMMAND, NO_COMMAND, self->data_as_commands, false,
|
||||||
|
|
|
@ -41,7 +41,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#define DISPLAYIO_CORE_DEBUG(...) (void)0
|
#define DISPLAYIO_CORE_DEBUG(...) (void)0
|
||||||
//#define DISPLAYIO_CORE_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__)
|
// #define DISPLAYIO_CORE_DEBUG(...) mp_printf(&mp_plat_print __VA_OPT__(,) __VA_ARGS__)
|
||||||
|
|
||||||
void displayio_display_core_construct(displayio_display_core_t* self,
|
void displayio_display_core_construct(displayio_display_core_t* self,
|
||||||
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,
|
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) {
|
||||||
|
|
||||||
void displayio_display_core_finish_refresh(displayio_display_core_t* self) {
|
void displayio_display_core_finish_refresh(displayio_display_core_t* self) {
|
||||||
if (self->current_group != NULL) {
|
if (self->current_group != NULL) {
|
||||||
// DISPLAYIO_CORE_DEBUG("displayiocore group_finish_refresh\n");
|
DISPLAYIO_CORE_DEBUG("displayiocore group_finish_refresh\n");
|
||||||
displayio_group_finish_refresh(self->current_group);
|
displayio_group_finish_refresh(self->current_group);
|
||||||
}
|
}
|
||||||
self->full_refresh = false;
|
self->full_refresh = false;
|
||||||
|
|
Loading…
Reference in New Issue