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:
return true;
}
PinStatus interruptMode() {
return LOW;
}
constexpr bool needsSPI() const {
return false;
}
......
......@@ -91,6 +91,10 @@ public:
return true;
}
PinStatus interruptMode() {
return LOW;
}
void setSSID(const char *p) {
_ssid = p;
}
......
......@@ -47,6 +47,10 @@ public:
return false;
}
PinStatus interruptMode() {
return HIGH;
}
constexpr bool needsSPI() const {
return false;
}
......
......@@ -399,7 +399,7 @@ bool LwipIntfDev<RawDev>::begin(const uint8_t* macAddress, const uint16_t mtu) {
if (RawDev::interruptIsPossible()) {
noInterrupts(); // Ensure this is atomically set up
pinMode(_intrPin, INPUT);
attachInterruptParam(_intrPin, _irq, LOW, (void*)this);
attachInterruptParam(_intrPin, _irq, RawDev::interruptMode(), (void*)this);
__addEthernetGPIO(_intrPin);
interrupts();
} else {
......
......@@ -102,6 +102,10 @@ protected:
return true;
}
static constexpr PinStatus interruptMode() {
return LOW;
}
/**
Read an Ethernet frame size
@return the length of data do receive
......
......@@ -104,6 +104,10 @@ protected:
return true;
}
static constexpr PinStatus interruptMode() {
return LOW;
}
/**
Read an Ethernet frame size
@return the length of data do receive
......
......@@ -107,6 +107,10 @@ protected:
return true;
}
static constexpr PinStatus interruptMode() {
return LOW;
}
/**
Read an Ethernet frame size
@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