Merge pull request #16192 from maribu/tests/periph_ptp_clock
tests/periph_ptp_clock: fix bug in debug print
This commit is contained in:
commit
654d841f66
@ -67,7 +67,8 @@ static int test_speed_adjustment(const int32_t speed)
|
||||
print_str(" (~");
|
||||
{
|
||||
int64_t tmp = speed * 100000ULL;
|
||||
tmp /= UINT32_MAX;
|
||||
/* trusting compiler to use arithmetic right shift, when available instead of division */
|
||||
tmp /= 1LL << 32;
|
||||
tmp += 100000ULL;
|
||||
char output[16];
|
||||
print(output, fmt_s32_dfp(output, (int32_t)tmp, -3));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user