Skip to content

v1.0.5

Choose a tag to compare

@onexs-xsi onexs-xsi released this 28 Feb 03:07
· 3 commits to main since this release
  1. Add M5Unified I2C_Class driver support for both Arduino and ESP-IDF platforms — New begin(m5::I2C_Class* i2c, ...) overload allows initializing M5PM1 with an M5Unified I2C_Class instance, borrowing the caller's I2C bus without owning its lifecycle.

  2. Add ESP-IDF I2C Legacy API support — Fallback to driver/i2c.h legacy API when i2c_bus or i2c_master is unavailable, broadening platform compatibility.

  3. Add compile-time feature detection for I2C backends — Introduce M5PM1_HAS_I2C_MASTER, M5PM1_HAS_I2C_BUS, and M5PM1_HAS_M5UNIFIED_I2C macros to auto-detect available I2C drivers based on IDF version, header availability, and CONFIG_I2C_BUS_BACKWARD_CONFIG.

  4. Add M5GFX/M5Unified coexistence conflict detection — Emit compile-time errors or silently disable i2c_bus mode when M5GFX/M5Unified is present, preventing runtime abort() from driver conflicts.

  5. Add M5PM1_OTHER GPIO function definition — New M5PM1_OTHER (0xFF) constant replaces ambiguous use of ANALOG for PWM/ADC pin function configuration.

  6. Improve the log system with per-module tags and additional log levels — Split monolithic M5PM1 tag into M5PM1_I2C, M5PM1_GPIO, M5PM1_ADC, M5PM1_PWM, M5PM1_LED, M5PM1_AMP, M5PM1_PWR, M5PM1_BTN, M5PM1_IRQ, M5PM1_SYS; add LOG_D (debug) and LOG_V (verbose) levels; prefix log output with severity indicator [I]/[W]/[E]/[D]/[V].

  7. Optimize I2C retry delay from 2ms to 50ms — Increase M5PM1_I2C_RETRY_DELAY_MS to improve reliability on slower or noisier I2C buses.

  8. Rename I2C helper functions with platform prefix — Rename M5PM1_I2C_READ_BYTEM5PM1_I2C_ARDUINO_READ_BYTE (and all similar helpers) plus add new M5PM1_M5UNIFIED_* wrapper set for I2C_Class communication.

  9. Add M5Unified as optional CMake dependency — Use idf_component_optional_requires(PRIVATE M5Unified) so M5PM1 auto-links M5Unified when present without hard dependency.

  10. Add include-order guidance and i2c_bus restriction notes in README — Document that M5Unified.h must be included before M5PM1.h on ESP-IDF ≥ 5.3.0 to avoid i2c_config_t conflicts; note that i2c_bus mode is unsupported when M5GFX/M5Unified is present.

  11. Revise example code to use M5PM1_OTHER instead of ANALOG — Update gpio_pwm and basic_power_adc examples to use the new M5PM1_OTHER constant for PWM/ADC pin function setting.

  12. Bump library version from 1.0.4 to 1.0.5 — Update version in idf_component.yml, library.json, and library.properties.

  13. Update clang-format configuration and CI action — Revise .clang-format rules and update clang-format-check.yml workflow.