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 571f31c6729fc51d380ce39e7966b03c359b538e Author: YAMAMOTO Takashi <yamam...@midokura.com> AuthorDate: Sat Nov 28 10:17:51 2020 +0900 boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_spi1.c: Fix syslog formats --- boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_spi1.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_spi1.c b/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_spi1.c index 736b012..370e50f 100644 --- a/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_spi1.c +++ b/boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_spi1.c @@ -64,6 +64,7 @@ #include <nuttx/config.h> #include <sys/types.h> +#include <inttypes.h> #include <stdint.h> #include <stdbool.h> #include <assert.h> @@ -286,7 +287,8 @@ static uint32_t spi_setfrequency(FAR struct spi_dev_s *dev, divisor = (divisor + 1) & ~1; putreg8(divisor, LPC214X_SPI1_CPSR); - spiinfo("Frequency %d->%d\n", frequency, LPC214X_PCLKFREQ / divisor); + spiinfo("Frequency %" PRId32 "->%" PRId32 "\n", + frequency, (uint32_t)(LPC214X_PCLKFREQ / divisor)); return LPC214X_PCLKFREQ / divisor; } @@ -382,7 +384,7 @@ static uint32_t spi_send(FAR struct spi_dev_s *dev, uint32_t wd) /* Get the value from the RX FIFO and return it */ regval = getreg16(LPC214X_SPI1_DR); - spiinfo("%04x->%04x\n", wd, regval); + spiinfo("%04" PRIx32 "->%04x\n", wd, regval); return regval; } @@ -499,7 +501,7 @@ static void spi_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: %d\n", rxpending, nwords); while ((getreg8(LPC214X_SPI1_SR) & LPC214X_SPI1SR_TNF) && (rxpending < LPC214X_SPI1_FIFOSZ) && nwords) { @@ -510,7 +512,7 @@ static void spi_recvblock(FAR struct spi_dev_s *dev, FAR void *buffer, /* Now, read RX data from the RX FIFO while RX FIFO is not empty */ - spiinfo("RX: rxpending: %d\n", rxpending); + spiinfo("RX: rxpending: %" PRId32 "\n", rxpending); while (getreg8(LPC214X_SPI1_SR) & LPC214X_SPI1SR_RNE) { *ptr++ = (uint8_t)getreg16(LPC214X_SPI1_DR);