Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Arduino H7 Video + LVGL 9.x: fix flush buffer size#1052

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
leonardocavagnis wants to merge1 commit intoarduino:main
base:main
Choose a base branch
Loading
fromleonardocavagnis:h7_video_lvgl9_flush_fix
Open
Changes fromall 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
13 changes: 12 additions & 1 deletionlibraries/Arduino_H7_Video/src/Arduino_H7_Video.cpp
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -251,7 +251,11 @@ void lvgl_displayFlushing(lv_display_t * disp, const lv_area_t * area, unsigned
lv_display_rotation_t rotation = lv_display_get_rotation(disp);
lv_area_t rotated_area;
if (rotation != LV_DISPLAY_ROTATION_0) {
rotated_buf = (uint8_t*)realloc(rotated_buf, w * h * 4);
uint8_t* new_buf = (uint8_t*)realloc(rotated_buf, w * h * 2);
if (new_buf == NULL) {
return; // Insufficient memory error
}
rotated_buf = new_buf;
lv_color_format_t cf = lv_display_get_color_format(disp);
#if (LVGL_VERSION_MINOR < 2)
rotation = LV_DISPLAY_ROTATION_90; // bugfix: force 90 degree rotation for lvgl 9.1 end earlier
Expand All@@ -277,6 +281,13 @@ void lvgl_displayFlushing(lv_display_t * disp, const lv_area_t * area, unsigned
uint32_t offsetPos = (area_in_use->x1 + (dsi_getDisplayXSize() * area_in_use->y1)) * sizeof(uint16_t);

dsi_lcdDrawImage((void *) px_map, (void *)(dsi_getActiveFrameBuffer() + offsetPos), w, h, DMA2D_INPUT_RGB565);

// free the rotated buffer if it was allocated
if (rotation != LV_DISPLAY_ROTATION_0) {
free(rotated_buf);
rotated_buf = nullptr;
}

lv_display_flush_ready(disp); /* Indicate you are ready with the flushing*/
}
#else
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp