Skip to content

Commit

Permalink
Merge pull request #454 from LedgerHQ/abo_share_ux_time
Browse files Browse the repository at this point in the history
Add UX specific syscall to share time with OS
  • Loading branch information
abonnaudet-ledger authored Oct 23, 2023
2 parents ef27df1 + 8fa9bfa commit 437446d
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions include/os_time.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#pragma once

#include "decorators.h"

// UX specific syscall to share time with dashboard task
SYSCALL void os_set_ux_time_ms(unsigned int ux_ms);
1 change: 1 addition & 0 deletions include/syscalls.h
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
#define SYSCALL_os_deny_protected_flash_ID 0x00000091
#define SYSCALL_os_allow_protected_ram_ID 0x00000092
#define SYSCALL_os_deny_protected_ram_ID 0x00000093
#define SYSCALL_os_set_ux_time_ms_ID 0x010000a2

#ifdef HAVE_CUSTOM_CA_DETAILS_IN_SETTINGS
#define SYSCALL_os_bolos_custom_ca_get_info_ID 0x01000CA0
Expand Down
8 changes: 8 additions & 0 deletions src/syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -1281,6 +1281,14 @@ void os_perso_set_onboarding_status(unsigned int state, unsigned int count, unsi
return;
}

void os_set_ux_time_ms(unsigned int ux_ms)
{
unsigned int parameters[1];
parameters[0] = (unsigned int) ux_ms;
SVC_Call(SYSCALL_os_set_ux_time_ms_ID, parameters);
return;
}

void os_perso_derive_node_bip32(cx_curve_t curve,
const unsigned int *path,
unsigned int pathLength,
Expand Down

0 comments on commit 437446d

Please sign in to comment.