mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-25 00:48:19 +00:00
chore(core): reorder includes
This commit is contained in:
parent
a628b9a92d
commit
d99127771c
@ -4,7 +4,9 @@
|
|||||||
#include <stddef.h>
|
#include <stddef.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include "irq.h"
|
||||||
#include "mpconfigport.h"
|
#include "mpconfigport.h"
|
||||||
|
#include "supervise.h"
|
||||||
|
|
||||||
#include "SEGGER_SYSVIEW.h"
|
#include "SEGGER_SYSVIEW.h"
|
||||||
#include "SEGGER_SYSVIEW_Conf.h"
|
#include "SEGGER_SYSVIEW_Conf.h"
|
||||||
@ -50,12 +52,6 @@ typedef struct {
|
|||||||
|
|
||||||
extern uint32_t SystemCoreClock;
|
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() {
|
uint32_t svc_get_dwt_cyccnt() {
|
||||||
if (is_mode_unprivileged()) {
|
if (is_mode_unprivileged()) {
|
||||||
__asm__ __volatile__("svc %0" ::"i"(SVC_GET_DWT_CYCCNT));
|
__asm__ __volatile__("svc %0" ::"i"(SVC_GET_DWT_CYCCNT));
|
||||||
|
Loading…
Reference in New Issue
Block a user