1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-14 03:30:02 +00:00

Fixed compilation of emulator (#370)

This commit is contained in:
Jochen Hoenicke 2018-06-21 14:52:17 +02:00 committed by Pavol Rusnak
parent 0ddf443346
commit da9f8bec6f

8
util.h
View File

@ -21,6 +21,7 @@
#define __UTIL_H_
#include <stdint.h>
#include <stdbool.h>
#include <setup.h>
#if !EMULATOR
@ -86,6 +87,13 @@ static inline bool is_mode_unprivileged(void)
__asm__ volatile("mrs %0, control" : "=r" (r0));
return r0 & 1;
}
#else /* EMULATOR */
static inline bool is_mode_unprivileged(void)
{
return true;
}
#endif
#endif