Skip to content

Commit

Permalink
Only define CHIP_ constants for C6 and simulator if ESP_IDF_VERSION >…
Browse files Browse the repository at this point in the history
…= 5.1

Avoids breaking compatibility with ESP-IDF 5.0
  • Loading branch information
vickash authored Jun 29, 2023
1 parent 1a02da1 commit da5abb7
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/mrb_esp32_system.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,13 @@ mrb_mruby_esp32_system_gem_init(mrb_state* mrb) {
define_const(CHIP_ESP32S2);
define_const(CHIP_ESP32S3);
define_const(CHIP_ESP32C3);
define_const(CHIP_ESP32C2);
define_const(CHIP_ESP32C6);
define_const(CHIP_ESP32H2);
define_const(CHIP_ESP32C2);
#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 1, 0)
define_const(CHIP_ESP32C6);
define_const(CHIP_POSIX_LINUX);
#endif
// define_const(CHIP_ESP32P4);
define_const(CHIP_POSIX_LINUX);
}

void
Expand Down

0 comments on commit da5abb7

Please sign in to comment.