Skip to content

Commit

Permalink
Fat: Add nbgl_screen_update_temperature syscall
Browse files Browse the repository at this point in the history
  • Loading branch information
abonnaudet-ledger committed Jul 31, 2023
1 parent 4c80b5f commit 1520301
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,8 @@
#define SYSCALL_nbgl_get_font_ID 0x01fa000c
#define SYSCALL_nbgl_screen_reinit_ID 0x00fa000d
#define SYSCALL_nbgl_front_draw_img_rle_ID 0x05fa0010
#ifdef HAVE_DISPLAY_FAST_MODE
#define SYSCALL_nbgl_screen_update_temperature_ID 0x01fa0011
#endif

#ifdef HAVE_BACKGROUND_IMG
Expand Down
3 changes: 3 additions & 0 deletions lib_nbgl/include/nbgl_screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,10 @@ typedef struct PACKED__ nbgl_screen_s {
/**********************
* GLOBAL PROTOTYPES
**********************/

unsigned int nbgl_screen_reinit(void);
void nbgl_screen_update_temperature(uint8_t temp_degrees);

void nbgl_screenRedraw(void);
nbgl_obj_t *nbgl_screenGetTop(void);
uint8_t nbgl_screenGetCurrentStackSize(void);
Expand Down
11 changes: 11 additions & 0 deletions src/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,17 @@ unsigned int nbgl_screen_reinit(void)
parameters[0] = 0;
return SVC_Call(SYSCALL_nbgl_screen_reinit_ID, parameters);
}

#ifdef HAVE_DISPLAY_FAST_MODE
void nbgl_screen_update_temperature(uint8_t temp_degrees)
{
unsigned int parameters[1];
parameters[0] = (unsigned int) temp_degrees;
SVC_Call(SYSCALL_nbgl_screen_update_temperature_ID, parameters);
return;
}
#endif // HAVE_DISPLAY_FAST_MODE

#endif

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

0 comments on commit 1520301

Please sign in to comment.