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 "EthernetInterface.h" 00003 00004 LocalFileSystem local("local"); 00005 void func(); 00006 EthernetInterface *net; 00007 00008 int main() 00009 { 00010 func(); 00011 net = new EthernetInterface(); 00012 func(); 00013 if(net->connect()) { 00014 printf("Error!@EthernetInterface::connect()\r\n"); 00015 } else { 00016 printf("IP Address is %s\r\n", net->get_ip_address()); 00017 } 00018 func(); 00019 } 00020 00021 00022 void func() 00023 { 00024 static int i = 1; 00025 printf("-------test of fopen()#%d----\r\n", i); 00026 if(fopen("/local/test.txt", "r")==NULL) 00027 printf("File could not open\r\n"); 00028 else 00029 printf("File was opened successfully.\r\n"); 00030 i++; 00031 }
Generated on Tue Jul 12 2022 22:53:43 by
1.7.2