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

RFC - ADC API not abstract enough. #2273

Open
mlaz opened this issue Apr 17, 2020 · 2 comments
Open

RFC - ADC API not abstract enough. #2273

mlaz opened this issue Apr 17, 2020 · 2 comments

Comments

@mlaz
Copy link
Contributor

mlaz commented Apr 17, 2020

Currently the ADC API lacks on device and channel configuration data structures. This led us to having drivers which work in different fashions and use different configuration data structures. It made us deal with manufacturer SDK data structures on app code and stopped us from having an adc_test app (like we do with pwm_test) which besides being example code is helpful to test the drivers during manufacturer SDK code updates.

This issue aims to find an ADC API witch abstracts as much as possible the hardware thus allowing more homogenous usage across drivers.

At this point I did a few changes on the ADC API and nRF52 driver so it works with the test app.
The test app is based on the one we have on this tutorial and it can improved.

Please review and comment.

@mlaz mlaz changed the title RFC - ADC API not abstract enough for a test app. RFC - ADC API not abstract enough. Apr 17, 2020
@caspermeijn
Copy link
Contributor

I think this is an interesting idea. I already found it strange that the nrf52 ADC drivers where to MCU specific.

  • I think it would be useful to see more then one driver use this api, then you will see if this model matches a different MCU.
  • I think it is an open question what to do if a feature is not supported by the hardware. For example an ACQ_TIME of 50 us will now result in 10 us selected, but 40us would be more appropriate.
  • I added some inline comments to the commit, however these where not linked to this issue as this is not a PR.

@shanyechungu
Copy link

Please also include example code of multiple channel scan mode for nrf52 SAADC. Thanks,

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

No branches or pull requests

3 participants