diff --git a/arch/arm/src/lpc54xx/lpc54_i2c_master.c b/arch/arm/src/lpc54xx/lpc54_i2c_master.c index 37f94ca35f..20236dad52 100644 --- a/arch/arm/src/lpc54xx/lpc54_i2c_master.c +++ b/arch/arm/src/lpc54xx/lpc54_i2c_master.c @@ -46,6 +46,7 @@ #include #include +#include #include #include #include @@ -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;