Skip to content

Commit 9cb7f99

Browse files
committed
Remove MAC address configuration
1 parent d47a687 commit 9cb7f99

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/Arduino_EthernetConnectionHandler.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@
2424
CTOR/DTOR
2525
******************************************************************************/
2626

27-
EthernetConnectionHandler::EthernetConnectionHandler(uint8_t * mac, bool const keep_alive)
27+
EthernetConnectionHandler::EthernetConnectionHandler(bool const keep_alive)
2828
: ConnectionHandler{keep_alive}
29-
, _mac{mac}
3029
{
3130

3231
}
@@ -37,7 +36,7 @@ EthernetConnectionHandler::EthernetConnectionHandler(uint8_t * mac, bool const k
3736

3837
NetworkConnectionState EthernetConnectionHandler::update_handleInit()
3938
{
40-
if (Ethernet.begin(const_cast<uint8_t *>(_mac)) == 0) {
39+
if (Ethernet.begin() == 0) {
4140
Debug.print(DBG_ERROR, F("Failed to configure Ethernet using DHCP"));
4241

4342
if (Ethernet.hardwareStatus() == EthernetNoHardware) {

src/Arduino_EthernetConnectionHandler.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class EthernetConnectionHandler : public ConnectionHandler
3131
{
3232
public:
3333

34-
EthernetConnectionHandler(uint8_t * mac, bool const keep_alive = true);
34+
EthernetConnectionHandler(bool const keep_alive = true);
3535

3636

3737
virtual unsigned long getTime() override { return 0; }
@@ -49,8 +49,6 @@ class EthernetConnectionHandler : public ConnectionHandler
4949

5050
private:
5151

52-
uint8_t const * _mac;
53-
5452
EthernetUDP _eth_udp;
5553
EthernetClient _eth_client;
5654

0 commit comments

Comments
 (0)