W5200(WIZ820io) network interface
Embed:
(wiki syntax)
Show/hide line numbers
W5200NetIf.h
Go to the documentation of this file.
00001 // W5200NetIf.h 2012/4/19 00002 /** \file 00003 W5200 network interface header file 00004 */ 00005 #ifndef W5200_NETIF_H 00006 #define W5200_NETIF_H 00007 #include "MyNetIf.h" 00008 00009 ///W5200 network interface return codes 00010 enum W5200Err 00011 { 00012 __W5200_MIN = -0xFFFF, 00013 W5200_TIMEOUT, ///<Timeout during setup 00014 W5200_OK = 0 ///<Success 00015 }; 00016 00017 ///W5200 network interface 00018 class W5200NetIf : public MyNetIf { 00019 public: 00020 ///Instantiates the Interface and register it against the stack, DHCP will be used 00021 W5200NetIf(); //W/ DHCP 00022 ///Instantiates the Interface and register it against the stack, DHCP will not be used 00023 /** 00024 IpAddr is a container class that can be constructed with either 4 bytes or no parameters for a null IP address. 00025 */ 00026 W5200NetIf(IpAddr ip, IpAddr netmask, IpAddr gateway, IpAddr dns); //W/o DHCP 00027 W5200Err IPrenew(int timeout_ms = 15000); 00028 W5200Err IPrelease(int timeout_ms = 15000); 00029 ///Brings the interface up 00030 /** 00031 Uses DHCP if necessary 00032 @param timeout_ms : You can set the timeout parameter in milliseconds, if not it defaults to 15s 00033 @return : W5200_OK on success or W5200_TIMEOUT on timeout 00034 */ 00035 W5200Err setup(int timeout_ms = 15000); 00036 IpAddr m_dns; 00037 private: 00038 bool m_useDhcp; 00039 IpAddr m_netmask; 00040 IpAddr m_gateway; 00041 const char* m_hostname; 00042 }; 00043 #endif //W5200_NETIF_H
Generated on Tue Jul 12 2022 19:58:52 by 1.7.2