-
Notifications
You must be signed in to change notification settings - Fork 614
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
UP board adc updates #608
base: master
Are you sure you want to change the base?
UP board adc updates #608
Conversation
Some details regarding the UP board are not in-sync with the final production version of the board. This update adds an ADC, removes a UART, and some corrections in the docs for UP. Signed-off-by: Dan O'Donovan <[email protected]>
The current approach used to look up the pin for an AIO channel assumes that the AIO pins are positioned sequentially in the pins array immediately after the GPIO pins. This works for Arduino-style boards, but doesn't port well to other boards where ADC pins may be scattered around the pin array and providing GPIO functionality as well. This commit introduces a different approach by instead searching the pin array for ADC-capable pins, and infers their AIO channel numbers from the order in which they appear in the pin array. This should still work for boards such as Galileo and Edison, and while also supporting boards such as the UP board where the ADC pin appears at an arbitrary position in the pin array. Signed-off-by: Dan O'Donovan <[email protected]>
Merged the first part, going to test the second part quickly. I may just add an aio property channel in the mraa_board_t def. |
Any news? |
Any updates? Will this ever be merged? |
In theory this looks good and should work OK. I remember reviewing it when it was submitted and I liked the idea of not forcing ADC pins past GPIOs, which, as Dan mentioned, is a big limitation for many boards that have ADC pins spread around a multi-function low speed I/O header. Unfortunately, I don't have any of the legacy boards handy to test this further. |
There's a conflict applying db49113. Can anyone shed a bit of light on which lines to keep (or provide an updated PR). |
Some minor updates for the UP board support, and also a proposed change to the pin matching scheme for AIO channels.