Skip to content

feat(repo): update to i2c-ng driver #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
build:
strategy:
matrix:
idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3"]
idf_target: ["esp32", "esp32s2", "esp32c3", "esp32s3"]
runs-on: ubuntu-20.04
idf_ver: ["release-v5.4", "release-v5.5"]
idf_target: ["esp32", "esp32s2", "esp32c3", "esp32s3", "esp32c6", "esp32p4"]
runs-on: ubuntu-latest
container: espressif/idf:${{ matrix.idf_ver }}
steps:
- uses: actions/checkout@v3
Expand Down
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# ChangeLog

## v2.0.0 - 2025-07-13

### Breaking Changes:

* break(repo): depend on esp-idf v5.4 or later (arduino-esp32 v3.2.0 or later)
* break(repo): remove legacy header files and macros which are marked as deprecated
* break(repo): support i2c-ng driver and not compatible with old i2c driver

## v1.1.1 - 2025-07-07

### Enhancements:
Expand Down
7 changes: 0 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,3 @@ idf_component_register(
REQUIRES
driver
)

target_compile_options(${COMPONENT_LIB}
PUBLIC
-Wno-missing-field-initializers
PRIVATE
$<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17>
)
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

**Latest Espressif Component Version**: [![Espressif Release](https://components.espressif.com/components/espressif/esp32_io_expander/badge.svg)](https://components.espressif.com/components/espressif/esp32_io_expander)

# ESP32_IO_Expander
# ESP IO Expander

## Overview

Expand All @@ -17,7 +17,7 @@

## Table of Contents

- [ESP32\_IO\_Expander](#esp32_io_expander)
- [ESP IO Expander](#esp-io-expander)
- [Overview](#overview)
- [Table of Contents](#table-of-contents)
- [Supported Drivers](#supported-drivers)
Expand All @@ -41,9 +41,9 @@
| **Driver** | **Version** |
| ---------------------------------------------------------------------------------------------------- | ----------- |
| [esp_io_expander](https://components.espressif.com/components/espressif/esp_io_expander) | 1.0.1 |
| [TCA95XX_8BIT](https://components.espressif.com/components/espressif/esp_io_expander_tca9554) | 1.0.1 |
| [TCA95XX_16BIT](https://components.espressif.com/components/espressif/esp_io_expander_tca95xx_16bit) | 1.0.0 |
| [HT8574](https://components.espressif.com/components/espressif/esp_io_expander_ht8574) | 1.0.0 |
| [TCA95XX_8BIT](https://components.espressif.com/components/espressif/esp_io_expander_tca9554) | 2.0.1 |
| [TCA95XX_16BIT](https://components.espressif.com/components/espressif/esp_io_expander_tca95xx_16bit) | 2.0.0 |
| [HT8574](https://components.espressif.com/components/espressif/esp_io_expander_ht8574) | 2.0.0 |
| CH422G | x |

## How to Use
Expand All @@ -52,10 +52,10 @@

#### Dependencies and Versions

| **Dependency** | **Version** |
| ------------------------------------------------------------------ | -------------------- |
| [esp-idf](https://github.com/espressif/esp-idf) | >= 5.1 |
| [esp-lib-utils](https://github.com/esp-arduino-libs/esp-lib-utils) | >= 0.1.0 && <= 0.2.0 |
| **Dependency** | **Version** |
| ------------------------------------------------------------------ | ----------- |
| [esp-idf](https://github.com/espressif/esp-idf) | >= 5.4 |
| [esp-lib-utils](https://github.com/esp-arduino-libs/esp-lib-utils) | 0.2.* |

#### Adding to Project

Expand All @@ -75,10 +75,10 @@ Since `ESP32_IO_Expander` depends on the `esp-lib-utils` library which implement

#### Dependencies and Versions

| **Dependency** | **Version** |
| ------------------------------------------------------------------ | -------------------- |
| [arduino-esp32](https://github.com/espressif/arduino-esp32) | >= v3.0.0 |
| [esp-lib-utils](https://github.com/esp-arduino-libs/esp-lib-utils) | >= 0.1.0 && <= 0.2.0 |
| **Dependency** | **Version** |
| ------------------------------------------------------------------ | ------------------- |
| [arduino-esp32](https://github.com/espressif/arduino-esp32) | >= v3.2.0 |
| [esp-lib-utils](https://github.com/esp-arduino-libs/esp-lib-utils) | >= 0.2.0 && < 0.3.0 |

#### Installing the Library

Expand Down
3 changes: 1 addition & 2 deletions examples/ch422g/ch422g.ino
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@

#define EXAMPLE_I2C_SDA_PIN (8)
#define EXAMPLE_I2C_SCL_PIN (9)
#define EXAMPLE_I2C_ADDR (ESP_IO_EXPANDER_I2C_CH422G_ADDRESS)

esp_expander::CH422G *expander = NULL;

Expand All @@ -50,7 +49,7 @@ void setup() {
delay(1000);
Serial.println("Test begin");

expander = new esp_expander::CH422G(EXAMPLE_I2C_SCL_PIN, EXAMPLE_I2C_SDA_PIN, EXAMPLE_I2C_ADDR);
expander = new esp_expander::CH422G(EXAMPLE_I2C_SCL_PIN, EXAMPLE_I2C_SDA_PIN);
expander->init();
expander->begin();

Expand Down
7 changes: 4 additions & 3 deletions idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
version: "1.1.1"
version: "2.0.0"
description: ESP32_IO_Expander is a library designed for driving IO expander chips using ESP SoCs
url: https://github.com/esp-arduino-libs/ESP32_IO_Expander
repository: https://github.com/esp-arduino-libs/ESP32_IO_Expander.git
issues: https://github.com/esp-arduino-libs/ESP32_IO_Expander/issues
dependencies:
idf: ">=5.1"
idf: ">=5.4"

espressif/esp-lib-utils:
version: "0.2.*"
public: true
public: false
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=ESP32_IO_Expander
version=1.1.1
version=2.0.0
author=espressif
maintainer=espressif
sentence=ESP32_IO_Expander is a library designed for driving IO expander chips using ESP SoCs
Expand Down
6 changes: 0 additions & 6 deletions micropython.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,5 @@ target_sources(usermod_esp_io_expander INTERFACE ${SRCS_C} ${SRCS_CXX})
# Add the current directory as an include directory.
target_include_directories(usermod_esp_io_expander INTERFACE ${SRC_DIR})

# Add compile options. Since the target is not created by `idf_component_register()`, we need to add the `ESP_PLATFORM` define manually.
target_compile_options(usermod_esp_io_expander
INTERFACE
-Wno-missing-field-initializers -DESP_PLATFORM $<$<COMPILE_LANGUAGE:CXX>:-std=gnu++17>
)

# Link our INTERFACE library to the usermod target.
target_link_libraries(usermod INTERFACE usermod_esp_io_expander)
16 changes: 0 additions & 16 deletions src/ESP_IOExpander.h

This file was deleted.

15 changes: 0 additions & 15 deletions src/ESP_IOExpander_Library.h

This file was deleted.

16 changes: 0 additions & 16 deletions src/base/esp_io_expander.h

This file was deleted.

73 changes: 0 additions & 73 deletions src/chip/esp_expander_ht8574.hpp

This file was deleted.

73 changes: 0 additions & 73 deletions src/chip/esp_expander_tca95xx_8bit.hpp

This file was deleted.

Loading
Loading