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.
main.cpp
00001 #include "mbed.h" 00002 #include "EthernetNetIf.h" 00003 00004 DigitalOut myled(LED1); 00005 00006 EthernetNetIf eth; 00007 00008 int main() { 00009 EthernetErr ethErr = eth.setup(); 00010 if (ethErr) { 00011 printf("Error %d in setup on DHCP.\r\n", ethErr); 00012 return -1; 00013 } 00014 printf("Trying to get IP address\r\n"); 00015 IpAddr ip = eth.getIp(); 00016 printf("mbed IP Address is %d.%d.%d.%d\r\n", ip[0], ip[1], ip[2], ip[3]); 00017 00018 printf("Entering while loop Net::poll()ing\r\n"); 00019 while (1) { 00020 Net::poll(); 00021 } 00022 }
Generated on Tue Jul 12 2022 11:17:51 by
