Pin Reading

Binkowski, Cassio cassioiks at gmail.com
Mon Apr 2 13:34:45 UTC 2012


On Mon, Apr 2, 2012 at 9:58 AM, Sebastian Huber <
sebastian.huber at embedded-brains.de> wrote:

> On 04/02/2012 02:45 PM, Binkowski, Cassio wrote:
>
>> Hi Sebastian,
>>
>> I'm interested in three of them: ARM, AVR and SPARC.
>>
>> But if I want any other board, is there a way of looking for this
>> information?
>>
>
> You have to look in the BSP source code, e.g. the header files.  The
> lpc24xx ARM BSP has for example this API:
>
> http://git.rtems.org/rtems/**tree/c/src/lib/libbsp/arm/**
> lpc24xx/include/io.h<http://git.rtems.org/rtems/tree/c/src/lib/libbsp/arm/lpc24xx/include/io.h>


I'm afraid I didn't find any READ method.
I found just a GET, and it returns a boolean:

*static inline bool lpc24xx_gpio_get(unsigned index)
{
  if (index <= LPC24XX_IO_INDEX_MAX) {
    unsigned port = LPC24XX_IO_PORT(index);
    unsigned bit = LPC24XX_IO_PORT_BIT(index);

    return (LPC24XX_FIO [port].pin & (1U << bit)) != 0;
  } else {
    return false;
  } *

*} *
*
*
Can you advise?

Thanks

>
>
> --
> Sebastian Huber, embedded brains GmbH
>
> Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
> Phone   : +49 89 18 90 80 79-6
> Fax     : +49 89 18 90 80 79-9
> E-Mail  : sebastian.huber at embedded-**brains.de<sebastian.huber at embedded-brains.de>
> PGP     : Public key available on request.
>
> Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20120402/9a30b35d/attachment-0001.html>


More information about the users mailing list