-
Notifications
You must be signed in to change notification settings - Fork 27
/
Eth_W5X00.h
42 lines (32 loc) · 998 Bytes
/
Eth_W5X00.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef __ETH_W5X00_H__
#define __ETH_W5X00_H__
#include <Arduino.h>
#include <SoftwareSerial.h>
#include "utility/HW_Eth_Ethernet.h"
#include "utility/HW_Eth_EthernetClient.h"
#include "IoTgo_config.h"
#include "Net_NetInterface.h"
#ifdef NET_USE_W5X00
/**
* Provides TCP service for Application Layer of Network Protocol Stack.
*
* The implemetation is based on W5100/W5200/W5500.
*
* @ingroup NetInterface
*/
class EthW5X00:public NetInterface, public EthernetClient, public EthernetClass
{
public: /* Implementation of NetInterface */
virtual int32_t createTCPConnection(String host, uint32_t port);
virtual int32_t send(String data);
virtual int32_t recv(char *buffer, uint32_t length);
virtual int32_t releaseTCPConnection(void);
public: /* Initial the EthW5X00 class*/
bool configW5X00(uint8_t *mac);
private: /* The private funtion of EthW5X00 class*/
//void reset();
//IPAddress StringToIp(String str_ip);
bool Initial(uint8_t *mac);
};
#endif
#endif