Merge pull request #15061 from bergzand/pr/tests_timer_periodic/use_fmt
tests/periph_timer_periodic: Use fmt for in-irq printing
This commit is contained in:
commit
0806b4b173
@ -2,4 +2,6 @@ include ../Makefile.tests_common
|
|||||||
|
|
||||||
FEATURES_REQUIRED = periph_timer_periodic
|
FEATURES_REQUIRED = periph_timer_periodic
|
||||||
|
|
||||||
|
USEMODULE += fmt
|
||||||
|
|
||||||
include $(RIOTBASE)/Makefile.include
|
include $(RIOTBASE)/Makefile.include
|
||||||
|
|||||||
@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
#include "macros/units.h"
|
#include "macros/units.h"
|
||||||
|
|
||||||
|
#include "fmt.h"
|
||||||
#include "mutex.h"
|
#include "mutex.h"
|
||||||
#include "periph/timer.h"
|
#include "periph/timer.h"
|
||||||
#include "test_utils/expect.h"
|
#include "test_utils/expect.h"
|
||||||
@ -61,7 +63,9 @@ static void cb(void *arg, int chan)
|
|||||||
{
|
{
|
||||||
unsigned c = count[chan]++;
|
unsigned c = count[chan]++;
|
||||||
|
|
||||||
printf("[%d] tick\n", chan);
|
print_str("[");
|
||||||
|
print_u32_dec(chan);
|
||||||
|
print_str("] tick\n");
|
||||||
|
|
||||||
if (c > CYCLES_MAX) {
|
if (c > CYCLES_MAX) {
|
||||||
timer_stop(TIMER_CYCL);
|
timer_stop(TIMER_CYCL);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user