Add RawDev::interruptMode (#2042)
This commit is contained in:
parent
ea8874037c
commit
9c94bab290
7 changed files with 25 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue