mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
sys/trace: migrate to ztimer
This commit is contained in:
parent
f9f95534f6
commit
13a7aaf1d7
@ -73,7 +73,8 @@ ifneq (,$(filter rtt_cmd,$(USEMODULE)))
|
||||
endif
|
||||
|
||||
ifneq (,$(filter trace,$(USEMODULE)))
|
||||
USEMODULE += xtimer
|
||||
USEMODULE += ztimer
|
||||
USEMODULE += ztimer_usec
|
||||
endif
|
||||
|
||||
ifneq (,$(filter ssp,$(USEMODULE)))
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#include "irq.h"
|
||||
#include "xtimer.h"
|
||||
#include "ztimer.h"
|
||||
|
||||
#ifndef CONFIG_TRACE_BUFSIZE
|
||||
#define CONFIG_TRACE_BUFSIZE 512
|
||||
@ -42,7 +42,7 @@ void trace(uint32_t val)
|
||||
unsigned state = irq_disable();
|
||||
|
||||
tracebuf[tracebuf_pos % CONFIG_TRACE_BUFSIZE] =
|
||||
(tracebuf_entry_t){ .time = xtimer_now_usec(), .val = val };
|
||||
(tracebuf_entry_t){ .time = ztimer_now(ZTIMER_USEC), .val = val };
|
||||
tracebuf_pos++;
|
||||
irq_restore(state);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user