Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Factorize serialization of NBGL refresh #513

Merged
merged 1 commit into from
Jan 24, 2024
Merged
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
9 changes: 3 additions & 6 deletions lib_nbgl/src/nbgl_obj.c
Original file line number Diff line number Diff line change
Expand Up @@ -1489,9 +1489,6 @@ void nbgl_refreshSpecial(nbgl_refresh_mode_t mode)
return;
}

#ifdef HAVE_SERIALIZED_NBGL
io_seproxyhal_send_nbgl_serialized(NBGL_REFRESH_AREA, (nbgl_obj_t *) &refreshArea);
#endif
nbgl_frontRefreshArea(&refreshArea, mode, POST_REFRESH_FORCE_POWER_OFF);
LOG_DEBUG(OBJ_LOGGER,
"nbgl_refreshSpecial(), x0,y0 = [%d, %d], w,h = [%d, %d]\n",
Expand All @@ -1508,9 +1505,6 @@ void nbgl_refreshSpecialWithPostRefresh(nbgl_refresh_mode_t mode, nbgl_post_refr
return;
}

#ifdef HAVE_SERIALIZED_NBGL
io_seproxyhal_send_nbgl_serialized(NBGL_REFRESH_AREA, (nbgl_obj_t *) &refreshArea);
#endif
nbgl_frontRefreshArea(&refreshArea, mode, post_refresh);
LOG_DEBUG(OBJ_LOGGER,
"nbgl_refreshSpecialNoPoff(), x0,y0 = [%d, %d], w,h = [%d, %d]\n",
Expand Down Expand Up @@ -1539,6 +1533,9 @@ bool nbgl_refreshIsNeeded(void)
*/
void nbgl_refreshReset(void)
{
#ifdef HAVE_SERIALIZED_NBGL
io_seproxyhal_send_nbgl_serialized(NBGL_REFRESH_AREA, (nbgl_obj_t *) &refreshArea);
#endif
refreshArea.x0 = SCREEN_WIDTH - 1;
refreshArea.width = 0;
refreshArea.y0 = SCREEN_HEIGHT - 1;
Expand Down