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
+11 -6
View File
@@ -21,6 +21,7 @@
#define UIPCLIENT_H
#include "ethernet_comp.h"
#include "Print.h"
#import "Client.h"
#import "utility/mempool.h"
@@ -36,9 +37,9 @@ extern "C" {
#define UIP_CLIENT_CONNECTED 0x10
#define UIP_CLIENT_CLOSE 0x20
#define UIP_CLIENT_CLOSED 0x40
#define UIP_CLIENT_REMOTECLOSED 0x40
#define UIP_CLIENT_RESTART 0x80
#define UIP_CLIENT_STATEFLAGS (UIP_CLIENT_CONNECTED | UIP_CLIENT_CLOSE | UIP_CLIENT_CLOSED | UIP_CLIENT_RESTART)
#define UIP_CLIENT_STATEFLAGS (UIP_CLIENT_CONNECTED | UIP_CLIENT_CLOSE | UIP_CLIENT_REMOTECLOSED | UIP_CLIENT_RESTART)
#define UIP_CLIENT_SOCKETS ~UIP_CLIENT_STATEFLAGS
typedef uint8_t uip_socket_ptr;
@@ -76,6 +77,8 @@ public:
int peek();
void flush();
using Print::write;
private:
UIPClient(struct uip_conn *_conn);
UIPClient(uip_userdata_t* conn_data);
@@ -84,21 +87,23 @@ private:
static uip_userdata_t all_data[UIP_CONNS];
static uip_userdata_t* _allocateData();
static uip_userdata_t* _getData(struct uip_conn * conn);
static size_t _write(uip_userdata_t *,const uint8_t *buf, size_t size);
static int _available(uip_userdata_t *);
static memhandle * _currentBlock(memhandle* blocks);
static uint8_t _currentBlock(memhandle* blocks);
static void _eatBlock(memhandle* blocks);
static void _flushBlocks(memhandle* blocks);
#ifdef UIPETHERNET_DEBUG_CLIENT
static void _dumpAllData();
#endif
friend class UIPEthernetClass;
friend class UIPServer;
friend void uipclient_appcall(void);
static void uip_callback();
};
#endif