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

UP board adc updates #608

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

UP board adc updates #608

wants to merge 2 commits into from

Conversation

Dan-Lightsource
Copy link
Contributor

Some minor updates for the UP board support, and also a proposed change to the pin matching scheme for AIO channels.

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]>
@arfoll
Copy link
Contributor

arfoll commented Nov 21, 2016

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.

@nicola-lunghi
Copy link
Contributor

Any news?

@cstatz
Copy link

cstatz commented Apr 25, 2018

Any updates? Will this ever be merged?

@malikabhi05
Copy link
Contributor

@cstatz it looks like the first commit here "update UP board hardware details and enable ADC" was merged after a few minor changes. However, the second commit wasn't merged. @Propanu @pylbert could either of you please check/approve this commit real quick, I will merge it then.

@Propanu
Copy link
Contributor

Propanu commented Apr 25, 2018

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.

@pylbert
Copy link
Contributor

pylbert commented Apr 26, 2018

There's a conflict applying db49113. Can anyone shed a bit of light on which lines to keep (or provide an updated PR).

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

Successfully merging this pull request may close these issues.

7 participants