File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
src/current_sense/hardware_specific/esp32 Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 44
55#if defined(ESP_H) && defined(ARDUINO_ARCH_ESP32) && defined(SOC_MCPWM_SUPPORTED) && !defined(SIMPLEFOC_ESP32_USELEDC)
66
7+ #include " esp32_adc_driver.h"
8+
79#include " driver/mcpwm_prelude.h"
810#include " soc/mcpwm_reg.h"
911#include " soc/mcpwm_struct.h"
1012#include < soc/sens_reg.h>
1113#include < soc/sens_struct.h>
14+ #include " esp_idf_version.h"
15+
16+ // version check - this mcpwm driver is specific for ESP-IDF 5.x and arduino-esp32 3.x
17+ #if ESP_IDF_VERSION_MAJOR < 5
18+ #error SimpleFOC: ESP-IDF version 4 or lower detected. Please update to ESP-IDF 5.x and Arduino-esp32 3.0 (or higher)
19+ #endif
1220
1321#define _ADC_VOLTAGE 3 .3f
1422#define _ADC_RESOLUTION 4095 .0f
You can’t perform that action at this time.
0 commit comments