Pin Reading

Joel Sherrill joel.sherrill at OARcorp.com
Mon Apr 2 13:17:55 UTC 2012


On 04/02/2012 07:09 AM, Binkowski, Cassio wrote:
> Thanks Sebastian.
>
> However, where do I find such information for the specified BSP?
>
There is a proposed set of methods in the http://git.rtems.org/multiio/
package. It has been used on a few projects and the API is growing
organically. Functionality is not being added unless there is a project
requiring it and we can define a solution.  But for Discrete I/O, I know
there is board independent infrastructure to support waiting for
a pin state change interrupt forever or with timeout. You can poll
discrete in, ADCs, or write DACs.

It includes drivers for a couple of PC-104 multi I/O boards. I am interested
in seeing more feedback so we can have more confidence that it is
offering the right services.

Sebastian is completely correct in that the numbering of discrete I/O
pins, DAC, and ADCs is arbitrary. But if RTEMS provides a standard API
for these capabilities, then you can hide the pin numbers with macros.

--joel
> Cassio
>
> On Mon, Apr 2, 2012 at 4:16 AM, Sebastian Huber 
> <sebastian.huber at embedded-brains.de 
> <mailto:sebastian.huber at embedded-brains.de>> wrote:
>
>     On 04/01/2012 09:19 PM, Binkowski, Cassio wrote:
>
>         Dear all,
>
>         Forgive my ignorance, but I just want to know how to read pins
>         with RTEMS.
>         For example, if I want to read a pin in an Arduino I just code
>         it like:
>         analogRead(pinNumber).
>
>         Is this covered in RTEMS or do I have to read the datasheet
>         and make my own code?
>
>
>     Every BSP handles this differently.  Even if we add a
>     rtems_read_pin(X), then what means X on BSP 1, 2, or 3?
>
>     -- 
>     Sebastian Huber, embedded brains GmbH
>
>     Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
>     Phone   : +49 89 18 90 80 79-6 <tel:%2B49%2089%2018%2090%2080%2079-6>
>     Fax     : +49 89 18 90 80 79-9 <tel:%2B49%2089%2018%2090%2080%2079-9>
>     E-Mail  : sebastian.huber at embedded-brains.de
>     <mailto:sebastian.huber at embedded-brains.de>
>     PGP     : Public key available on request.
>
>     Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>     _______________________________________________
>     rtems-users mailing list
>     rtems-users at rtems.org <mailto:rtems-users at rtems.org>
>     http://www.rtems.org/mailman/listinfo/rtems-users
>
>


-- 
Joel Sherrill, Ph.D.             Director of Research&   Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
     Support Available             (256) 722-9985


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20120402/e51b1e0e/attachment-0001.html>


More information about the users mailing list