mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:32:45 +01:00
tests/periph_rtt: be more verbose on error
If `rtt_get_alarm()` doesn't return the correct value, print expected and return value to ease debugging.
This commit is contained in:
parent
3e32d55c33
commit
49a5bfb9e5
@ -93,8 +93,10 @@ int main(void)
|
||||
printf("Setting initial alarm to now + 5 s (%" PRIu32 ")\n", last);
|
||||
rtt_set_alarm(last, cb, 0);
|
||||
|
||||
if (rtt_get_alarm() != last) {
|
||||
puts("Error: rtt_get_alarm() not working");
|
||||
uint32_t tmp = rtt_get_alarm();
|
||||
if (tmp != last) {
|
||||
printf("Error: rtt_get_alarm() not working (expected %" PRIu32 " but got %" PRIu32 ")\n",
|
||||
last, tmp);
|
||||
return 1;
|
||||
}
|
||||
else {
|
||||
|
Loading…
Reference in New Issue
Block a user