Skip to content

Commit 949c1de

Browse files
committed
1. Update README
1 parent 1e36bb3 commit 949c1de

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,28 @@ M5IOE1 is a versatile I2C-based I/O expansion library designed for M5Stack devic
1414

1515
- N/A
1616

17+
## Notes
18+
19+
### Include Order (ESP-IDF)
20+
21+
If used alongside `M5Unified`, include it **before** `M5IOE1`:
22+
23+
```cpp
24+
#include <M5Unified.h> // ✓ must come first
25+
#include <M5IOE1.h>
26+
```
27+
28+
```cpp
29+
#include <M5IOE1.h> // ✗ causes i2c_config_t conflict
30+
#include <M5Unified.h>
31+
```
32+
33+
> **Why:** On ESP-IDF ≥ 5.3.0 without `CONFIG_I2C_BUS_BACKWARD_CONFIG`, `i2c_bus.h` defines
34+
> its own `i2c_config_t`. Including it before `M5Unified` (which pulls in `driver/i2c.h`)
35+
> creates a conflicting declaration error. Reversing the order avoids this.
36+
>
37+
> Alternatively, enable `CONFIG_I2C_BUS_BACKWARD_CONFIG` in menuconfig to remove the restriction.
38+
1739
## License
1840

1941
- [M5IOE1 - MIT](LICENSE)

0 commit comments

Comments
 (0)