Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add UX specific syscall to share time with OS #454

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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