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 4
4
5
5
#if defined(ESP_H) && defined(ARDUINO_ARCH_ESP32) && defined(SOC_MCPWM_SUPPORTED) && !defined(SIMPLEFOC_ESP32_USELEDC)
6
6
7
+ #include " esp32_adc_driver.h"
8
+
7
9
#include " driver/mcpwm_prelude.h"
8
10
#include " soc/mcpwm_reg.h"
9
11
#include " soc/mcpwm_struct.h"
10
12
#include < soc/sens_reg.h>
11
13
#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
12
20
13
21
#define _ADC_VOLTAGE 3 .3f
14
22
#define _ADC_RESOLUTION 4095 .0f
You can’t perform that action at this time.
0 commit comments