Skip to content
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

cpu/rpx0xx: add initial ADC support #19516

Merged
merged 4 commits into from
Apr 27, 2023

Conversation

dylad
Copy link
Member

@dylad dylad commented Apr 26, 2023

Contribution description

This PR adds initial support for RP2040 ADC peripheral.
It is rather minimalist, and only use oneshot trigger to perform a single acquisition.

I've tested this PR using a potentiometer connected between GND and 3V3.
GP26, GP27, GP28 has been tested.

Testing procedure

Select ADC_RES_12BIT and flash tests/periph_adc
make BOARD=rpi-pico -C tests/periph_adc

Issues/PRs references

None.

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
@github-actions github-actions bot added Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports Area: Kconfig Area: Kconfig integration labels Apr 26, 2023
@dylad dylad added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Apr 26, 2023
@benpicco benpicco requested a review from maribu April 26, 2023 19:15
@dylad dylad requested a review from fabian18 April 26, 2023 19:15
@riot-ci
Copy link

riot-ci commented Apr 26, 2023

Murdock results

✔️ PASSED

a68cfc0 boards/rpi-pico: add ADC support in Kconfig

Success Failures Total Runtime
6931 0 6931 09m:58s

Artifacts

cpu/rpx0xx/periph/adc.c Outdated Show resolved Hide resolved
@dylad dylad force-pushed the cpu/rpx0xx/add_adc_support branch from d4794b7 to adce8b0 Compare April 27, 2023 05:43
Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks good to me, trusting your testing. Some code style nitpicks inline. Please squash / amend right away and feel free to kick bors afterwards.

cpu/rpx0xx/periph/adc.c Outdated Show resolved Hide resolved
cpu/rpx0xx/periph/adc.c Outdated Show resolved Hide resolved
cpu/rpx0xx/periph/adc.c Outdated Show resolved Hide resolved
@dylad
Copy link
Member Author

dylad commented Apr 27, 2023

Oops, I forgot to configure uncrustify on this computer. I'll fix it tonight.

Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
Signed-off-by: Dylan Laduranty <dylan.laduranty@mesotic.com>
@dylad dylad force-pushed the cpu/rpx0xx/add_adc_support branch from adce8b0 to a68cfc0 Compare April 27, 2023 10:15
@dylad
Copy link
Member Author

dylad commented Apr 27, 2023

bors merge

@bors
Copy link
Contributor

bors bot commented Apr 27, 2023

Build succeeded:

@bors bors bot merged commit ffdc1df into RIOT-OS:master Apr 27, 2023
@dylad
Copy link
Member Author

dylad commented Apr 27, 2023

Thanks for the review !

@dylad dylad deleted the cpu/rpx0xx/add_adc_support branch April 27, 2023 12:38
@benpicco benpicco added this to the Release 2023.07 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports Area: Kconfig Area: Kconfig integration CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants