mirror of
https://github.com/lumapu/ahoy.git
synced 2025-05-21 04:46:10 +02:00
fix Interrupt
fix connect to WiFi with only one AP
This commit is contained in:
parent
a85ed6c089
commit
edefcf1c83
5 changed files with 26 additions and 8 deletions
|
@ -82,7 +82,6 @@ class HmRadio {
|
|||
void setup(uint8_t ampPwr = RF24_PA_LOW, uint8_t irq = IRQ_PIN, uint8_t ce = CE_PIN, uint8_t cs = CS_PIN) {
|
||||
DPRINTLN(DBG_VERBOSE, F("hmRadio.h:setup"));
|
||||
pinMode(irq, INPUT_PULLUP);
|
||||
attachInterrupt(digitalPinToInterrupt(irq), []()IRAM_ATTR{ mIrqRcvd = true; }, FALLING);
|
||||
|
||||
uint32_t dtuSn = 0x87654321;
|
||||
uint32_t chipID = 0; // will be filled with last 3 bytes of MAC
|
||||
|
@ -166,6 +165,10 @@ class HmRadio {
|
|||
return true;
|
||||
}
|
||||
|
||||
void handleIntr(void) {
|
||||
mIrqRcvd = true;
|
||||
}
|
||||
|
||||
bool isChipConnected(void) {
|
||||
//DPRINTLN(DBG_VERBOSE, F("hmRadio.h:isChipConnected"));
|
||||
return mNrf24.isChipConnected();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue