1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-25 15:58:08 +00:00

chore(core): reorder includes

This commit is contained in:
Ondrej Mikle 2021-01-25 13:19:57 +01:00 committed by Pavol Rusnak
parent a628b9a92d
commit d99127771c

View File

@ -4,7 +4,9 @@
#include <stddef.h>
#include <stdint.h>
#include <string.h>
#include "irq.h"
#include "mpconfigport.h"
#include "supervise.h"
#include "SEGGER_SYSVIEW.h"
#include "SEGGER_SYSVIEW_Conf.h"
@ -50,12 +52,6 @@ typedef struct {
extern uint32_t SystemCoreClock;
static inline uint32_t is_mode_unprivileged(void) {
uint32_t r0;
__asm__ volatile("mrs %0, control" : "=r"(r0));
return r0 & 1;
}
uint32_t svc_get_dwt_cyccnt() {
if (is_mode_unprivileged()) {
__asm__ __volatile__("svc %0" ::"i"(SVC_GET_DWT_CYCCNT));