Skip to content

Commit ab64524

Browse files
committed
forgotten import
1 parent a7ed4ba commit ab64524

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/current_sense/hardware_specific/esp32/esp32_mcu.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,19 @@
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

0 commit comments

Comments
 (0)