...
This commit is contained in:
parent
551834b320
commit
27f707298d
3 changed files with 9 additions and 9 deletions
|
@ -1,4 +1,4 @@
|
|||
C_source := rtl8139.c rckemac.c mmnif.c
|
||||
C_source := rtl8139.c rckemac.c mmnif.c util.c
|
||||
MODULE := drivers_net
|
||||
|
||||
include $(TOPDIR)/Makefile.inc
|
||||
|
|
|
@ -762,7 +762,7 @@ err_t mmnif_tx(struct netif* netif, struct pbuf* p)
|
|||
|
||||
#ifdef DEBUG_MMNIF
|
||||
DEBUGPRINTF("\n SEND 0x%.8X\n",(char*)mmnif->rx_buff + 2 + pos * 1792);
|
||||
// hex_dump(p->tot_len +2, mmnif->tx_buff[slot]);
|
||||
hex_dump(p->tot_len +2, mmnif->tx_buff[slot]);
|
||||
#endif
|
||||
|
||||
/* if driver is not in polling mode inform core that a message has arrived */
|
||||
|
@ -972,7 +972,7 @@ static void mmnif_rx(struct netif* netif)
|
|||
|
||||
#ifdef DEBUG_MMNIF
|
||||
DEBUGPRINTF("\n RECIEVED - 0x%.8X\n",data + pos);
|
||||
// hex_dump(length+2,data + pos);
|
||||
hex_dump(length+2,data + pos);
|
||||
#endif
|
||||
|
||||
/* drop the length word of the packet data since it's no longer needed*/
|
||||
|
|
|
@ -8,22 +8,22 @@ void hex_dump(unsigned n, const unsigned char* buf)
|
|||
int on_this_line = 0;
|
||||
while (n-- > 0)
|
||||
{
|
||||
fprintf(stderr, "%02X ", *buf++);
|
||||
kprintf("%02X ", *buf++);
|
||||
on_this_line += 1;
|
||||
if (on_this_line == 16 || n == 0)
|
||||
{
|
||||
int i;
|
||||
|
||||
fputs(" ", stderr);
|
||||
kputs(" ");
|
||||
|
||||
for (i = on_this_line; i < 16; i++)
|
||||
fputs(" ", stderr);
|
||||
kputs(" ");
|
||||
|
||||
for (i = on_this_line; i > 0; i--)
|
||||
fputc(isprint(buf[-i]) ? buf[-i] : '.', stderr);
|
||||
kputc(isprint(buf[-i]) ? buf[-i] : '.');
|
||||
|
||||
fputs("\n", stderr);
|
||||
kputs("\n");
|
||||
on_this_line = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue