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

Add ability to read Vdd: Looking for preference in how to code the pull request #695

Closed
ajs123 opened this issue Oct 2, 2021 · 2 comments
Labels

Comments

@ajs123
Copy link
Contributor

ajs123 commented Oct 2, 2021

For my application, I'd like to be able to read Vdd. The nrf52 allows this by selecting SAADC channel 9.

I see three options for where to put this:

  1. Add readVdd() to wiring_analog_nrf52.c.
  2. Add a pin for Vdd so that it can be selected in analogRead().
  3. Make analogReadInternal() public in wiring_analog_nrf52.h so that channel 9 can be chosen.

I think the best way is #1 but I wanted to check before adding the code. I'll follow with a PR.

Thanks!

@ajs123 ajs123 added the Feature label Oct 2, 2021
@lyusupov
Copy link
Contributor

lyusupov commented Oct 3, 2021

  1. Add readVdd() to wiring_analog_nrf52.c.

uint32_t analogReadVDD( void )

@ajs123
Copy link
Contributor Author

ajs123 commented Oct 3, 2021

I missed it! Duh!

@ajs123 ajs123 closed this as completed Oct 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants