Skip to content

Commit 95f4414

Browse files
authored
Merge pull request #3 from ainyan03/ioexpander_m5unified_0_2_21
Follow the IOExpander_Base pull API of M5Unified 0.2.21
2 parents 373a816 + 511fa11 commit 95f4414

3 files changed

Lines changed: 4 additions & 6 deletions

File tree

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"url": "https://github.com/M5Stack/M5Module-QRCode.git"
1111
},
1212
"dependencies": {
13-
"M5Unified": "*",
13+
"M5Unified": ">=0.2.21",
1414
"M5GFX": "*"
1515
},
1616
"version": "1.0.1",

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ category=Device Control
88
url=https://github.com/m5stack/M5Module-QRCode.git
99
architectures=esp32
1010
includes=M5ModuleQRCode.h
11-
depends=M5Unified
11+
depends=M5Unified (>=0.2.21)

src/M5ModuleQRCode.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,11 @@ bool M5ModuleQRCode::_init_pi4ioe5v6408()
6464
_LOG_DEBUG("pi4ioe5v6408 found at 0x%02x\n", _config.pi4ioe5v6408_addr);
6565

6666
_pi4ioe5v6408->setDirection(CHANNEL_QRCODE_POWER_EN, true);
67-
_pi4ioe5v6408->setPullMode(CHANNEL_QRCODE_POWER_EN, true);
68-
_pi4ioe5v6408->enablePull(CHANNEL_QRCODE_POWER_EN, true);
67+
_pi4ioe5v6408->setPullMode(CHANNEL_QRCODE_POWER_EN, m5::IOExpander_Base::pull_up);
6968
_pi4ioe5v6408->setHighImpedance(CHANNEL_QRCODE_POWER_EN, false);
7069

7170
_pi4ioe5v6408->setDirection(CHANNEL_QRCODE_TRIG, true);
72-
_pi4ioe5v6408->setPullMode(CHANNEL_QRCODE_TRIG, true);
73-
_pi4ioe5v6408->enablePull(CHANNEL_QRCODE_TRIG, true);
71+
_pi4ioe5v6408->setPullMode(CHANNEL_QRCODE_TRIG, m5::IOExpander_Base::pull_up);
7472
_pi4ioe5v6408->setHighImpedance(CHANNEL_QRCODE_TRIG, false);
7573

7674
return true;

0 commit comments

Comments
 (0)