diff --git a/library.json b/library.json index a027b7c..2a4d8f4 100644 --- a/library.json +++ b/library.json @@ -10,7 +10,7 @@ "url": "https://github.com/M5Stack/M5Module-QRCode.git" }, "dependencies": { - "M5Unified": "*", + "M5Unified": ">=0.2.21", "M5GFX": "*" }, "version": "1.0.1", diff --git a/library.properties b/library.properties index 5fbffff..172d6ca 100644 --- a/library.properties +++ b/library.properties @@ -8,4 +8,4 @@ category=Device Control url=https://github.com/m5stack/M5Module-QRCode.git architectures=esp32 includes=M5ModuleQRCode.h -depends=M5Unified +depends=M5Unified (>=0.2.21) diff --git a/src/M5ModuleQRCode.cpp b/src/M5ModuleQRCode.cpp index 30f40e2..9fabfed 100644 --- a/src/M5ModuleQRCode.cpp +++ b/src/M5ModuleQRCode.cpp @@ -64,13 +64,11 @@ bool M5ModuleQRCode::_init_pi4ioe5v6408() _LOG_DEBUG("pi4ioe5v6408 found at 0x%02x\n", _config.pi4ioe5v6408_addr); _pi4ioe5v6408->setDirection(CHANNEL_QRCODE_POWER_EN, true); - _pi4ioe5v6408->setPullMode(CHANNEL_QRCODE_POWER_EN, true); - _pi4ioe5v6408->enablePull(CHANNEL_QRCODE_POWER_EN, true); + _pi4ioe5v6408->setPullMode(CHANNEL_QRCODE_POWER_EN, m5::IOExpander_Base::pull_up); _pi4ioe5v6408->setHighImpedance(CHANNEL_QRCODE_POWER_EN, false); _pi4ioe5v6408->setDirection(CHANNEL_QRCODE_TRIG, true); - _pi4ioe5v6408->setPullMode(CHANNEL_QRCODE_TRIG, true); - _pi4ioe5v6408->enablePull(CHANNEL_QRCODE_TRIG, true); + _pi4ioe5v6408->setPullMode(CHANNEL_QRCODE_TRIG, m5::IOExpander_Base::pull_up); _pi4ioe5v6408->setHighImpedance(CHANNEL_QRCODE_TRIG, false); return true;