soc/software/libnet: add debug defines on microudp

This commit is contained in:
Florent Kermarrec 2015-12-07 12:03:36 +01:00
parent 4fed1cc7a7
commit 3191533889
1 changed files with 20 additions and 0 deletions

View File

@ -9,6 +9,9 @@
#include <net/microudp.h>
//#define DEBUG_MICROUDP_TX
//#define DEBUG_MICROUDP_TX
#define ETHERTYPE_ARP 0x0806
#define ETHERTYPE_IP 0x0800
@ -132,6 +135,15 @@ static void send_packet(void)
txbuffer->raw[txlen+3] = (crc & 0xff000000) >> 24;
txlen += 4;
#endif
#ifdef DEBUG_MICROUDP_TX
int j;
printf(">>>> txlen : %d\n", txlen);
for(j=0;j<txlen;j++)
printf("%02x",txbuffer->raw[j]);
printf("\n");
#endif
ethmac_sram_reader_slot_write(txslot);
ethmac_sram_reader_length_write(txlen);
while(!(ethmac_sram_reader_ready_read()));
@ -357,6 +369,14 @@ static void process_frame(void)
{
flush_cpu_dcache();
#ifdef DEBUG_MICROUDP_RX
int j;
printf("<<< rxlen : %d\n", rxlen);
for(j=0;j<rxlen;j++)
printf("%02x", rxbuffer->raw[j]);
printf("\n");
#endif
#ifndef HW_PREAMBLE_CRC
int i;
for(i=0;i<7;i++)