Pin Reading

Binkowski, Cassio cassioiks at gmail.com
Wed Apr 4 13:29:19 UTC 2012


On Mon, Apr 2, 2012 at 10:34 AM, Binkowski, Cassio <cassioiks at gmail.com>wrote:

> 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?
>

Any thoughts on this?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20120404/2e054cfb/attachment.html>


More information about the users mailing list