@@ -184,8 +184,7 @@ UIPEthernetClass::tick()
184
184
#ifdef UIPETHERNET_DEBUG
185
185
if (in_packet != NOBLOCK)
186
186
{
187
- Serial.print (F (" --------------\n receivePacket: " ));
188
- Serial.println (in_packet);
187
+ Serial.println (F (" --------------\n packet received" ));
189
188
}
190
189
#endif
191
190
}
@@ -201,7 +200,9 @@ UIPEthernetClass::tick()
201
200
uip_packet = in_packet; // required for upper_layer_checksum of in_packet!
202
201
#ifdef UIPETHERNET_DEBUG
203
202
Serial.print (F (" readPacket type IP, uip_len: " ));
204
- Serial.println (uip_len);
203
+ Serial.print (uip_len);
204
+ Serial.print (F (" , bits: " ));
205
+ Serial.println (BUF->flags , BIN);
205
206
#endif
206
207
uip_arp_ipin ();
207
208
uip_input ();
@@ -227,8 +228,7 @@ UIPEthernetClass::tick()
227
228
if (in_packet != NOBLOCK && (packetstate & UIPETHERNET_FREEPACKET))
228
229
{
229
230
#ifdef UIPETHERNET_DEBUG
230
- Serial.print (F (" freeing packet: " ));
231
- Serial.println (in_packet);
231
+ Serial.println (F (" freeing received packet" ));
232
232
#endif
233
233
Enc28J60Network::freePacket ();
234
234
in_packet = NOBLOCK;
@@ -243,17 +243,16 @@ UIPEthernetClass::tick()
243
243
244
244
for (int i = 0 ; i < UIP_CONNS; i++)
245
245
{
246
- uip_conn = &uip_conns[i] ;
247
- uip_process (UIP_TIMER);
248
- // If the above function invocation resulted in data that
249
- // should be sent out on the Enc28J60Network, the global variable
250
- // uip_len is set to a value > 0.
251
- if (uip_len > 0 )
252
- {
253
- uip_arp_out ();
254
- network_send ();
246
+ uip_periodic (i) ;
247
+ // If the above function invocation resulted in data that
248
+ // should be sent out on the Enc28J60Network, the global variable
249
+ // uip_len is set to a value > 0.
250
+ if (uip_len > 0 )
251
+ {
252
+ uip_arp_out ();
253
+ network_send ();
254
+ }
255
255
}
256
- }
257
256
#if UIP_UDP
258
257
for (int i = 0 ; i < UIP_UDP_CONNS; i++)
259
258
{
@@ -291,7 +290,9 @@ boolean UIPEthernetClass::network_send()
291
290
Serial.print (F (" Enc28J60Network_send uip_buf (uip_len): " ));
292
291
Serial.print (uip_len);
293
292
Serial.print (F (" , packet: " ));
294
- Serial.println (uip_packet);
293
+ Serial.print (uip_packet);
294
+ Serial.print (F (" , bits: " ));
295
+ Serial.println (BUF->flags , BIN);
295
296
#endif
296
297
Enc28J60Network::writePacket (uip_packet, UIP_SENDBUFFER_OFFSET,uip_buf,uip_len);
297
298
goto sendandfree;
0 commit comments