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/25 13:11:46 UTC

[incubator-nuttx] 09/35: arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.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 1fc51b3eeb3f58c4c794a2745cdf57fe55a37a74
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Wed Nov 25 16:46:16 2020 +0900

    arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c: Fix syslog formats
---
 arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c b/arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c
index 5a080ef..4e030b5 100644
--- a/arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c
+++ b/arch/arm/src/lpc17xx_40xx/lpc17_40_ssp.c
@@ -40,6 +40,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <errno.h>
@@ -463,7 +464,7 @@ static uint32_t ssp_setfrequency(FAR struct spi_dev_s *dev,
   priv->frequency = frequency;
   priv->actual    = actual;
 
-  spiinfo("Frequency %d->%d\n", frequency, actual);
+  spiinfo("Frequency %" PRId32 "->%" PRId32 "\n", frequency, actual);
   return actual;
 }
 
@@ -604,7 +605,7 @@ static uint32_t ssp_send(FAR struct spi_dev_s *dev, uint32_t wd)
   /* Get the value from the RX FIFO and return it */
 
   regval = ssp_getreg(priv, LPC17_40_SSP_DR_OFFSET);
-  spiinfo("%04x->%04x\n", wd, regval);
+  spiinfo("%04" PRId32 "->%04" PRId32 "\n", wd, regval);
   return regval;
 }
 
@@ -739,7 +740,7 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer,
    * has occurred)
    */
 
-  spiinfo("nwords: %d\n", nwords);
+  spiinfo("nwords: %zd\n", nwords);
   u.pv = buffer;
   while (nwords || rxpending)
     {
@@ -749,7 +750,7 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer,
        * and (3) there are more bytes to be sent.
        */
 
-      spiinfo("TX: rxpending: %d nwords: %d\n", rxpending, nwords);
+      spiinfo("TX: rxpending: %" PRId32 " nwords: %zd\n", rxpending, nwords);
       while ((ssp_getreg(priv, LPC17_40_SSP_SR_OFFSET) & SSP_SR_TNF) &&
              (rxpending < LPC17_40_SSP_FIFOSZ) && nwords)
         {
@@ -762,7 +763,7 @@ static void ssp_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer,
        * not empty.
        */
 
-      spiinfo("RX: rxpending: %d\n", rxpending);
+      spiinfo("RX: rxpending: %" PRId32 "\n", rxpending);
       while (ssp_getreg(priv, LPC17_40_SSP_SR_OFFSET) & SSP_SR_RNE)
         {
           data = (uint8_t)ssp_getreg(priv, LPC17_40_SSP_DR_OFFSET);