Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: EthernetInterface mbed-rtos mbed
EthernetIf.h
00001 #ifndef ETHERNETIF_H 00002 #define ETHERNETIF_H 00003 00004 #if !defined(TARGET_LPC1768) 00005 #error The Ethernet Interface library is supported only on the mbed NXP LPC1768 00006 #endif 00007 00008 #include "rtos.h" 00009 #include "lwip/netif.h" 00010 00011 00012 class EthernetIf 00013 { 00014 static struct netif lpcNetif; 00015 static bool use_dhcp; 00016 00017 static ip_addr_t ip_n,netmask_n,gw_n; 00018 00019 static Semaphore tcpip_initialized; 00020 static void tcpip_init_done(void *arg); 00021 static void link_status_callback(struct netif *netif); 00022 static void interface_status_callback(struct netif *netif); 00023 00024 static Semaphore link_up; 00025 static Semaphore netif_up; 00026 00027 static bool link_is_up; 00028 00029 static uint32_t os_timer_cb_led[5]; 00030 static osTimerDef_t os_timer_def_led; 00031 00032 static int _init(); 00033 static void led_refresh(void const* arg); 00034 public: 00035 static int Initialize(); 00036 static int Initialize(char *ip,char *netmask,char *gw); 00037 00038 static int Connect(unsigned int timeout = 15000); 00039 static int Disconnect(); 00040 00041 static char* get_IpAddress(); 00042 static char* get_Netmask(); 00043 static char* get_Gateway(); 00044 static bool is_LinkUp(); 00045 static bool is_InterfaceUp(); 00046 00047 00048 }; 00049 00050 #include "TCPSocketConnection.h" 00051 #include "TCPSocketServer.h" 00052 00053 #include "Endpoint.h" 00054 #include "UDPSocket.h" 00055 00056 #endif //#ifndef ETHERNETIF_H
Generated on Fri Jul 15 2022 22:11:24 by
1.7.2