Skip to content

Commit

Permalink
Fat: Configure display fast mode syscall
Browse files Browse the repository at this point in the history
(cherry picked from commit 1591608)
  • Loading branch information
abonnaudet-ledger committed Aug 4, 2023
1 parent e253ba8 commit e3a27cd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
7 changes: 6 additions & 1 deletion include/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,12 @@
#define SYSCALL_nbgl_front_draw_img_rle_ID 0x05fa0010
#ifdef HAVE_DISPLAY_FAST_MODE
#define SYSCALL_nbgl_screen_update_temperature_ID 0x01fa0011
#endif
#endif // HAVE_DISPLAY_FAST_MODE

#ifdef HAVE_CONFIGURABLE_DISPLAY_FAST_MODE
#define SYSCALL_nbgl_screen_config_fast_mode_ID 0x00fa0012
#endif // HAVE_CONFIGURABLE_DISPLAY_FAST_MODE
#endif // HAVE_NBGL

#ifdef HAVE_BACKGROUND_IMG
#define SYSCALL_fetch_background_img 0x01fa0009
Expand Down
7 changes: 7 additions & 0 deletions lib_nbgl/include/nbgl_screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,14 @@ typedef struct PACKED__ nbgl_screen_s {
**********************/

unsigned int nbgl_screen_reinit(void);

#ifdef HAVE_DISPLAY_FAST_MODE
void nbgl_screen_update_temperature(uint8_t temp_degrees);
#endif // HAVE_DISPLAY_FAST_MODE

#ifdef HAVE_CONFIGURABLE_DISPLAY_FAST_MODE
void nbgl_screen_config_fast_mode(uint8_t fast_mode_setting);
#endif // HAVE_CONFIGURABLE_DISPLAY_FAST_MODE

void nbgl_screenRedraw(void);
nbgl_obj_t *nbgl_screenGetTop(void);
Expand Down
9 changes: 9 additions & 0 deletions src/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,15 @@ void nbgl_screen_update_temperature(uint8_t temp_degrees)
}
#endif // HAVE_DISPLAY_FAST_MODE

#ifdef HAVE_CONFIGURABLE_DISPLAY_FAST_MODE
void nbgl_screen_config_fast_mode(uint8_t fast_mode_setting)
{
unsigned int parameters[1];
parameters[0] = (unsigned int) fast_mode_setting;
SVC_Call(SYSCALL_nbgl_screen_config_fast_mode_ID, parameters);
}
#endif // HAVE_CONFIGURABLE_DISPLAY_FAST_MODE

#endif

void nvm_write ( void * dst_adr, void * src_adr, unsigned int src_len ) {
Expand Down

0 comments on commit e3a27cd

Please sign in to comment.