boards/arm/lpc214x/mcu123-lpc214x/src/lpc2148_spi1.c: Fix syslog formats
This commit is contained in:
parent
b15da3b18d
commit
571f31c672
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user