File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
lwIP_enc28j60/src/utility Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change 39
39
#include < stdio.h>
40
40
#include < stdarg.h>
41
41
#include < string.h>
42
+ #include < LwipEthernet.h>
42
43
43
44
#include " enc28j60.h"
44
45
@@ -696,6 +697,8 @@ uint16_t ENC28J60::phyread(uint8_t reg) {
696
697
697
698
bool ENC28J60::isLinked () {
698
699
// ( https://github.com/JAndrassy/EthernetENC/tree/master/src/utility/enc28j60.h )
699
-
700
- return !!(phyread (MACSTAT2) & 0x400 );
700
+ ethernet_arch_lwip_begin ();
701
+ auto ret = !!(phyread (MACSTAT2) & 0x400 );
702
+ ethernet_arch_lwip_end ();
703
+ return ret;
701
704
}
Original file line number Diff line number Diff line change 38
38
#include < stdint.h>
39
39
#include < Arduino.h>
40
40
#include < SPI.h>
41
+ #include < LwipEthernet.h>
41
42
42
43
class Wiznet5500 {
43
44
public:
@@ -83,7 +84,10 @@ class Wiznet5500 {
83
84
@return true when physical link is up
84
85
*/
85
86
bool isLinked () {
86
- return wizphy_getphylink () == PHY_LINK_ON;
87
+ ethernet_arch_lwip_begin ();
88
+ auto ret = wizphy_getphylink () == PHY_LINK_ON;
89
+ ethernet_arch_lwip_end ();
90
+ return ret;
87
91
}
88
92
89
93
/* *
You can’t perform that action at this time.
0 commit comments