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
Fork of sisk_project by
Revision 0:7a4b0e7660ad, committed 2016-12-02
- Comitter:
- guzbi
- Date:
- Fri Dec 02 07:48:20 2016 +0000
- Child:
- 1:65cfd74a3ae5
- Commit message:
- Projekt ethernet
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/EthernetInterface.lib Fri Dec 02 07:48:20 2016 +0000 @@ -0,0 +1,1 @@ +https://developer.mbed.org/users/guzbi/code/EthernetInterface/#f8842a7216ff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Fri Dec 02 07:48:20 2016 +0000
@@ -0,0 +1,31 @@
+#include "mbed.h"
+#include "EthernetInterface.h"
+
+int main() {
+
+ EthernetInterface eth;
+ eth.init(); //Use DHCP
+ eth.connect();
+
+ while(1) {
+ if((int)phy_link_status()){
+ printf("Cable is connected\n");
+ if((int)phy_get_duplex())
+ printf("Full duplex\n");
+ else
+ printf("Half duplex\n");
+ if((int)phy_get_speed())
+ printf("100 Mbit per second\n");
+ else
+ printf("10 Mbit per second\n");
+ }
+ else
+ printf("Cable is disconnected\n");
+
+
+ //printf("Connection status %d\n", (int)phy_link_status());
+ //printf("Duplex status %d\n", (int)phy_get_duplex());
+ //printf("Speed status %d\n", (int)phy_get_speed());
+ wait(5);
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed-rtos.lib Fri Dec 02 07:48:20 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed-rtos/#58563e6cba1e
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Fri Dec 02 07:48:20 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/0ab6a29f35bf \ No newline at end of file
