Data Sheet
© Copyright 2013 WIZnet Co.,Ltd. All rights reserved. 
64
iEthernet 
W5200
if ( (dst_mask + len) > (gSn_TX_MASK + 1) ) 
{ 
/* copy upper_size bytes of source_addr to destination_address */ 
upper_size = (gSn_TX_MASK + 1) – dst_mask; 
memcpy((0x0000 + source_addr), (0x0000 + dst_ptr), upper_size); 
/* update source_addr*/ 
source_addr += upper_size; 
/* copy left_size bytes of source_addr to gSn_TX_BASE */ 
left_size = len – upper_size; 
memcpy( source_addr, gSn_TX_BASE, left_size); 
} 
else 
{ 
/* copy len bytes of source_addr to dst_ptr */ 
memcpy( source_addr, dst_ptr, len);   
} 
/* increase Sn_TX_WR as length of len */ 
Sn_TX_WR0 += send_size; 
/* set SEND command */ 
Sn_CR = SEND; 
} 
Check complete sending / Timeout 
Since the host manages all protocol process for data communication, timeout cannot 
occur. 
{ 
/* check SEND command completion */ 
while(S0_IR(SENDOK)==‘0’);    /* wait interrupt of SEND completion */ 
S0_IR(SENDOK) = ‘1’;                /* clear previous interrupt of SEND completion */ 
} 
Check finished / SOCKET close 
Refer to the “5.2.2.1 Unicast & Broadcast.” 










