You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2021/11/27 12:17:53 UTC
[incubator-nuttx] 01/03: arch/arm/src/samv7/sam_tc.c: fix compile warnings and errors
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit 6f2e23ad0ce2fdbc588165a9a5a85c7a90ed63e8
Author: Michal Lenc <mi...@seznam.cz>
AuthorDate: Fri Nov 26 15:48:48 2021 +0100
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 <mi...@seznam.cz>
---
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 7f5cf11..5244da6 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;
}