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 2020/11/28 05:39:07 UTC
[incubator-nuttx] 14/24: arch/arm/src/lpc43xx/lpc43_timer.c: Fix
syslog formats
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 a4d37f788365285361caff2fbcd2c0250e73025d
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Nov 28 09:54:29 2020 +0900
arch/arm/src/lpc43xx/lpc43_timer.c: Fix syslog formats
---
arch/arm/src/lpc43xx/lpc43_timer.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/arch/arm/src/lpc43xx/lpc43_timer.c b/arch/arm/src/lpc43xx/lpc43_timer.c
index 8b6109a..3ed0e10 100644
--- a/arch/arm/src/lpc43xx/lpc43_timer.c
+++ b/arch/arm/src/lpc43xx/lpc43_timer.c
@@ -43,6 +43,7 @@
#include <sys/types.h>
+#include <inttypes.h>
#include <stdint.h>
#include <errno.h>
#include <debug.h>
@@ -551,9 +552,9 @@ static int lpc43_getstatus(FAR struct timer_lowerhalf_s *lower,
status->timeleft = ((uint64_t)priv->timeout * elapsed) /
(priv->clkticks + 1);
- tmrinfo(" flags : %08x\n", status->flags);
- tmrinfo(" timeout : %d\n", status->timeout);
- tmrinfo(" timeleft : %d\n", status->timeleft);
+ tmrinfo(" flags : %08" PRIx32 "\n", status->flags);
+ tmrinfo(" timeout : %" PRId32 "\n", status->timeout);
+ tmrinfo(" timeleft : %" PRId32 "\n", status->timeleft);
return OK;
}
@@ -585,13 +586,13 @@ static int lpc43_settimeout(FAR struct timer_lowerhalf_s *lower,
return -EPERM;
}
- tmrinfo("Entry: timeout=%d\n", timeout);
+ tmrinfo("Entry: timeout=%" PRId32 "\n", timeout);
/* Can this timeout be represented? */
if (timeout < 1 || timeout > TMR_MAXTIMEOUT)
{
- tmrerr("ERROR: Cannot represent timeout=%lu > %lu\n",
+ tmrerr("ERROR: Cannot represent timeout=%" PRIu32 " > %llu\n",
timeout, TMR_MAXTIMEOUT);
return -ERANGE;
}
@@ -612,7 +613,8 @@ static int lpc43_settimeout(FAR struct timer_lowerhalf_s *lower,
priv->adjustment = priv->timeout - timeout;
- tmrinfo("fclk=%d clkticks=%d timeout=%d, adjustment=%d\n",
+ tmrinfo("fclk=%d clkticks=%" PRId32
+ " timeout=%" PRId32 ", adjustment=%" PRId32 "\n",
TMR_FCLK, priv->clkticks, priv->timeout, priv->adjustment);
return OK;