Skip to content

Commit 45dbabb

Browse files
committed
Update core_compatibility.rst
1 parent b550015 commit 45dbabb

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

docs/en/guides/core_compatibility.rst

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,14 @@ To ensure compatibility with both versions of the ESP32 Arduino core, developers
1313

1414
.. code-block:: cpp
1515

16+
#ifdef ESP_ARDUINO_VERSION_MAJOR
1617
#if ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(3, 0, 0)
17-
// Code for ESP32 Arduino core version 3.x
18+
// Code for version 3.x
1819
#else
19-
// Code for ESP32 Arduino core version 2.x
20+
// Code for version 2.x
21+
#endif
22+
#else
23+
// Code for version 1.x
2024
#endif
2125

2226
Version Print

0 commit comments

Comments
 (0)