mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
tests/periph/selftest_shield: Consistently use DETAILED_OUTPUT
There already is `DETAILED_OUTPUT` to trade ROM size for more verbose error messages, no need to abuse `DEBUG()` for the same as well.
This commit is contained in:
parent
f51ca593ba
commit
66d38101d8
@ -26,6 +26,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
#include "architecture.h"
|
||||||
#include "arduino_iomap.h"
|
#include "arduino_iomap.h"
|
||||||
#include "macros/units.h"
|
#include "macros/units.h"
|
||||||
#include "macros/utils.h"
|
#include "macros/utils.h"
|
||||||
@ -40,9 +41,6 @@
|
|||||||
#include "stdio_uart.h" /* for STDIO_UART_DEV */
|
#include "stdio_uart.h" /* for STDIO_UART_DEV */
|
||||||
|
|
||||||
/* BEGIN: controls of the behavior of the testing app: */
|
/* BEGIN: controls of the behavior of the testing app: */
|
||||||
#define ENABLE_DEBUG 1
|
|
||||||
#include "debug.h"
|
|
||||||
|
|
||||||
#ifndef STOP_ON_FAILURE
|
#ifndef STOP_ON_FAILURE
|
||||||
#define STOP_ON_FAILURE 0
|
#define STOP_ON_FAILURE 0
|
||||||
#endif
|
#endif
|
||||||
@ -715,8 +713,8 @@ static bool periph_uart_rxtx_test(uint32_t symbolrate)
|
|||||||
/* expecting actual duration within 75% to 200% of the expected. */
|
/* expecting actual duration within 75% to 200% of the expected. */
|
||||||
failed |= TEST(stop - start > duration_ticks - (duration_ticks >> 2));
|
failed |= TEST(stop - start > duration_ticks - (duration_ticks >> 2));
|
||||||
failed |= TEST(stop - start < (duration_ticks << 1));
|
failed |= TEST(stop - start < (duration_ticks << 1));
|
||||||
if (failed) {
|
if (failed && DETAILED_OUTPUT) {
|
||||||
DEBUG("%" PRIu32 " Bd, expected %" PRIu16 " ticks, got %" PRIu16
|
printf("%" PRIu32 " Bd, expected %" PRIu16 " ticks, got %" PRIu16
|
||||||
" ticks\n",
|
" ticks\n",
|
||||||
symbolrate, duration_ticks, (uint16_t)(stop - start));
|
symbolrate, duration_ticks, (uint16_t)(stop - start));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user