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
ea936f00
Unverified
Commit
ea936f00
authored
Nov 12, 2023
by
Earle F. Philhower, III
Committed by
GitHub
Nov 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Protect W5500/ENC28J60 isLinked from interrupt (#1805)
Fixes #1786
parent
8ac616e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
libraries/lwIP_enc28j60/src/utility/enc28j60.cpp
libraries/lwIP_enc28j60/src/utility/enc28j60.cpp
+5
-2
libraries/lwIP_w5500/src/utility/w5500.h
libraries/lwIP_w5500/src/utility/w5500.h
+5
-1
No files found.
libraries/lwIP_enc28j60/src/utility/enc28j60.cpp
View file @
ea936f00
...
...
@@ -39,6 +39,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <LwipEthernet.h>
#include "enc28j60.h"
...
...
@@ -696,6 +697,8 @@ uint16_t ENC28J60::phyread(uint8_t reg) {
bool
ENC28J60
::
isLinked
()
{
// ( https://github.com/JAndrassy/EthernetENC/tree/master/src/utility/enc28j60.h )
return
!!
(
phyread
(
MACSTAT2
)
&
0x400
);
ethernet_arch_lwip_begin
();
auto
ret
=
!!
(
phyread
(
MACSTAT2
)
&
0x400
);
ethernet_arch_lwip_end
();
return
ret
;
}
libraries/lwIP_w5500/src/utility/w5500.h
View file @
ea936f00
...
...
@@ -38,6 +38,7 @@
#include <stdint.h>
#include <Arduino.h>
#include <SPI.h>
#include <LwipEthernet.h>
class
Wiznet5500
{
public:
...
...
@@ -83,7 +84,10 @@ public:
@return true when physical link is up
*/
bool
isLinked
()
{
return
wizphy_getphylink
()
==
PHY_LINK_ON
;
ethernet_arch_lwip_begin
();
auto
ret
=
wizphy_getphylink
()
==
PHY_LINK_ON
;
ethernet_arch_lwip_end
();
return
ret
;
}
/**
...
...
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