-
Notifications
You must be signed in to change notification settings - Fork 367
Fix number of ADC attenuations for ESP32-C6 #771
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
| // depends on which chip is being used | ||
| cfg_if::cfg_if! { | ||
| if #[cfg(esp32c6)] { | ||
| const NUM_ATTENS: usize = 7; |
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.
Just an idea, what do you think about using constant in 'esp-hal-common/src/soc/esp32XX/mod.rs' instead of this config block?
|
This fixes the original problem and should be good enough for now. The ideal solution IMHO would be to let the As said - this fixes the problem and the other suggestions might be something for a refactoring probably. However: I cannot get ADC to work on C6 at all. It's always reads 0. Just wanted to confirm that ... maybe a me problem? I'll approve this since it fixes the original problem. It's up to you if you want to explore the other approaches. Would be good if someone else could verify if ADC works at all for you on C6 - if not we should create an issue and see what broke it |
bjoernQ
left a comment
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.
LGTM - see my previous comment
This would require adding additional macros to define the configuration and driver types, not sure it's really worth it for a constant used in 3 places in a single file, IMO.
Was not the case for me. Will do some more testing, though. |
* Fix number of ADC attenuations for ESP32-C6 * Update CHANGELOG
* Fix number of ADC attenuations for ESP32-C6 * Update CHANGELOG
Quickly checked the other implementations as well, but I think they're all okay.
Closes #769