disable ZY1000's UART forwarding test code.

__archive__
Øyvind Harboe 2009-10-22 10:22:34 +02:00
parent fcf1301e52
commit 3537c368fe
1 changed files with 10 additions and 1 deletions

View File

@ -625,6 +625,9 @@ void setNoDelay(int session, int flag)
#endif #endif
} }
#define TEST_TCPIP() 0
#if TEST_TCPIP
struct struct
{ {
int req; int req;
@ -633,6 +636,7 @@ struct
int actual2; int actual2;
} tcpipSent[512 * 1024]; } tcpipSent[512 * 1024];
int cur; int cur;
#endif
static void zylinjtag_uart(cyg_addrword_t data) static void zylinjtag_uart(cyg_addrword_t data)
{ {
@ -697,7 +701,9 @@ static void zylinjtag_uart(cyg_addrword_t data)
size_t pos, pos2; size_t pos, pos2;
pos = 0; pos = 0;
pos2 = 0; pos2 = 0;
#if TEST_TCPIP
cur = 0; cur = 0;
#endif
for (;;) for (;;)
{ {
fd_set write_fds; fd_set write_fds;
@ -798,6 +804,7 @@ static void zylinjtag_uart(cyg_addrword_t data)
} }
y2 = written; y2 = written;
} }
#if TEST_TCPIP
if (cur < 1024) if (cur < 1024)
{ {
tcpipSent[cur].req = x; tcpipSent[cur].req = x;
@ -806,11 +813,12 @@ static void zylinjtag_uart(cyg_addrword_t data)
tcpipSent[cur].actual2 = y2; tcpipSent[cur].actual2 = y2;
cur++; cur++;
} }
#endif
} }
closeSession: close(session); closeSession: close(session);
close(serHandle); close(serHandle);
#if TEST_TCPIP
int i; int i;
for (i = 0; i < 1024; i++) for (i = 0; i < 1024; i++)
{ {
@ -818,6 +826,7 @@ static void zylinjtag_uart(cyg_addrword_t data)
tcpipSent[i].req2, tcpipSent[i].actual2); tcpipSent[i].req2, tcpipSent[i].actual2);
} }
#endif
} }
close(fd); close(fd);