@@ -171,7 +171,7 @@ UIPClient::_write(uip_userdata_t* u, const uint8_t *buf, size_t size)
171
171
if (u->packets_out [p] == NOBLOCK)
172
172
{
173
173
newpacket:
174
- u->packets_out [p] = UIPEthernetClass::network. allocBlock (UIP_SOCKET_DATALEN);
174
+ u->packets_out [p] = Enc28J60Network:: allocBlock (UIP_SOCKET_DATALEN);
175
175
if (u->packets_out [p] == NOBLOCK)
176
176
{
177
177
#if UIP_ATTEMPTS_ON_WRITE > 0
@@ -197,7 +197,7 @@ UIPClient::_write(uip_userdata_t* u, const uint8_t *buf, size_t size)
197
197
Serial.write ((uint8_t *)buf+size-remain,remain);
198
198
Serial.println (F (" '" ));
199
199
#endif
200
- written = UIPEthernetClass::network. writePacket (u->packets_out [p],u->out_pos ,(uint8_t *)buf+size-remain,remain);
200
+ written = Enc28J60Network:: writePacket (u->packets_out [p],u->out_pos ,(uint8_t *)buf+size-remain,remain);
201
201
remain -= written;
202
202
u->out_pos +=written;
203
203
if (remain > 0 )
@@ -235,7 +235,7 @@ UIPClient::_available(uip_userdata_t *u)
235
235
int len = 0 ;
236
236
for (uint8_t i = 0 ; i < UIP_SOCKET_NUMPACKETS; i++)
237
237
{
238
- len += UIPEthernetClass::network. blockSize (u->packets_in [i]);
238
+ len += Enc28J60Network:: blockSize (u->packets_in [i]);
239
239
}
240
240
return len;
241
241
}
@@ -251,8 +251,8 @@ UIPClient::read(uint8_t *buf, size_t size)
251
251
uint16_t read ;
252
252
do
253
253
{
254
- read = UIPEthernetClass::network. readPacket (data->packets_in [0 ],0 ,buf+size-remain,remain);
255
- if (read == UIPEthernetClass::network. blockSize (data->packets_in [0 ]))
254
+ read = Enc28J60Network:: readPacket (data->packets_in [0 ],0 ,buf+size-remain,remain);
255
+ if (read == Enc28J60Network:: blockSize (data->packets_in [0 ]))
256
256
{
257
257
remain -= read ;
258
258
_eatBlock (&data->packets_in [0 ]);
@@ -270,7 +270,7 @@ UIPClient::read(uint8_t *buf, size_t size)
270
270
}
271
271
else
272
272
{
273
- UIPEthernetClass::network. resizeBlock (data->packets_in [0 ],read );
273
+ Enc28J60Network:: resizeBlock (data->packets_in [0 ],read );
274
274
break ;
275
275
}
276
276
}
@@ -297,7 +297,7 @@ UIPClient::peek()
297
297
if (data->packets_in [0 ] != NOBLOCK)
298
298
{
299
299
uint8_t c;
300
- UIPEthernetClass::network. readPacket (data->packets_in [0 ],0 ,&c,1 );
300
+ Enc28J60Network:: readPacket (data->packets_in [0 ],0 ,&c,1 );
301
301
return c;
302
302
}
303
303
}
@@ -315,12 +315,6 @@ UIPClient::flush()
315
315
316
316
void
317
317
uipclient_appcall (void )
318
- {
319
- UIPClient::uip_callback ();
320
- }
321
-
322
- void
323
- UIPClient::uip_callback ()
324
318
{
325
319
uip_userdata_t *u = (uip_userdata_t *)uip_conn->appstate ;
326
320
if (!u && uip_connected ())
@@ -329,7 +323,7 @@ UIPClient::uip_callback()
329
323
Serial.println (F (" UIPClient uip_connected" ));
330
324
_dumpAllData ();
331
325
#endif
332
- u = (uip_userdata_t *) _allocateData ();
326
+ u = (uip_userdata_t *) UIPClient:: _allocateData ();
333
327
if (u)
334
328
{
335
329
uip_conn->appstate = u;
@@ -353,7 +347,7 @@ UIPClient::uip_callback()
353
347
#endif
354
348
if (uip_len && !(u->state & (UIP_CLIENT_CLOSE | UIP_CLIENT_REMOTECLOSED)))
355
349
{
356
- memhandle newPacket = UIPEthernetClass::network. allocBlock (uip_len);
350
+ memhandle newPacket = Enc28J60Network:: allocBlock (uip_len);
357
351
if (newPacket != NOBLOCK)
358
352
{
359
353
for (uint8_t i=0 ; i < UIP_SOCKET_NUMPACKETS; i++)
@@ -362,7 +356,7 @@ UIPClient::uip_callback()
362
356
{
363
357
if (i == UIP_SOCKET_NUMPACKETS-1 )
364
358
uip_stop ();
365
- UIPEthernetClass::network. copyPacket (newPacket,0 ,UIPEthernetClass::in_packet,((uint8_t *)uip_appdata)-uip_buf,uip_len);
359
+ Enc28J60Network:: copyPacket (newPacket,0 ,UIPEthernetClass::in_packet,((uint8_t *)uip_appdata)-uip_buf,uip_len);
366
360
u->packets_in [i] = newPacket;
367
361
goto finish_newdata;
368
362
}
@@ -386,7 +380,7 @@ UIPClient::uip_callback()
386
380
_dumpAllData ();
387
381
#endif
388
382
// drop outgoing packets not sent yet:
389
- _flushBlocks (&u->packets_out [0 ]);
383
+ UIPClient:: _flushBlocks (&u->packets_out [0 ]);
390
384
if (u->packets_in [0 ] != NOBLOCK)
391
385
{
392
386
((uip_userdata_closed_t *)u)->lport = uip_conn->lport ;
@@ -407,7 +401,7 @@ UIPClient::uip_callback()
407
401
#ifdef UIPETHERNET_DEBUG_CLIENT
408
402
Serial.println (F (" UIPClient uip_acked" ));
409
403
#endif
410
- _eatBlock (&u->packets_out [0 ]);
404
+ UIPClient:: _eatBlock (&u->packets_out [0 ]);
411
405
}
412
406
if (uip_poll () || uip_rexmit ())
413
407
{
@@ -421,18 +415,18 @@ UIPClient::uip_callback()
421
415
uip_len = u->out_pos ;
422
416
if (uip_len > 0 )
423
417
{
424
- UIPEthernetClass::network. resizeBlock (u->packets_out [0 ],0 ,uip_len);
418
+ Enc28J60Network:: resizeBlock (u->packets_out [0 ],0 ,uip_len);
425
419
}
426
420
}
427
421
else
428
- uip_len = UIPEthernetClass::network. blockSize (u->packets_out [0 ]);
422
+ uip_len = Enc28J60Network:: blockSize (u->packets_out [0 ]);
429
423
if (uip_len > 0 )
430
424
{
431
425
UIPEthernetClass::uip_hdrlen = ((uint8_t *)uip_appdata)-uip_buf;
432
- UIPEthernetClass::uip_packet = UIPEthernetClass::network. allocBlock (UIPEthernetClass::uip_hdrlen+uip_len);
426
+ UIPEthernetClass::uip_packet = Enc28J60Network:: allocBlock (UIPEthernetClass::uip_hdrlen+uip_len);
433
427
if (UIPEthernetClass::uip_packet != NOBLOCK)
434
428
{
435
- UIPEthernetClass::network. copyPacket (UIPEthernetClass::uip_packet,UIPEthernetClass::uip_hdrlen,u->packets_out [0 ],0 ,uip_len);
429
+ Enc28J60Network:: copyPacket (UIPEthernetClass::uip_packet,UIPEthernetClass::uip_hdrlen,u->packets_out [0 ],0 ,uip_len);
436
430
UIPEthernetClass::packetstate |= UIPETHERNET_SENDPACKET;
437
431
uip_send (uip_appdata,uip_len);
438
432
}
@@ -513,7 +507,7 @@ UIPClient::_eatBlock(memhandle* block)
513
507
}
514
508
Serial.print (F (" -> " ));
515
509
#endif
516
- UIPEthernetClass::network. freeBlock (block[0 ]);
510
+ Enc28J60Network:: freeBlock (block[0 ]);
517
511
for (uint8_t i = 0 ; i < UIP_SOCKET_NUMPACKETS-1 ; i++)
518
512
{
519
513
block[i] = block[i+1 ];
@@ -534,7 +528,7 @@ UIPClient::_flushBlocks(memhandle* block)
534
528
{
535
529
for (uint8_t i = 0 ; i < UIP_SOCKET_NUMPACKETS; i++)
536
530
{
537
- UIPEthernetClass::network. freeBlock (block[i]);
531
+ Enc28J60Network:: freeBlock (block[i]);
538
532
}
539
533
}
540
534
0 commit comments