Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-pico
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-pico
Commits
2aa85e32
Unverified
Commit
2aa85e32
authored
Dec 20, 2023
by
Earle F. Philhower, III
Committed by
GitHub
Dec 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor LWIPEthernet cleanup (#1906)
parent
c4f36170
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
5 deletions
+4
-5
libraries/lwIP_Ethernet/src/LwipEthernet.cpp
libraries/lwIP_Ethernet/src/LwipEthernet.cpp
+2
-3
libraries/lwIP_Ethernet/src/LwipIntfDev.h
libraries/lwIP_Ethernet/src/LwipIntfDev.h
+2
-2
No files found.
libraries/lwIP_Ethernet/src/LwipEthernet.cpp
View file @
2aa85e32
...
@@ -32,7 +32,6 @@ bool __ethernetContextInitted = false;
...
@@ -32,7 +32,6 @@ bool __ethernetContextInitted = false;
// Async context that pumps the ethernet controllers
// Async context that pumps the ethernet controllers
static
async_context_threadsafe_background_t
lwip_ethernet_async_context_threadsafe_background
;
static
async_context_threadsafe_background_t
lwip_ethernet_async_context_threadsafe_background
;
static
async_at_time_worker_t
ethernet_timeout_worker
;
static
async_at_time_worker_t
ethernet_timeout_worker
;
static
async_context_t
*
_context
=
nullptr
;
static
async_context_t
*
_context
=
nullptr
;
// Theoretically support multiple interfaces
// Theoretically support multiple interfaces
...
@@ -45,7 +44,7 @@ void ethernet_arch_lwip_begin() {
...
@@ -45,7 +44,7 @@ void ethernet_arch_lwip_begin() {
return
;
return
;
}
}
#endif
#endif
async_context_acquire_lock_blocking
(
&
lwip_ethernet_async_context_threadsafe_background
.
core
);
async_context_acquire_lock_blocking
(
_context
);
}
}
void
ethernet_arch_lwip_end
()
{
void
ethernet_arch_lwip_end
()
{
...
@@ -55,7 +54,7 @@ void ethernet_arch_lwip_end() {
...
@@ -55,7 +54,7 @@ void ethernet_arch_lwip_end() {
return
;
return
;
}
}
#endif
#endif
async_context_release_lock
(
&
lwip_ethernet_async_context_threadsafe_background
.
core
);
async_context_release_lock
(
_context
);
}
}
int
__addEthernetPacketHandler
(
std
::
function
<
void
(
void
)
>
_packetHandler
)
{
int
__addEthernetPacketHandler
(
std
::
function
<
void
(
void
)
>
_packetHandler
)
{
...
...
libraries/lwIP_Ethernet/src/LwipIntfDev.h
View file @
2aa85e32
...
@@ -67,7 +67,7 @@ public:
...
@@ -67,7 +67,7 @@ public:
const
IPAddress
&
arg3
=
IPADDR_NONE
,
const
IPAddress
&
dns2
=
IPADDR_NONE
);
const
IPAddress
&
arg3
=
IPADDR_NONE
,
const
IPAddress
&
dns2
=
IPADDR_NONE
);
// two and one parameter version. 2nd parameter is DNS like in Arduino. IPv4 only
// two and one parameter version. 2nd parameter is DNS like in Arduino. IPv4 only
bool
ean
config
(
IPAddress
local_ip
,
IPAddress
dns
=
IPADDR_NONE
);
bool
config
(
IPAddress
local_ip
,
IPAddress
dns
=
IPADDR_NONE
);
// default mac-address is inferred from esp8266's STA interface
// default mac-address is inferred from esp8266's STA interface
bool
begin
(
const
uint8_t
*
macAddress
=
nullptr
,
const
uint16_t
mtu
=
DEFAULT_MTU
);
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
...
@@ -271,7 +271,7 @@ bool LwipIntfDev<RawDev>::config(const IPAddress& localIP, const IPAddress& gate
}
}
template
<
class
RawDev
>
template
<
class
RawDev
>
bool
ean
LwipIntfDev
<
RawDev
>::
config
(
IPAddress
local_ip
,
IPAddress
dns
)
{
bool
LwipIntfDev
<
RawDev
>::
config
(
IPAddress
local_ip
,
IPAddress
dns
)
{
if
(
!
local_ip
.
isSet
())
{
if
(
!
local_ip
.
isSet
())
{
return
config
(
INADDR_ANY
,
INADDR_ANY
,
INADDR_ANY
);
return
config
(
INADDR_ANY
,
INADDR_ANY
,
INADDR_ANY
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment