@@ -32,6 +32,11 @@ namespace mbed {
3232 */
3333
3434/* * An ethernet interface, to use with the ethernet pins.
35+ *
36+ * @deprecated
37+ * EthInterface is now the preferred way to get an Ethernet object.
38+ * Alternatively, use NetworkInterface to get an instance of an appropriate network
39+ * interface (WiFi or Ethernet).
3540 *
3641 * @note Synchronization level: Not protected
3742 *
@@ -72,10 +77,12 @@ class
7277
7378 /* * Initialize the ethernet interface.
7479 */
80+ MBED_DEPRECATED (" The class has been deprecated and will be removed in the future." )
7581 Ethernet ();
7682
7783 /* * Powers the hardware down.
7884 */
85+ MBED_DEPRECATED (" The class has been deprecated and will be removed in the future." )
7986 virtual ~Ethernet ();
8087
8188 enum Mode {
96103 * @returns
97104 * The number of written bytes.
98105 */
106+ MBED_DEPRECATED (" The class has been deprecated and will be removed in the future." )
99107 int write (const char *data, int size);
100108
101109 /* * Send an outgoing ethernet packet.
@@ -107,6 +115,7 @@ class
107115 * 0 if the sending was failed,
108116 * or the size of the packet successfully sent.
109117 */
118+ MBED_DEPRECATED (" The class has been deprecated and will be removed in the future." )
110119 int send ();
111120
112121 /* * Receives an arrived ethernet packet.
@@ -119,6 +128,7 @@ class
119128 * 0 if no ethernet packet is arrived,
120129 * or the size of the arrived packet.
121130 */
131+ MBED_DEPRECATED (" The class has been deprecated and will be removed in the future." )
122132 int receive ();
123133
124134 /* * Read from an received ethernet packet.
@@ -134,12 +144,14 @@ class
134144 * Each time read will start reading after the last read byte before.
135145 *
136146 */
147+ MBED_DEPRECATED (" The class has been deprecated and will be removed in the future." )
137148 int read (char *data, int size);
138149
139150 /* * Gives the ethernet address of the mbed.
140151 *
141152 * @param mac Must be a pointer to a 6 byte char array to copy the ethernet address in.
142153 */
154+ MBED_DEPRECATED (" The class has been deprecated and will be removed in the future." )
143155 void address (char *mac);
144156
145157 /* * Returns if an ethernet link is present or not. It takes a while after Ethernet initialization to show up.
@@ -165,6 +177,7 @@ class
165177 * }
166178 * @endcode
167179 */
180+ MBED_DEPRECATED (" The class has been deprecated and will be removed in the future." )
168181 int link ();
169182
170183 /* * Sets the speed and duplex parameters of an ethernet link
@@ -177,6 +190,7 @@ class
177190 *
178191 * @param mode the speed and duplex mode to set the link to:
179192 */
193+ MBED_DEPRECATED (" The class has been deprecated and will be removed in the future." )
180194 void set_link (Mode mode);
181195};
182196
0 commit comments