Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion boards/shields/st_lcd_dsi_mb1835/st_lcd_dsi_mb1835.overlay
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
status = "okay";
width = <480>;
height = <480>;
pixel-format = <PANEL_PIXEL_FORMAT_RGB_888>;
pixel-format = <PANEL_PIXEL_FORMAT_ARGB_8888>;

bl-ctrl-gpios = <&dsi_lcd_qsh_030 53 GPIO_ACTIVE_HIGH>;

Expand Down
10 changes: 9 additions & 1 deletion samples/subsys/input/draw_touch_events/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,15 @@ static void clear_screen(void)

for (x = 0; x < WIDTH; x += CROSS_DIM) {
for (y = 0; y < HEIGHT; y += CROSS_DIM) {
display_write(display_dev, x, y, &buf_desc, buffer_cross_empty);
struct display_buffer_descriptor ddesc = buf_desc;
uint16_t rem_w = WIDTH - x;
uint16_t rem_h = HEIGHT - y;

ddesc.width = MIN(buf_desc.width, rem_w);
ddesc.height = MIN(buf_desc.height, rem_h);
ddesc.buf_size = ddesc.width * ddesc.height * BPP;

display_write(display_dev, x, y, &ddesc, buffer_cross_empty);
}
}
}
Expand Down