Skip to content

feat: Add support for ADC2 and map ESP32-S3 ADC2 pins#14

Closed
JohnieWalkerCZ wants to merge 1 commit into
jaculus-org:masterfrom
JohnieWalkerCZ:feat-adc2-support
Closed

feat: Add support for ADC2 and map ESP32-S3 ADC2 pins#14
JohnieWalkerCZ wants to merge 1 commit into
jaculus-org:masterfrom
JohnieWalkerCZ:feat-adc2-support

Conversation

@JohnieWalkerCZ

Copy link
Copy Markdown

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

  • Driver Support: Branched configure and read methods in AdcFeature to use adc2_config_channel_atten and adc2_get_raw when the target pin belongs to ADC2.
  • Pin Mappings: Added all ESP32-S3 ADC2 pins (GPIOs 11 through 20) to the ANALOG_PINS lookup map in the platform configuration.

@cubicap

cubicap commented Jun 9, 2026

Copy link
Copy Markdown
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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants