mirror of
https://github.com/apache/nuttx.git
synced 2026-05-26 18:56:10 +08:00
arch/arm/src/stm32h7/stm32_pwm.c: Fix syslog formats
This commit is contained in:
committed by
Xiang Xiao
parent
eadf358bdc
commit
648e0610c5
@@ -42,6 +42,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
#include <stdio.h>
|
||||
#include <assert.h>
|
||||
@@ -2009,7 +2010,7 @@ static int pwm_duty_update(FAR struct pwm_lowerhalf_s *dev, uint8_t channel,
|
||||
|
||||
DEBUGASSERT(priv != NULL);
|
||||
|
||||
pwminfo("TIM%u channel: %u duty: %08x\n",
|
||||
pwminfo("TIM%u channel: %u duty: %08" PRIx32 "\n",
|
||||
priv->timid, channel, duty);
|
||||
|
||||
#ifndef CONFIG_PWM_MULTICHAN
|
||||
@@ -2028,7 +2029,7 @@ static int pwm_duty_update(FAR struct pwm_lowerhalf_s *dev, uint8_t channel,
|
||||
|
||||
ccr = b16toi(duty * reload + b16HALF);
|
||||
|
||||
pwminfo("ccr: %u\n", ccr);
|
||||
pwminfo("ccr: %" PRIu32 "\n", ccr);
|
||||
|
||||
/* Write corresponding CCR register */
|
||||
|
||||
@@ -2136,8 +2137,9 @@ static int pwm_frequency_update(FAR struct pwm_lowerhalf_s *dev,
|
||||
reload--;
|
||||
}
|
||||
|
||||
pwminfo("TIM%u PCLK: %u frequency: %u TIMCLK: %u "
|
||||
"prescaler: %u reload: %u\n",
|
||||
pwminfo("TIM%u PCLK: %" PRIu32 " frequency: %" PRIu32
|
||||
" TIMCLK: %" PRIu32
|
||||
" prescaler: %" PRIu32 " reload: %" PRIu32 "\n",
|
||||
priv->timid, priv->pclk, frequency, timclk, prescaler, reload);
|
||||
|
||||
/* Set the reload and prescaler values */
|
||||
@@ -3388,10 +3390,10 @@ static int pwm_timer(FAR struct pwm_lowerhalf_s *dev,
|
||||
DEBUGASSERT(priv != NULL && info != NULL);
|
||||
|
||||
#if defined(CONFIG_PWM_MULTICHAN)
|
||||
pwminfo("TIM%u frequency: %u\n",
|
||||
pwminfo("TIM%u frequency: %" PRIu32 "\n",
|
||||
priv->timid, info->frequency);
|
||||
#else
|
||||
pwminfo("TIM%u channel: %u frequency: %u duty: %08x\n",
|
||||
pwminfo("TIM%u channel: %u frequency: %" PRIu32 " duty: %08" PRIx32 "\n",
|
||||
priv->timid, priv->channels[0].channel,
|
||||
info->frequency, info->duty);
|
||||
#endif
|
||||
@@ -3771,7 +3773,8 @@ static int pwm_set_apb_clock(FAR struct stm32_pwmtimer_s *priv, bool on)
|
||||
|
||||
/* Enable/disable APB 1/2 clock for timer */
|
||||
|
||||
pwminfo("RCC_APBxENR base: %08x bits: %04x\n", regaddr, en_bit);
|
||||
pwminfo("RCC_APBxENR base: %08" PRIx32 " bits: %04" PRIx32 "\n",
|
||||
regaddr, en_bit);
|
||||
|
||||
if (on)
|
||||
{
|
||||
@@ -3839,7 +3842,7 @@ static int pwm_setup(FAR struct pwm_lowerhalf_s *dev)
|
||||
pincfg = priv->channels[i].out1.pincfg;
|
||||
if (pincfg != 0)
|
||||
{
|
||||
pwminfo("pincfg: %08x\n", pincfg);
|
||||
pwminfo("pincfg: %08" PRIx32 "\n", pincfg);
|
||||
|
||||
stm32_configgpio(pincfg);
|
||||
pwm_dumpgpio(pincfg, "PWM setup");
|
||||
@@ -3858,7 +3861,7 @@ static int pwm_setup(FAR struct pwm_lowerhalf_s *dev)
|
||||
|
||||
if (pincfg != 0)
|
||||
{
|
||||
pwminfo("pincfg: %08x\n", pincfg);
|
||||
pwminfo("pincfg: %08" PRIx32 "\n", pincfg);
|
||||
|
||||
stm32_configgpio(pincfg);
|
||||
pwm_dumpgpio(pincfg, "PWM setup");
|
||||
@@ -3933,7 +3936,7 @@ static int pwm_shutdown(FAR struct pwm_lowerhalf_s *dev)
|
||||
pincfg = priv->channels[i].out1.pincfg;
|
||||
if (pincfg != 0)
|
||||
{
|
||||
pwminfo("pincfg: %08x\n", pincfg);
|
||||
pwminfo("pincfg: %08" PRIx32 "\n", pincfg);
|
||||
|
||||
pincfg &= (GPIO_PORT_MASK | GPIO_PIN_MASK);
|
||||
pincfg |= PINCFG_DEFAULT;
|
||||
@@ -3945,7 +3948,7 @@ static int pwm_shutdown(FAR struct pwm_lowerhalf_s *dev)
|
||||
pincfg = priv->channels[i].out2.pincfg;
|
||||
if (pincfg != 0)
|
||||
{
|
||||
pwminfo("pincfg: %08x\n", pincfg);
|
||||
pwminfo("pincfg: %08" PRIx32 "\n", pincfg);
|
||||
|
||||
pincfg &= (GPIO_PORT_MASK | GPIO_PIN_MASK);
|
||||
pincfg |= PINCFG_DEFAULT;
|
||||
@@ -4227,7 +4230,8 @@ static int pwm_stop(FAR struct pwm_lowerhalf_s *dev)
|
||||
putreg32(regval, regaddr);
|
||||
leave_critical_section(flags);
|
||||
|
||||
pwminfo("regaddr: %08x resetbit: %08x\n", regaddr, resetbit);
|
||||
pwminfo("regaddr: %08" PRIx32 " resetbit: %08" PRIx32 "\n",
|
||||
regaddr, resetbit);
|
||||
pwm_dumpregs(dev, "After stop");
|
||||
|
||||
errout:
|
||||
|
||||
Reference in New Issue
Block a user