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.
Fork of NetServices by
Diff: drv/eth/eth_drv.cpp
- Revision:
- 4:966a0265edfc
- Parent:
- 0:ac1725ba162c
diff -r 5a6792c147c0 -r 966a0265edfc drv/eth/eth_drv.cpp
--- a/drv/eth/eth_drv.cpp Fri Nov 19 21:01:51 2010 +0000
+++ b/drv/eth/eth_drv.cpp Sun Nov 21 17:13:44 2010 +0000
@@ -185,7 +185,7 @@
netif->output = etharp_output;
netif->linkoutput = eth_output;
- pEth = new Ethernet();
+ if (!pEth) pEth = new Ethernet(); // only create Ethernet object if required
return ERR_OK;
}
@@ -201,6 +201,10 @@
pEth->address(mac);
}
+Ethernet* eth_interface() {
+ return pEth;
+}
+
#ifdef __cplusplus
};
#endif
