From 6f2e23ad0ce2fdbc588165a9a5a85c7a90ed63e8 Mon Sep 17 00:00:00 2001 From: Michal Lenc Date: Fri, 26 Nov 2021 15:48:48 +0100 Subject: [PATCH] arch/arm/src/samv7/sam_tc.c: fix compile warnings and errors Just a minor change fixing some compile warnings and errros, does not have any impact on functionality. Signed-off-by: Michal Lenc --- arch/arm/src/samv7/sam_tc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/arch/arm/src/samv7/sam_tc.c b/arch/arm/src/samv7/sam_tc.c index 7f5cf11440..5244da6327 100644 --- a/arch/arm/src/samv7/sam_tc.c +++ b/arch/arm/src/samv7/sam_tc.c @@ -176,7 +176,7 @@ static bool sam_checkreg(struct sam_tc_s *tc, bool wr, uint32_t regaddr, static inline uint32_t sam_tc_getreg(struct sam_chan_s *chan, unsigned int offset); static inline void sam_tc_putreg(struct sam_chan_s *chan, - unsigned int offset, uint32_t regval); + uint32_t regval, unsigned int offset); static inline uint32_t sam_chan_getreg(struct sam_chan_s *chan, unsigned int offset); @@ -1066,7 +1066,7 @@ static int sam_tc_mcksrc(uint32_t frequency, uint32_t *tcclks, uint32_t fnext; int ndx = 0; - tmrinfo("frequency=%d\n", frequency); + tmrinfo("frequency=%ld\n", frequency); /* Satisfy lower bound. That is, the value of the divider such that: * @@ -1693,8 +1693,8 @@ uint32_t sam_tc_divfreq(TC_HANDLE handle) int sam_tc_clockselect(uint32_t frequency, uint32_t *tcclks, uint32_t *actual) { - uint32_t mck_actual; - uint32_t mck_tcclks; + uint32_t mck_actual = 0; + uint32_t mck_tcclks = 0; uint32_t mck_error; int ret; @@ -1746,7 +1746,7 @@ int sam_tc_clockselect(uint32_t frequency, uint32_t *tcclks, if (actual) { - tmrinfo("return actual=%lu\n", (unsigned long)fselect); + tmrinfo("return actual=%lu\n", (unsigned long)pck6_actual); *actual = pck6_actual; }