-
Notifications
You must be signed in to change notification settings - Fork 7.6k
ADC esp32s2 attenuation fix for DAC pins #6282
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Working with S3 too? |
S3 does not support DAC. |
Ahh, yes! This https://github.com/espressif/arduino-esp32/blob/esp32-s3-support/cores/esp32/esp32-hal-adc.c#L38-L41 is probably a copy&paste thing |
The S3 has 20 ADC channels working, but no DAC channel ;) |
cores/esp32/esp32-hal-adc.c
Outdated
@@ -142,9 +144,9 @@ bool __adcAttachPin(uint8_t pin){ | |||
#endif | |||
} | |||
#if CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
while here, let's use the SOC defines te test wether DAC is supported and maybe how many channels
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SOC define used now.
According to how many channels there are always 2 channels when supported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not given that this will be true in the future. Why not have more?
Summary
Changed fixed DAC pins which are different for ESP32S2 to predefined DAC pins from SOC.
Impact
None.
Related links