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:
Kaspar Schleiser 2020-09-23 09:52:00 +02:00 committed by GitHub
commit 0806b4b173
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View File

@ -2,4 +2,6 @@ include ../Makefile.tests_common
FEATURES_REQUIRED = periph_timer_periodic
USEMODULE += fmt
include $(RIOTBASE)/Makefile.include

View File

@ -23,6 +23,8 @@
#include "board.h"
#include "macros/units.h"
#include "fmt.h"
#include "mutex.h"
#include "periph/timer.h"
#include "test_utils/expect.h"
@ -61,7 +63,9 @@ static void cb(void *arg, int chan)
{
unsigned c = count[chan]++;
printf("[%d] tick\n", chan);
print_str("[");
print_u32_dec(chan);
print_str("] tick\n");
if (c > CYCLES_MAX) {
timer_stop(TIMER_CYCL);