M5UnitUnified 0.5.8 git rev:47d29eb
Loading...
Searching...
No Matches
identify_functions.hpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025 M5Stack Technology CO LTD
3 *
4 * SPDX-License-Identifier: MIT
5 */
10#ifndef M5_UNIT_UNIFIED_IDENTIFY_FUNCTIONS_HPP
11#define M5_UNIT_UNIFIED_IDENTIFY_FUNCTIONS_HPP
12
13#if defined(ESP_PLATFORM)
14// Detect ESP-IDF version
15#if __has_include(<esp_idf_version.h>)
16#include <esp_idf_version.h>
17#else // esp_idf_version.h has been introduced in Arduino 1.0.5 (ESP-IDF3.3)
18#define ESP_IDF_VERSION_VAL(major, minor, patch) ((major << 16) | (minor << 8) | (patch))
19#define ESP_IDF_VERSION ESP_IDF_VERSION_VAL(3, 2, 0)
20#endif
21
22// RMT
23#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0)
24#define M5_UNIT_UNIFIED_USING_RMT_V2
25#define M5_UNIT_UNIFIED_USING_ADC_ONESHOT
26#endif
27#endif // ESP_PLATFORM
28
29#endif