Skip to content

Commit c166be1

Browse files
no interrupt
1 parent 447105d commit c166be1

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

MultiPlexer_PCF8574/MultiPlexer_PCF8574.cpp

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,14 @@
1-
21
/*
32
MultiPlexer_PCF8574.cpp
43
*/
54

65
#include <MultiPlexer_PCF8574.h>
76

8-
// Function interrupt
9-
bool keyPressed = false;
10-
11-
void keyPressedOnPCF8574(){
12-
Serial.println("keyPressedOnPCF8574");
13-
keyPressed = true;
14-
}
15-
16-
17-
MultiPlexer_PCF8574::MultiPlexer_PCF8574(uint8_t address, uint8_t interrupt_pin) {
18-
_expander = new PCF8574(address, interrupt_pin, keyPressedOnPCF8574);
7+
MultiPlexer_PCF8574::MultiPlexer_PCF8574(uint8_t address) {
8+
_expander = new PCF8574(address);
199
}
2010

2111
void MultiPlexer_PCF8574::begin() {
22-
/*pinMode(ESP8266_INTERRUPTED_PIN, INPUT_PULLUP);
23-
attachInterrupt(digitalPinToInterrupt(ESP8266_INTERRUPTED_PIN), keyPressedOnPCF8574, FALLING);*/
24-
2512
for (int i=0; i<8; i++) {
2613
_expander->pinMode(i, INPUT);
2714
}

MultiPlexer_PCF8574/MultiPlexer_PCF8574.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,10 @@
88
#include <Method.h>
99
#include <PCF8574.h>
1010

11-
#define ESP8266_INTERRUPTED_PIN 16
12-
1311
class MultiPlexer_PCF8574
1412
{
1513
public:
16-
MultiPlexer_PCF8574(uint8_t address, uint8_t interrupt_pin);
14+
MultiPlexer_PCF8574(uint8_t address);
1715
void begin();
1816
void loop();
1917

0 commit comments

Comments
 (0)