feat: Restructure ADC driver & include new examples#73
Merged
fanfare-ff merged 22 commits intodevfrom Dec 19, 2025
Merged
Conversation
Fix override config for cont to avoid rank misalignment Improve IRQ handlers to clean EOC by reading the DR Split polling for cont and one shot modes Rename adc_data fields to better ones
Implement proper single channel software polling for new adc driver Refactor all ADC names to a new code naming style Rework adc examples structure Add optional overrun interrupts
Polish DMA example Add a flag for DMA half transfer reached event
Works only with invalidation in interrupt for now Must be redone with proper MPU config
Add proper interrupts for OVR flags
Rearrange adc errors
Rename all ADC examples�Cleanup DMA and timer files Fix HalfTransfer function names
Rename DAC examples
Refactor ADCx3 and Blink examples
Updated documentation for the example
Add temporal cache invalidation to DMA interrupts Update library description
Refactor each function Add new functions Refactor ADC, DAC and timer errors Refactor ADC config to a new style Refactor each example Add new examples Add pictures for diff SR and Flags examples Rename DAC and ADC examples Add link to PWM docs Refactor basic ultrasonic examples with a new ADC style
Closed
7 tasks
svire-at
approved these changes
Dec 18, 2025
Collaborator
svire-at
left a comment
There was a problem hiding this comment.
Great work!
In some files, there are comments in code that sometimes start with lower case. I tried to point them out when I noticed inconsistencies.
libraries/SensEdu/examples/ADC_3CH_Poll_Continuous/ADC_3CH_Poll_Continuous.ino
Outdated
Show resolved
Hide resolved
libraries/SensEdu/examples/Basic_UltraSound_4CH/Basic_UltraSound_4CH.ino
Show resolved
Hide resolved
libraries/SensEdu/examples/Basic_UltraSound_WiFi/Basic_UltraSound_WiFi.ino
Show resolved
Hide resolved
.../extra/ultrasonic_distance_acq_detailed_dataset/ultrasonic_distance_acq_detailed_dataset.ino
Show resolved
Hide resolved
...distance_acq_detailed_dataset_enhanced/ultrasonic_distance_acq_detailed_dataset_enhanced.ino
Show resolved
Hide resolved
projects/UltraSound/ultrasonic_distance_acq_enhanced/ultrasonic_distance_acq_enhanced.ino
Show resolved
Hide resolved
5 tasks
Collaborator
LorenzoBuldorini
left a comment
There was a problem hiding this comment.
Everything looks more clear and polish right now. There were just some issue with comments like capital letter at the beginning like Azra pointed out. But apart from that everything looks very good in my opinion
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.
Please check if the Pull Request fulfils these requirements
type: Descriptive NameLink related open issue
[TASK] Refactor ADC driver and fix known bugs #62
Provide a short description
Rewritten ADC driver with not conflicting and user-friendly modes while including couple of new examples
Provide a more detailed list of changes
Does this PR introduce a breaking change?
Yes, each project/example using ADC driver will break. Follow new examples to update DMA transfer code and ADC_Settings struct
Other information
N/A