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 mbed by
Diff: Ethernet.h
- Revision:
- 20:029aa53d7323
- Parent:
- 18:b3c9f16cbb96
- Child:
- 27:7110ebee3484
--- a/Ethernet.h Tue May 18 16:04:21 2010 +0000
+++ b/Ethernet.h Thu Jun 03 11:17:50 2010 +0000
@@ -52,6 +52,14 @@
*/
virtual ~Ethernet();
+ enum Mode {
+ AutoNegotiate
+ , HalfDuplex10
+ , FullDuplex10
+ , HalfDuplex100
+ , FullDuplex100
+ };
+
/* Function: write
* Writes into an outgoing ethernet packet.
*
@@ -139,6 +147,20 @@
*/
int link();
+ /* Function: set_link
+ * Sets the speed and duplex parameters of an ethernet link
+ *
+ * Variables:
+ * mode - the speed and duplex mode to set the link to:
+ *
+ * > AutoNegotiate Auto negotiate speed and duplex
+ * > HalfDuplex10 10 Mbit, half duplex
+ * > FullDuplex10 10 Mbit, full duplex
+ * > HalfDuplex100 100 Mbit, half duplex
+ * > FullDuplex100 100 Mbit, full duplex
+ */
+ void set_link(Mode mode);
+
};
} // namespace mbed
