From dbd241ef2680c0104ff7404d45706ed87320b1fc Mon Sep 17 00:00:00 2001 From: Marian Buschsieweke Date: Wed, 10 Feb 2021 10:09:26 +0100 Subject: [PATCH] cpu/stm32/periph_ptp: update to new API --- cpu/stm32/periph/ptp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/stm32/periph/ptp.c b/cpu/stm32/periph/ptp.c index e51734d6c2..fc43cbc5e9 100644 --- a/cpu/stm32/periph/ptp.c +++ b/cpu/stm32/periph/ptp.c @@ -114,11 +114,11 @@ void ptp_init(void) ptptsar, ptpssir); } -void ptp_clock_adjust_speed(int16_t correction) +void ptp_clock_adjust_speed(int32_t correction) { uint64_t offset = ptptsar; offset *= correction; - offset >>= 16; + offset >>= 32; uint32_t adjusted_ptptsar = ptptsar + (uint32_t)offset; /* Value to add onto the 32 bit accumulator register (which causes the * value in ETH->PTPSSIR to be added onto the subsection register on