File tree 2 files changed +4
-4
lines changed
src/current_sense/hardware_specific/esp32
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 7
7
#define SIMPLEFOC_ADC_RES 12
8
8
9
9
10
- #ifdef CONFIG_IDF_TARGET_ESP32 // if esp32 variant
10
+ #if CONFIG_IDF_TARGET_ESP32 // if esp32 variant
11
11
12
12
#include " soc/sens_reg.h"
13
13
@@ -73,7 +73,7 @@ uint16_t IRAM_ATTR adcRead(uint8_t pin)
73
73
return value;
74
74
}
75
75
76
- #elif (defined( CONFIG_IDF_TARGET_ESP32S2) || defined( CONFIG_IDF_TARGET_ESP32S3)) // if esp32 s2 or s3 variants
76
+ #elif CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3 // if esp32 s2 or s3 variants
77
77
78
78
#include " soc/sens_reg.h"
79
79
@@ -165,7 +165,7 @@ bool IRAM_ATTR adcInit(uint8_t pin){
165
165
analogSetPinAttenuation (pin, SIMPLEFOC_ADC_ATTEN);
166
166
analogRead (pin);
167
167
168
- #ifdef CONFIG_IDF_TARGET_ESP32 // if esp32 variant
168
+ #if CONFIG_IDF_TARGET_ESP32 // if esp32 variant
169
169
__configFastADCs ();
170
170
#endif
171
171
Original file line number Diff line number Diff line change 1
1
#ifndef SIMPLEFOC_ESP32_HAL_ADC_DRIVER_H_
2
2
#define SIMPLEFOC_ESP32_HAL_ADC_DRIVER_H_
3
3
4
- #if defined(ESP_H ) && defined(ARDUINO_ARCH_ESP32 ) && defined( SOC_MCPWM_SUPPORTED ) && !defined( SIMPLEFOC_ESP32_USELEDC )
4
+ #if defined(ESP_H ) && defined(ARDUINO_ARCH_ESP32 )
5
5
6
6
/**
7
7
* Get ADC value for pin
You can’t perform that action at this time.
0 commit comments