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
Fax : +49 89 18 90 80 79-9
E-Mail : sebasti...@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...@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-users
Every BSP handles this differently. Even if we add a rtems_read_pin(X), then what means X on BSP 1, 2, or 3?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?
--
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@embedded-brains.de
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
--
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 : sebasti...@embedded-brains.de
Thanks Sebastian.
However, where do I find such information for the specified BSP?
Cassio
On Mon, Apr 2, 2012 at 4:16 AM, Sebastian Huber <sebasti...@embedded-brains.de> wrote:
Every BSP handles this differently. Even if we add a rtems_read_pin(X), then what means X on BSP 1, 2, or 3?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?
--
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 : sebasti...@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...@rtems.org
http://www.rtems.org/mailman/listinfo/rtems-users
-- Joel Sherrill, Ph.D. Director of Research& Development joel.s...@OARcorp.com On-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available (256) 722-9985
You have to look in the BSP source code, e.g. the header files. The lpc24xx ARM BSP has for example this API: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?
http://git.rtems.org/rtems/tree/c/src/lib/libbsp/arm/lpc24xx/include/io.h
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;
}
--
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@embedded-brains.de