From 641a5478c1431a321b278dbeecb1251485ef1847 Mon Sep 17 00:00:00 2001 From: Alexey Zholtikov Date: Mon, 15 Jun 2026 20:35:41 +0300 Subject: [PATCH] fix: incorrect binary operation --- idf_component.yml | 2 +- version.txt | 2 +- zh_pcf8574.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/idf_component.yml b/idf_component.yml index 3333852..a9f5186 100644 --- a/idf_component.yml +++ b/idf_component.yml @@ -1,6 +1,6 @@ description: ESP32 ESP-IDF component for PCF8574(A) 8-bit I/O expander url: https://github.com/aZholtikov/zh_pcf8574 -version: "2.8.1" +version: "2.8.2" license: "Apache-2.0" maintainers: - "Alexey Zholtikov " diff --git a/version.txt b/version.txt index 96d7717..cae9add 100644 --- a/version.txt +++ b/version.txt @@ -1 +1 @@ -2.8.1 \ No newline at end of file +2.8.2 \ No newline at end of file diff --git a/zh_pcf8574.c b/zh_pcf8574.c index e628bab..c75755b 100755 --- a/zh_pcf8574.c +++ b/zh_pcf8574.c @@ -184,7 +184,7 @@ esp_err_t zh_pcf8574_write_gpio(zh_pcf8574_handle_t *handle, zh_pcf8574_gpio_num } else { - ZH_ERROR_CHECK(_zh_pcf8574_write_register(handle, (handle->gpio_status ^ gpio_temp) | handle->gpio_work_mode) == ESP_OK, ESP_FAIL, NULL, "PCF8574 write GPIO failed."); + ZH_ERROR_CHECK(_zh_pcf8574_write_register(handle, (handle->gpio_status & ~gpio_temp) | handle->gpio_work_mode) == ESP_OK, ESP_FAIL, NULL, "PCF8574 write GPIO failed."); } ZH_LOGI("PCF8574 write GPIO completed successfully."); return ESP_OK;