From b3d05ca8b39ed947d0d575a75a6f245ece4b423f Mon Sep 17 00:00:00 2001 From: Arthur Bonnaudet Date: Fri, 28 Jul 2023 16:01:45 +0200 Subject: [PATCH] Fat: Configure display fast mode syscall --- include/syscalls.h | 4 ++++ lib_nbgl/include/nbgl_screen.h | 7 +++++++ src/syscalls.c | 7 +++++++ 3 files changed, 18 insertions(+) diff --git a/include/syscalls.h b/include/syscalls.h index 128615f10..61b751da3 100644 --- a/include/syscalls.h +++ b/include/syscalls.h @@ -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 diff --git a/lib_nbgl/include/nbgl_screen.h b/lib_nbgl/include/nbgl_screen.h index 3c67101eb..40611520b 100644 --- a/lib_nbgl/include/nbgl_screen.h +++ b/lib_nbgl/include/nbgl_screen.h @@ -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); diff --git a/src/syscalls.c b/src/syscalls.c index 659b159ec..73a58df0d 100644 --- a/src/syscalls.c +++ b/src/syscalls.c @@ -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 ) {