Skip to content

Commit

Permalink
Fat: Configure display fast mode syscall
Browse files Browse the repository at this point in the history
  • Loading branch information
abonnaudet-ledger committed Jul 28, 2023
1 parent f2b26e8 commit b3d05ca
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,10 @@
#define SYSCALL_nbgl_screen_reinit_ID 0x00fa000d
#define SYSCALL_nbgl_front_draw_img_rle_ID 0x05fa0010
#define SYSCALL_nbgl_screen_update_temperature_ID 0x01fa0011

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

#ifdef HAVE_BACKGROUND_IMG
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,8 +60,15 @@ 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);

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

void nbgl_screenRedraw(void);
nbgl_obj_t *nbgl_screenGetTop(void);
uint8_t nbgl_screenGetCurrentStackSize(void);
Expand Down
7 changes: 7 additions & 0 deletions src/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,13 @@ void nbgl_screen_update_temperature(uint8_t temp_degrees)
return;
}

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

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

0 comments on commit b3d05ca

Please sign in to comment.