8000 Minor LWIPEthernet cleanup (#1906) · BritvaBo/arduino-pico@2aa85e3 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2aa85e3

Browse files
Minor LWIPEthernet cleanup (earlephilhower#1906)
1 parent c4f3617 commit 2aa85e3

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

libraries/lwIP_Ethernet/src/LwipEthernet.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ bool __ethernetContextInitted = false;
3232
// Async context that pumps the ethernet controllers
3333
static async_context_threadsafe_background_t lwip_ethernet_async_context_threadsafe_background;
3434
static async_at_time_worker_t ethernet_timeout_worker;
35-
3635
static async_context_t *_context = nullptr;
3736

3837
// Theoretically support multiple interfaces
@@ -45,7 +44,7 @@ void ethernet_arch_lwip_begin() {
4544
return;
4645
}
4746
#endif
48-
async_context_acquire_lock_blocking(&lwip_ethernet_async_context_threadsafe_background.core);
47+
async_context_acquire_lock_blocking(_context);
4948
}
5049

5150
void ethernet_arch_lwip_end() {
@@ -55,7 +54,7 @@ void ethernet_arch_lwip_end() {
5554
return;
5655
}
5756
#endif
58-
async_context_release_lock(&lwip_ethernet_async_context_threadsafe_background.core);
57+
async_context_release_lock(_context);
5958
}
6059

6160
int __addEthernetPacketHandler(std::function<void(void)> _packetHandler) {

libraries/lwIP_Ethernet/src/LwipIntfDev.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class LwipIntfDev: public LwipIntf, public RawDev {
6767
const IPAddress& arg3 = IPADDR_NONE, const IPAddress& dns2 = IPADDR_NONE);
6868

6969
// two and one parameter version. 2nd parameter is DNS like in Arduino. IPv4 only
70-
boolean config(IPAddress local_ip, IPAddress dns = IPADDR_NONE);
70+
bool config(IPAddress local_ip, IPAddress dns = IPADDR_NONE);
7171

7272
// default mac-address is inferred from esp8266's STA interface
7373
bool begin(const uint8_t* macAddress = nullptr, const uint16_t mtu = DEFAULT_MTU);
@@ -271,7 +271,7 @@ bool LwipIntfDev<RawDev>::config(const IPAddress& localIP, const IPAddress& gate
271271
}
272272

273273
template<class RawDev>
274-
boolean LwipIntfDev<RawDev>::config(IPAddress local_ip, IPAddress dns) {
274+
bool LwipIntfDev<RawDev>::config(IPAddress local_ip, IPAddress dns) {
275275

276276
if (!local_ip.isSet()) {
277277
return config(INADDR_ANY, INADDR_ANY, INADDR_ANY);

0 commit comments

Comments
 (0)
0