UP board adc updates#608
Open
Dan-Lightsource wants to merge 2 commits intoeclipse-mraa:masterfrom
emutex:up-board-adc-updates
Open
UP board adc updates#608Dan-Lightsource wants to merge 2 commits intoeclipse-mraa:masterfrom emutex:up-board-adc-updates
Dan-Lightsource wants to merge 2 commits intoeclipse-mraa:masterfrom
emutex:up-board-adc-updates
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 <dan@emutex.com>
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 <dan@emutex.com>
Contributor
|
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. |
Contributor
|
Any news? |
|
Any updates? Will this ever be merged? |
Contributor
Contributor
|
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. |
Contributor
|
There's a conflict applying db49113. Can anyone shed a bit of light on which lines to keep (or provide an updated PR). |
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.
Some minor updates for the UP board support, and also a proposed change to the pin matching scheme for AIO channels.