arch/arm/src/samv7/sam_emac.c: Fix syslog formats
This commit is contained in:
parent
1eb6f9c569
commit
9c71b3adbc
@ -55,6 +55,7 @@
|
||||
# define CONFIG_DEBUG_NET 1
|
||||
#endif
|
||||
|
||||
#include <inttypes.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <time.h>
|
||||
@ -1677,7 +1678,7 @@ static int sam_recvframe(struct sam_emac_s *priv, int qid)
|
||||
up_invalidate_dcache((uintptr_t)rxdesc,
|
||||
(uintptr_t)rxdesc + sizeof(struct emac_rxdesc_s));
|
||||
|
||||
ninfo("Entry rxndx[%d]: %d\n", qid, rxndx);
|
||||
ninfo("Entry rxndx[%d]: %" PRId32 "\n", qid, rxndx);
|
||||
|
||||
while ((rxdesc->addr & EMACRXD_ADDR_OWNER) != 0)
|
||||
{
|
||||
@ -1798,7 +1799,8 @@ static int sam_recvframe(struct sam_emac_s *priv, int qid)
|
||||
/* Frame size from the EMAC */
|
||||
|
||||
dev->d_len = (rxdesc->status & EMACRXD_STA_FRLEN_MASK);
|
||||
ninfo("packet %d-%d (%d)\n", xfrq->rxndx, rxndx, dev->d_len);
|
||||
ninfo("packet %d-%" PRId32 " (%d)\n",
|
||||
xfrq->rxndx, rxndx, dev->d_len);
|
||||
|
||||
/* All data have been copied in the application frame buffer,
|
||||
* release the RX descriptor(s). Loop until all descriptors
|
||||
@ -1836,7 +1838,7 @@ static int sam_recvframe(struct sam_emac_s *priv, int qid)
|
||||
xfrq->rxndx, dev->d_len);
|
||||
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);
|
||||
NETDEV_RXERRORS(&priv->dev);
|
||||
return -E2BIG;
|
||||
@ -2335,7 +2337,7 @@ static void sam_interrupt_work(FAR void *arg)
|
||||
imr = sam_getreg(priv, SAM_EMAC_IMR_OFFSET);
|
||||
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 receipt of an RX packet.
|
||||
*
|
||||
@ -2378,7 +2380,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;
|
||||
}
|
||||
|
||||
@ -2431,7 +2433,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);
|
||||
NETDEV_TXERRORS(&priv->dev);
|
||||
}
|
||||
|
||||
@ -2439,7 +2441,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);
|
||||
NETDEV_TXERRORS(&priv->dev);
|
||||
}
|
||||
@ -2706,8 +2709,10 @@ static int sam_ifup(struct net_driver_s *dev)
|
||||
|
||||
#ifdef CONFIG_NET_IPv4
|
||||
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));
|
||||
#endif
|
||||
#ifdef CONFIG_NET_IPv6
|
||||
ninfo("Bringing up: %04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
|
||||
|
Loading…
Reference in New Issue
Block a user