den syu / Mbed 2 deprecated prgETH_1

Dependencies:   mbed mbed-rtos EthernetInterface

Files at this revision

API Documentation at this revision

Comitter:
esemi00
Date:
Wed Jan 20 05:03:45 2021 +0000
Parent:
14:72be2b8b7f24
Commit message:
esemi00

Changed in this revision

EthernetInterface.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show diff for this revision Revisions of this file
mainETH_1.cpp Show annotated file Show diff for this revision Revisions of this file
mbed-rtos.lib Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- a/EthernetInterface.lib	Wed May 14 15:07:26 2014 +0000
+++ b/EthernetInterface.lib	Wed Jan 20 05:03:45 2021 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/EthernetInterface/#097a9996f8d5
+http://mbed.org/users/mbed_official/code/EthernetInterface/#183490eb1b4a
--- a/main.cpp	Wed May 14 15:07:26 2014 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#include "mbed.h"
-#include "EthernetInterface.h"
-
-int main() {
-    EthernetInterface eth;
-    eth.init(); //Use DHCP
-    eth.connect();
-    printf("IP Address is %s\n", eth.getIPAddress());
-    
-    TCPSocketConnection sock;
-    sock.connect("mbed.org", 80);
-    
-    char http_cmd[] = "GET /media/uploads/mbed_official/hello.txt HTTP/1.0\n\n";
-    sock.send_all(http_cmd, sizeof(http_cmd)-1);
-    
-    char buffer[300];
-    int ret;
-    while (true) {
-        ret = sock.receive(buffer, sizeof(buffer)-1);
-        if (ret <= 0)
-            break;
-        buffer[ret] = '\0';
-        printf("Received %d chars from server:\n%s\n", ret, buffer);
-    }
-      
-    sock.close();
-    
-    eth.disconnect();
-    
-    while(1) {}
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mainETH_1.cpp	Wed Jan 20 05:03:45 2021 +0000
@@ -0,0 +1,20 @@
+//プログラム eth-1.cpp
+#include "mbed.h"
+#include "EthernetInterface.h"
+
+Serial pc(USBTX,USBRX);
+EthernetInterface eth;
+
+int main()
+{
+    eth.init(); //Use DHCP
+    pc.printf("MAC Address  is %s\n", eth.getMACAddress());
+
+    eth.connect();
+    pc.printf("IP  Address  is %s\n", eth.getIPAddress());
+    pc.printf("Network Mask is %s\n", eth.getNetworkMask());
+  
+    eth.disconnect();  
+
+}
+
--- a/mbed-rtos.lib	Wed May 14 15:07:26 2014 +0000
+++ b/mbed-rtos.lib	Wed Jan 20 05:03:45 2021 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed-rtos/#5dfe422a963d
+http://mbed.org/users/mbed_official/code/mbed-rtos/#58563e6cba1e
--- a/mbed.bld	Wed May 14 15:07:26 2014 +0000
+++ b/mbed.bld	Wed Jan 20 05:03:45 2021 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/8a40adfe8776
\ No newline at end of file
+https://os.mbed.com/users/mbed_official/code/mbed/builds/176b8275d35d
\ No newline at end of file