Skip to content

Commit

Permalink
forgotten import
Browse files Browse the repository at this point in the history
  • Loading branch information
askuric committed Jun 16, 2024
1 parent a7ed4ba commit ab64524
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/current_sense/hardware_specific/esp32/esp32_mcu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,19 @@

#if defined(ESP_H) && defined(ARDUINO_ARCH_ESP32) && defined(SOC_MCPWM_SUPPORTED) && !defined(SIMPLEFOC_ESP32_USELEDC)

#include "esp32_adc_driver.h"

#include "driver/mcpwm_prelude.h"
#include "soc/mcpwm_reg.h"
#include "soc/mcpwm_struct.h"
#include <soc/sens_reg.h>
#include <soc/sens_struct.h>
#include "esp_idf_version.h"

// version check - this mcpwm driver is specific for ESP-IDF 5.x and arduino-esp32 3.x
#if ESP_IDF_VERSION_MAJOR < 5
#error SimpleFOC: ESP-IDF version 4 or lower detected. Please update to ESP-IDF 5.x and Arduino-esp32 3.0 (or higher)
#endif

#define _ADC_VOLTAGE 3.3f
#define _ADC_RESOLUTION 4095.0f
Expand Down

0 comments on commit ab64524

Please sign in to comment.