Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-esp32
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-esp32
Commits
5fd73792
Unverified
Commit
5fd73792
authored
Aug 11, 2021
by
Me No Dev
Committed by
GitHub
Aug 11, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix wrong attenuation being set to pins (#5522)
Fixes:
https://github.com/espressif/arduino-esp32/issues/5503
parent
5bb8177a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
cores/esp32/esp32-hal-adc.c
cores/esp32/esp32-hal-adc.c
+4
-1
No files found.
cores/esp32/esp32-hal-adc.c
View file @
5fd73792
...
...
@@ -104,7 +104,9 @@ void __analogSetPinAttenuation(uint8_t pin, adc_attenuation_t attenuation)
adc1_config_channel_atten
(
channel
,
attenuation
);
}
__analogInit
();
__pin_attenuation
[
pin
]
=
attenuation
;
if
((
__pin_attenuation
[
pin
]
!=
ADC_ATTENDB_MAX
)
||
(
attenuation
!=
__analogAttenuation
)){
__pin_attenuation
[
pin
]
=
attenuation
;
}
}
bool
__adcAttachPin
(
uint8_t
pin
){
...
...
@@ -113,6 +115,7 @@ bool __adcAttachPin(uint8_t pin){
log_e
(
"Pin %u is not ADC pin!"
,
pin
);
return
false
;
}
__analogInit
();
int8_t
pad
=
digitalPinToTouchChannel
(
pin
);
if
(
pad
>=
0
){
#if CONFIG_IDF_TARGET_ESP32
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment