mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-12 18:49:07 +00:00
Fixed compilation of emulator (#370)
This commit is contained in:
parent
0ddf443346
commit
da9f8bec6f
8
util.h
8
util.h
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user