Lab 1 Program C
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