Upgrade UIP-library to latest. Recommend Arduino IDE 1.5.7 when compiling EtherentGateway sketch.

This commit is contained in:
Henrik Ekblad
2014-09-16 22:17:07 +02:00
parent 27885fad9b
commit 26129b06a9
51 changed files with 594 additions and 3805 deletions
+13 -13
View File
@@ -25,15 +25,20 @@
#include <Udp.h>
#include "utility/mempool.h"
extern "C" {
#include "utility/uip.h";
#include "utility/uip.h"
}
#define UIP_UDP_MAXDATALEN 1500
#define UIP_UDP_PHYH_LEN UIP_LLH_LEN+UIP_IPUDPH_LEN
#define UIP_UDP_MAXPACKETSIZE UIP_UDP_MAXDATALEN+UIP_UDP_PHYH_LEN
#ifndef UIP_UDP_NUMPACKETS
#define UIP_UDP_NUMPACKETS 5
#endif
typedef struct {
memaddress out_pos;
memhandle packet_next;
memhandle packet_in;
memhandle packet_out;
boolean send;
} uip_udp_userdata_t;
class UIPUDP : public UDP
{
@@ -41,14 +46,7 @@ class UIPUDP : public UDP
private:
struct uip_udp_conn *_uip_udp_conn;
struct appdata_t
{
memaddress out_pos;
memhandle packets_in[UIP_UDP_NUMPACKETS];
memhandle packet_in;
memhandle packet_out;
boolean send;
} appdata;
uip_udp_userdata_t appdata;
public:
UIPUDP(); // Constructor
@@ -120,7 +118,9 @@ private:
friend void uipudp_appcall(void);
static void uip_callback();
friend class UIPEthernetClass;
static void _send(uip_udp_userdata_t *data);
};
#endif