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:39:01 UTC

[incubator-nuttx] 08/24: arch/arm/src/lpc54xx/lpc54_i2c_master.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 b9b97348b2cb0d897dd119113dbee5799b90d76d
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Sat Nov 28 09:33:33 2020 +0900

    arch/arm/src/lpc54xx/lpc54_i2c_master.c: Fix syslog formats
---
 arch/arm/src/lpc54xx/lpc54_i2c_master.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arch/arm/src/lpc54xx/lpc54_i2c_master.c b/arch/arm/src/lpc54xx/lpc54_i2c_master.c
index 37f94ca..20236da 100644
--- a/arch/arm/src/lpc54xx/lpc54_i2c_master.c
+++ b/arch/arm/src/lpc54xx/lpc54_i2c_master.c
@@ -46,6 +46,7 @@
 #include <nuttx/config.h>
 
 #include <sys/types.h>
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <stdlib.h>
@@ -541,7 +542,7 @@ static bool lpc54_i2c_statemachine(struct lpc54_i2cdev_s *priv)
   /* Get the state of the I2C module */
 
   mstate = (status & I2C_STAT_MSTSTATE_MASK) >> I2C_STAT_MSTSTATE_SHIFT;
-  i2cinfo("mstate=%u\n", mstate);
+  i2cinfo("mstate=%" PRIu32 "\n", mstate);
 
   if ((mstate == I2C_MASTER_STATE_ADDRNAK) ||
       (mstate == I2C_MASTER_STATE_DATANAK))
@@ -595,7 +596,7 @@ static bool lpc54_i2c_statemachine(struct lpc54_i2cdev_s *priv)
         {
           if (mstate != I2C_MASTER_STATE_TXOK)
             {
-              i2cerr("ERROR bad state=%u, expected %u\n",
+              i2cerr("ERROR bad state=%" PRIu32 ", expected %u\n",
                      mstate, I2C_MASTER_STATE_TXOK);
 
               priv->result = -EINVAL;
@@ -621,7 +622,7 @@ static bool lpc54_i2c_statemachine(struct lpc54_i2cdev_s *priv)
         {
           if (mstate != I2C_MASTER_STATE_RXAVAIL)
             {
-              i2cerr("ERROR bad state=%u, expected %u\n",
+              i2cerr("ERROR bad state=%" PRIu32 ", expected %u\n",
                      mstate, I2C_MASTER_STATE_RXAVAIL);
 
               priv->result = -EINVAL;