arch/arm/src/kl/kl_pwm.c: Fix syslog formats

This commit is contained in:
YAMAMOTO Takashi 2020-11-26 09:56:30 +09:00 committed by Xiang Xiao
parent 038fdbe8d9
commit d9b7909f00

View File

@ -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 */