Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions libraries/lwIP_Ethernet/src/LwipIntfDev.h
Original file line number Diff line number Diff line change
Expand Up @@ -427,18 +427,20 @@ bool LwipIntfDev<RawDev>::begin(const uint8_t* macAddress, const uint16_t mtu) {

template<class RawDev>
void LwipIntfDev<RawDev>::end() {
if (_intrPin < 0) {
__removeEthernetPacketHandler(_phID);
} else {
detachInterrupt(_intrPin);
__removeEthernetGPIO(_intrPin);
}
if (_started) {
if (_intrPin < 0) {
__removeEthernetPacketHandler(_phID);
} else {
detachInterrupt(_intrPin);
__removeEthernetGPIO(_intrPin);
}

RawDev::end();
RawDev::end();

netif_remove(&_netif);
netif_remove(&_netif);

_started = false;
_started = false;
}
}

template<class RawDev>
Expand Down