arch/arm/src/sam34/sam_emac.c: Fix syslog formats
This commit is contained in:
parent
61579ed140
commit
fbf7d7cdf9
@ -50,6 +50,7 @@
|
||||
|
||||
#include <nuttx/config.h>
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <time.h>
|
||||
@ -1018,7 +1019,7 @@ static int sam_recvframe(struct sam_emac_s *priv)
|
||||
sam_cmcc_invalidate((uintptr_t)rxdesc,
|
||||
(uintptr_t)rxdesc + sizeof(struct emac_rxdesc_s));
|
||||
|
||||
ninfo("rxndx: %d\n", rxndx);
|
||||
ninfo("rxndx: %" PRId32 "\n", rxndx);
|
||||
|
||||
while ((rxdesc->addr & EMACRXD_ADDR_OWNER) != 0)
|
||||
{
|
||||
@ -1115,7 +1116,8 @@ static int sam_recvframe(struct sam_emac_s *priv)
|
||||
/* Frame size from the EMAC */
|
||||
|
||||
dev->d_len = (rxdesc->status & EMACRXD_STA_FRLEN_MASK);
|
||||
ninfo("packet %d-%d (%d)\n", priv->rxndx, rxndx, dev->d_len);
|
||||
ninfo("packet %d-%" PRId32 " (%d)\n",
|
||||
priv->rxndx, rxndx, dev->d_len);
|
||||
|
||||
/* All data have been copied in the application frame buffer,
|
||||
* release the RX descriptor
|
||||
@ -1144,7 +1146,7 @@ static int sam_recvframe(struct sam_emac_s *priv)
|
||||
|
||||
if (pktlen < dev->d_len)
|
||||
{
|
||||
nerr("ERROR: Buffer size %d; frame size %d\n",
|
||||
nerr("ERROR: Buffer size %d; frame size %" PRId32 "\n",
|
||||
dev->d_len, pktlen);
|
||||
return -E2BIG;
|
||||
}
|
||||
@ -1471,7 +1473,7 @@ static void sam_interrupt_work(FAR void *arg)
|
||||
imr = sam_getreg(priv, SAM_EMAC_IMR);
|
||||
|
||||
pending = isr & ~(imr | EMAC_INT_UNUSED);
|
||||
ninfo("isr: %08x pending: %08x\n", isr, pending);
|
||||
ninfo("isr: %08" PRIx32 " pending: %08" PRIx32 "\n", isr, pending);
|
||||
|
||||
/* Check for the completion of a transmission. This should be done before
|
||||
* checking for received data (because receiving can cause another
|
||||
@ -1497,7 +1499,7 @@ static void sam_interrupt_work(FAR void *arg)
|
||||
clrbits = EMAC_TSR_RLE | sam_txinuse(priv);
|
||||
sam_txreset(priv);
|
||||
|
||||
nerr("ERROR: Retry Limit Exceeded TSR: %08x\n", tsr);
|
||||
nerr("ERROR: Retry Limit Exceeded TSR: %08" PRIx32 "\n", tsr);
|
||||
|
||||
regval = sam_getreg(priv, SAM_EMAC_NCR);
|
||||
regval |= EMAC_NCR_TXEN;
|
||||
@ -1508,7 +1510,7 @@ static void sam_interrupt_work(FAR void *arg)
|
||||
|
||||
if ((tsr & EMAC_TSR_COL) != 0)
|
||||
{
|
||||
nerr("ERROR: Collision occurred TSR: %08x\n", tsr);
|
||||
nerr("ERROR: Collision occurred TSR: %08" PRIx32 "\n", tsr);
|
||||
clrbits |= EMAC_TSR_COL;
|
||||
}
|
||||
|
||||
@ -1516,7 +1518,8 @@ static void sam_interrupt_work(FAR void *arg)
|
||||
|
||||
if ((tsr & EMAC_TSR_TFC) != 0)
|
||||
{
|
||||
nerr("ERROR: Transmit Frame Corruption due to AHB error: %08x\n",
|
||||
nerr("ERROR: Transmit Frame Corruption due to AHB error: "
|
||||
"%08" PRIx32 "\n",
|
||||
tsr);
|
||||
clrbits |= EMAC_TSR_TFC;
|
||||
}
|
||||
@ -1532,7 +1535,7 @@ static void sam_interrupt_work(FAR void *arg)
|
||||
|
||||
if ((tsr & EMAC_TSR_UND) != 0)
|
||||
{
|
||||
nerr("ERROR: Transmit Underrun TSR: %08x\n", tsr);
|
||||
nerr("ERROR: Transmit Underrun TSR: %08" PRIx32 "\n", tsr);
|
||||
clrbits |= EMAC_TSR_UND;
|
||||
}
|
||||
|
||||
@ -1569,7 +1572,7 @@ static void sam_interrupt_work(FAR void *arg)
|
||||
|
||||
if ((rsr & EMAC_RSR_RXOVR) != 0)
|
||||
{
|
||||
nerr("ERROR: Receiver overrun RSR: %08x\n", rsr);
|
||||
nerr("ERROR: Receiver overrun RSR: %08" PRIx32 "\n", rsr);
|
||||
clrbits |= EMAC_RSR_RXOVR;
|
||||
}
|
||||
|
||||
@ -1586,7 +1589,7 @@ static void sam_interrupt_work(FAR void *arg)
|
||||
|
||||
if ((rsr & EMAC_RSR_BNA) != 0)
|
||||
{
|
||||
nerr("ERROR: Buffer not available RSR: %08x\n", rsr);
|
||||
nerr("ERROR: Buffer not available RSR: %08" PRIx32 "\n", rsr);
|
||||
clrbits |= EMAC_RSR_BNA;
|
||||
}
|
||||
|
||||
@ -1844,8 +1847,10 @@ static int sam_ifup(struct net_driver_s *dev)
|
||||
int ret;
|
||||
|
||||
ninfo("Bringing up: %d.%d.%d.%d\n",
|
||||
dev->d_ipaddr & 0xff, (dev->d_ipaddr >> 8) & 0xff,
|
||||
(dev->d_ipaddr >> 16) & 0xff, dev->d_ipaddr >> 24);
|
||||
(int)(dev->d_ipaddr & 0xff),
|
||||
(int)((dev->d_ipaddr >> 8) & 0xff),
|
||||
(int)((dev->d_ipaddr >> 16) & 0xff),
|
||||
(int)(dev->d_ipaddr >> 24));
|
||||
|
||||
/* Configure the EMAC interface for normal operation. */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user