diff --git a/library.json b/library.json index 8c51e55..4a4294f 100644 --- a/library.json +++ b/library.json @@ -13,7 +13,7 @@ "M5Unified": "*", "M5GFX": "*" }, - "version": "1.2.0", + "version": "1.2.1", "frameworks": "arduino", "platforms": "espressif32" } \ No newline at end of file diff --git a/library.properties b/library.properties index 87c2f0f..eefade9 100644 --- a/library.properties +++ b/library.properties @@ -1,5 +1,5 @@ name=M5StamPLC -version=1.2.0 +version=1.2.1 author=M5Stack maintainer=M5Stack sentence=M5StamPLC is a library for M5StamPLC diff --git a/src/M5StamPLC.cpp b/src/M5StamPLC.cpp index b8a76c7..ef937e5 100644 --- a/src/M5StamPLC.cpp +++ b/src/M5StamPLC.cpp @@ -61,15 +61,15 @@ void M5_STAMPLC::io_expander_a_init() // Status light init ioe.setDirection(4, true); - ioe.setPullMode(4, false); + ioe.setPullMode(4, m5::IOExpander_Base::pull_down); ioe.setHighImpedance(4, true); ioe.setDirection(5, true); - ioe.setPullMode(5, false); + ioe.setPullMode(5, m5::IOExpander_Base::pull_down); ioe.setHighImpedance(5, true); ioe.setDirection(6, true); - ioe.setPullMode(6, false); + ioe.setPullMode(6, m5::IOExpander_Base::pull_down); ioe.setHighImpedance(6, true); ioe.resetIrq(); diff --git a/src/modules/M5StamPLC_AC.cpp b/src/modules/M5StamPLC_AC.cpp index 2d70426..af20e81 100644 --- a/src/modules/M5StamPLC_AC.cpp +++ b/src/modules/M5StamPLC_AC.cpp @@ -32,13 +32,13 @@ bool M5StamPLC_AC::begin() // AC relay _ioe->setDirection(_pin_relay, true); - _ioe->setPullMode(_pin_relay, false); + _ioe->setPullMode(_pin_relay, m5::IOExpander_Base::pull_down); _ioe->setHighImpedance(_pin_relay, false); // Status light auto setup_status_light_pin = [](m5::PI4IOE5V6408_Class* ioe, uint8_t pin) { ioe->setDirection(pin, true); - ioe->setPullMode(pin, true); + ioe->setPullMode(pin, m5::IOExpander_Base::pull_up); ioe->setHighImpedance(pin, false); ioe->digitalWrite(pin, true); };