feat: Add support for ADC2 and map ESP32-S3 ADC2 pins#14
Closed
JohnieWalkerCZ wants to merge 1 commit into
Closed
Conversation
Collaborator
|
ADC2 is deliberately left unavailable, as its usage may interfere with wifi. Also, please do not change the formatting of unrelated code, it unnecessarily bloats the amount of changes to check in a pr. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This change adds support for configuring and reading analog pins on the ADC2 unit.
Previously, the ADC feature was restricted to ADC1 pins because the implementation only called
adc1_driver helper functions, and the ESP32-S3 platform configuration only mapped ADC1 pins (GPIOs 1–10). This PR updates the driver and adds all remaining ADC2 pins to the platform configuration.Changes
configureandreadmethods inAdcFeatureto useadc2_config_channel_attenandadc2_get_rawwhen the target pin belongs to ADC2.ANALOG_PINSlookup map in the platform configuration.