forked from ROMEO/obsw
cleanup
This commit is contained in:
parent
ae47ca8291
commit
8497fe754c
@ -166,7 +166,7 @@ a lot of data that needs to be copied, this should be set high. */
|
||||
#define PBUF_POOL_SIZE 120
|
||||
|
||||
/* PBUF_POOL_BUFSIZE: the size of each pbuf in the pbuf pool. */
|
||||
#define PBUF_POOL_BUFSIZE 2048
|
||||
#define PBUF_POOL_BUFSIZE 1600
|
||||
|
||||
/** SYS_LIGHTWEIGHT_PROT
|
||||
* define SYS_LIGHTWEIGHT_PROT in lwipopts.h if you want inter-task protection
|
||||
|
@ -273,20 +273,11 @@ s32_t xemacpsif_input(struct netif *netif)
|
||||
|
||||
/* no packet could be read, silently ignore this */
|
||||
if (p == NULL) {
|
||||
outbyte('x');
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* points to packet payload, which starts with an Ethernet header */
|
||||
ethhdr = p->payload;
|
||||
xil_printf(" %p",p->payload);
|
||||
|
||||
for (int j = 0; j < 6; j++) {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
xil_printf(" %02x", *((uint8_t *)(p->payload) + i + j * 8 ) );
|
||||
}
|
||||
xil_printf("\n");
|
||||
}
|
||||
|
||||
#if LINK_STATS
|
||||
lwip_stats.link.recv++;
|
||||
@ -307,16 +298,13 @@ s32_t xemacpsif_input(struct netif *netif)
|
||||
#endif /* PPPOE_SUPPORT */
|
||||
/* full packet send to tcpip_thread to process */
|
||||
if (netif->input(p, netif) != ERR_OK) {
|
||||
outbyte('y');
|
||||
LWIP_DEBUGF(NETIF_DEBUG, ("xemacpsif_input: IP input error\r\n"));
|
||||
pbuf_free(p);
|
||||
p = NULL;
|
||||
}
|
||||
outbyte('o');
|
||||
break;
|
||||
|
||||
default:
|
||||
outbyte('z');
|
||||
for (int i = 0; i < 14; i++) {
|
||||
xil_printf(" %02x", *((uint8_t *)(p->payload) + i ) );
|
||||
}
|
||||
|
@ -115,17 +115,6 @@ volatile u32_t notifyinfo[4*XLWIP_CONFIG_N_TX_DESC];
|
||||
* for BDs. The rest 768 KB of memory is just unused.
|
||||
*********************************************************************************/
|
||||
|
||||
void printInt(int i) {
|
||||
outbyte(i / 100 + 0x30);
|
||||
i = i % 100;
|
||||
outbyte(i / 10 + 0x30);
|
||||
i = i %10;
|
||||
outbyte(i + 0x30);
|
||||
outbyte(10);
|
||||
|
||||
}
|
||||
|
||||
|
||||
#if defined __aarch64__
|
||||
u8_t emac_bd_space[0x200000] __attribute__ ((aligned (0x200000)));
|
||||
#else
|
||||
@ -302,7 +291,6 @@ void xemacps_process_sent_bds(xemacpsif_s *xemacpsif, XEmacPs_BdRing *txring)
|
||||
|
||||
void emacps_send_handler(void *arg)
|
||||
{
|
||||
outbyte('t');
|
||||
struct xemac_s *xemac;
|
||||
xemacpsif_s *xemacpsif;
|
||||
XEmacPs_BdRing *txringptr;
|
||||
@ -510,7 +498,6 @@ void setup_rx_bds(xemacpsif_s *xemacpsif, XEmacPs_BdRing *rxring)
|
||||
|
||||
void emacps_recv_handler(void *arg)
|
||||
{
|
||||
outbyte('r');
|
||||
struct pbuf *p;
|
||||
XEmacPs_Bd *rxbdset, *curbdptr;
|
||||
struct xemac_s *xemac;
|
||||
@ -551,13 +538,10 @@ void emacps_recv_handler(void *arg)
|
||||
}
|
||||
|
||||
for (k = 0, curbdptr=rxbdset; k < bd_processed; k++) {
|
||||
outbyte('p');
|
||||
|
||||
bdindex = XEMACPS_BD_TO_INDEX(rxring, curbdptr);
|
||||
p = (struct pbuf *)rx_pbufs_storage[index + bdindex];
|
||||
|
||||
xil_printf("reading bd index %i bdindex %i p %p payload %p\n", index, bdindex, p, p->payload);
|
||||
|
||||
/*
|
||||
* Adjust the buffer size to the actual number of bytes received.
|
||||
*/
|
||||
@ -566,7 +550,6 @@ void emacps_recv_handler(void *arg)
|
||||
#else
|
||||
rx_bytes = XEmacPs_BdGetLength(curbdptr);
|
||||
#endif
|
||||
printInt(rx_bytes);
|
||||
pbuf_realloc(p, rx_bytes);
|
||||
|
||||
/* Invalidate RX frame before queuing to handle
|
||||
@ -792,8 +775,6 @@ XStatus init_dma(struct xemac_s *xemac)
|
||||
#endif
|
||||
XEmacPs_BdSetAddressRx(rxbd, (UINTPTR)p->payload);
|
||||
|
||||
xil_printf("setting bd index %i bdindex %i p %p payload %p\n", index, bdindex, p, p->payload);
|
||||
|
||||
rx_pbufs_storage[index + bdindex] = (UINTPTR)p;
|
||||
}
|
||||
XEmacPs_SetQueuePtr(&(xemacpsif->emacps), xemacpsif->emacps.RxBdRing.BaseBdAddr, 0, XEMACPS_RECV);
|
||||
|
@ -213,7 +213,7 @@ int main_thread(void * _) {
|
||||
udp_recv(udpecho_raw_pcb,udp_receiver,NULL);
|
||||
|
||||
while (1) {
|
||||
sys_check_timeouts();
|
||||
//sys_check_timeouts();
|
||||
|
||||
vTaskDelay(200 * portTICK_PERIOD_MS);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user