Unverified Commit 9c94bab2 authored by Juraj Andrássy's avatar Juraj Andrássy Committed by GitHub

Add RawDev::interruptMode (#2042)

parent ea887403
...@@ -48,6 +48,10 @@ public: ...@@ -48,6 +48,10 @@ public:
return true; return true;
} }
PinStatus interruptMode() {
return LOW;
}
constexpr bool needsSPI() const { constexpr bool needsSPI() const {
return false; return false;
} }
......
...@@ -91,6 +91,10 @@ public: ...@@ -91,6 +91,10 @@ public:
return true; return true;
} }
PinStatus interruptMode() {
return LOW;
}
void setSSID(const char *p) { void setSSID(const char *p) {
_ssid = p; _ssid = p;
} }
......
...@@ -47,6 +47,10 @@ public: ...@@ -47,6 +47,10 @@ public:
return false; return false;
} }
PinStatus interruptMode() {
return HIGH;
}
constexpr bool needsSPI() const { constexpr bool needsSPI() const {
return false; return false;
} }
......
...@@ -399,7 +399,7 @@ bool LwipIntfDev<RawDev>::begin(const uint8_t* macAddress, const uint16_t mtu) { ...@@ -399,7 +399,7 @@ bool LwipIntfDev<RawDev>::begin(const uint8_t* macAddress, const uint16_t mtu) {
if (RawDev::interruptIsPossible()) { if (RawDev::interruptIsPossible()) {
noInterrupts(); // Ensure this is atomically set up noInterrupts(); // Ensure this is atomically set up
pinMode(_intrPin, INPUT); pinMode(_intrPin, INPUT);
attachInterruptParam(_intrPin, _irq, LOW, (void*)this); attachInterruptParam(_intrPin, _irq, RawDev::interruptMode(), (void*)this);
__addEthernetGPIO(_intrPin); __addEthernetGPIO(_intrPin);
interrupts(); interrupts();
} else { } else {
......
...@@ -102,6 +102,10 @@ protected: ...@@ -102,6 +102,10 @@ protected:
return true; return true;
} }
static constexpr PinStatus interruptMode() {
return LOW;
}
/** /**
Read an Ethernet frame size Read an Ethernet frame size
@return the length of data do receive @return the length of data do receive
......
...@@ -104,6 +104,10 @@ protected: ...@@ -104,6 +104,10 @@ protected:
return true; return true;
} }
static constexpr PinStatus interruptMode() {
return LOW;
}
/** /**
Read an Ethernet frame size Read an Ethernet frame size
@return the length of data do receive @return the length of data do receive
......
...@@ -107,6 +107,10 @@ protected: ...@@ -107,6 +107,10 @@ protected:
return true; return true;
} }
static constexpr PinStatus interruptMode() {
return LOW;
}
/** /**
Read an Ethernet frame size Read an Ethernet frame size
@return the length of data do receive @return the length of data do receive
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment