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/27 11:19:21 UTC
[incubator-nuttx] 14/48: arch/arm/src/kl/kl_pwm.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 d9b7909f00101a56a5b48c5d0db40f5f75bf162e
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 09:56:30 2020 +0900
arch/arm/src/kl/kl_pwm.c: Fix syslog formats
---
arch/arm/src/kl/kl_pwm.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/arch/arm/src/kl/kl_pwm.c b/arch/arm/src/kl/kl_pwm.c
index a03c659..33b82d6 100644
--- a/arch/arm/src/kl/kl_pwm.c
+++ b/arch/arm/src/kl/kl_pwm.c
@@ -40,6 +40,7 @@
#include <nuttx/config.h>
+#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <assert.h>
@@ -345,7 +346,7 @@ static int pwm_timer(FAR struct kl_pwmtimer_s *priv,
DEBUGASSERT(priv != NULL && info != NULL);
- pwminfo("TPM%d channel: %d frequency: %d duty: %08x\n",
+ pwminfo("TPM%d channel: %d frequency: %" PRId32 " duty: %08" PRIx32 "\n",
priv->tpmid, priv->channel, info->frequency, info->duty);
DEBUGASSERT(info->frequency > 0 && info->duty > 0 &&
@@ -415,8 +416,8 @@ static int pwm_timer(FAR struct kl_pwmtimer_s *priv,
cv = b16toi(info->duty * modulo + b16HALF);
- pwminfo("TPM%d PCLK: %d frequency: %d TPMCLK: %d "
- "prescaler: %d modulo: %d c0v: %d\n",
+ pwminfo("TPM%d PCLK: %" PRId32 " frequency: %" PRId32 " TPMCLK: %" PRId32
+ " prescaler: %d modulo: %" PRId32 " c0v: %" PRId32 "\n",
priv->tpmid, priv->pclk, info->frequency, tpmclk,
presc_values[prescaler], modulo, cv);
@@ -523,7 +524,7 @@ static int pwm_setup(FAR struct pwm_lowerhalf_s *dev)
regval |= SIM_SCGC6_TPM0 | SIM_SCGC6_TPM1 | SIM_SCGC6_TPM2;
putreg32(regval, KL_SIM_SCGC6);
- pwminfo("TPM%d pincfg: %08x\n", priv->tpmid, priv->pincfg);
+ pwminfo("TPM%d pincfg: %08" PRIx32 "\n", priv->tpmid, priv->pincfg);
pwm_dumpregs(priv, "Initially");
/* Configure the PWM output pin, but do not start the timer yet */
@@ -554,7 +555,7 @@ static int pwm_shutdown(FAR struct pwm_lowerhalf_s *dev)
FAR struct kl_pwmtimer_s *priv = (FAR struct kl_pwmtimer_s *)dev;
uint32_t pincfg;
- pwminfo("TPM%d pincfg: %08x\n", priv->tpmid, priv->pincfg);
+ pwminfo("TPM%d pincfg: %08" PRIx32 "\n", priv->tpmid, priv->pincfg);
/* Make sure that the output has been stopped */