STM32Ethernet
Arduino Ethernet library for STM32 boards
Loading...
Searching...
No Matches
STM32Ethernet.h
Go to the documentation of this file.
1
8#ifndef ethernet_h
9#define ethernet_h
10
11#include <inttypes.h>
12#include "IPAddress.h"
13#include "EthernetClient.h"
14#include "EthernetServer.h"
15#include "Dhcp.h"
16
22
24 private:
25 IPAddress _dnsServerAddress;
26 DhcpClass *_dhcp;
27
28 public:
40 int begin(unsigned long timeout = 60000, unsigned long responseTimeout = 4000);
55 void begin(IPAddress local_ip);
64 void begin(IPAddress local_ip, IPAddress subnet);
74 void begin(IPAddress local_ip, IPAddress subnet, IPAddress gateway);
87 void begin(IPAddress local_ip, IPAddress subnet, IPAddress gateway, IPAddress dns_server);
101 int begin(uint8_t *mac_address, unsigned long timeout = 60000, unsigned long responseTimeout = 4000);
111 void begin(uint8_t *mac_address, IPAddress local_ip);
122 void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server);
133 void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server, IPAddress gateway);
147 void begin(uint8_t *mac_address, IPAddress local_ip, IPAddress dns_server, IPAddress gateway, IPAddress subnet);
148
149
160 int maintain();
168 void schedule(void);
169
175 void MACAddress(uint8_t *mac_address);
181 IPAddress localIP();
187 IPAddress subnetMask();
193 IPAddress gatewayIP();
201 IPAddress dnsServerIP();
202
210 void setMACAddress(const uint8_t *mac_address);
218 void setDnsServerIP(const IPAddress dns_server);
219
220 friend class EthernetClient;
221 friend class EthernetServer;
222};
223
225
226#endif
DHCP client declarations for the Ethernet library.
TCP client class of the Ethernet library.
TCP server class of the Ethernet library.
EthernetLinkStatus
Definition STM32Ethernet.h:17
@ Unknown
Definition STM32Ethernet.h:18
@ LinkON
Definition STM32Ethernet.h:19
@ LinkOFF
Definition STM32Ethernet.h:20
EthernetClass Ethernet
Definition STM32Ethernet.cpp:169
Definition Dhcp.h:31
Definition STM32Ethernet.h:23
IPAddress gatewayIP()
Returns the default gateway address of the interface.
Definition STM32Ethernet.cpp:154
void MACAddress(uint8_t *mac_address)
Copies the current MAC address of the Ethernet interface.
Definition STM32Ethernet.cpp:139
IPAddress dnsServerIP()
Returns the DNS server address.
Definition STM32Ethernet.cpp:159
int begin(unsigned long timeout=60000, unsigned long responseTimeout=4000)
Initialises Ethernet with the built-in MAC address and gets the network configuration from a DHCP ser...
Definition STM32Ethernet.cpp:8
void schedule(void)
Services the LwIP stack.
Definition STM32Ethernet.cpp:129
void setMACAddress(const uint8_t *mac_address)
Sets the MAC address of the Ethernet interface.
Definition STM32Ethernet.cpp:134
EthernetLinkStatus linkStatus()
Returns the Ethernet link status.
Definition STM32Ethernet.cpp:101
IPAddress subnetMask()
Returns the subnet mask of the interface.
Definition STM32Ethernet.cpp:149
IPAddress localIP()
Returns the local IP address of the interface.
Definition STM32Ethernet.cpp:144
void setDnsServerIP(const IPAddress dns_server)
Stores the DNS server address returned by dnsServerIP().
Definition STM32Ethernet.cpp:164
int maintain()
Checks the DHCP lease and reports the result of a renew or rebind.
Definition STM32Ethernet.cpp:106
Definition EthernetClient.h:16
Definition EthernetServer.h:16