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:38:59 UTC

[incubator-nuttx] 06/24: arch/arm/src/nrf52/nrf52_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 cad04863421a01eb6e8a4d12ec8fc5a5793ce53f
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Nov 28 09:28:32 2020 +0900

    arch/arm/src/nrf52/nrf52_pwm.c: Fix syslog formats
---
 arch/arm/src/nrf52/nrf52_pwm.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/nrf52/nrf52_pwm.c b/arch/arm/src/nrf52/nrf52_pwm.c
index f489613..97fa421 100644
--- a/arch/arm/src/nrf52/nrf52_pwm.c
+++ b/arch/arm/src/nrf52/nrf52_pwm.c
@@ -24,6 +24,7 @@
 
 #include <nuttx/config.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <assert.h>
@@ -298,7 +299,7 @@ static int nrf52_pwm_duty(FAR struct nrf52_pwm_s *priv, uint8_t chan,
 
   DEBUGASSERT(priv);
 
-  pwminfo("PWM channel: %d duty: %d\n", chan, duty);
+  pwminfo("PWM channel: %d duty: %" PRId32 "\n", chan, duty);
 
   /* Get compare
    *
@@ -407,7 +408,8 @@ static int nrf52_pwm_freq(FAR struct nrf52_pwm_s *priv, uint32_t freq)
 
   priv->cntrtop = top;
 
-  pwminfo("PWM frequency: %d pwm_clk: %d pwm_prescaler: %d top: %d\n",
+  pwminfo("PWM frequency: %" PRId32 " pwm_clk: %" PRId32
+          " pwm_prescaler: %" PRId32 " top: %" PRId32 "\n",
           freq, pwm_clk, prescaler, top);
 
   return ret;