RTEMS GPIO usage issue

Gedare Bloom gedare at rtems.org
Tue Jun 3 17:02:33 UTC 2014


gpiolib is part of the Aeroflex Gaisler release of RTEMS. You may like
to try contact them for support. Some of their employees do watch this
list and might respond.

-Gedare

On Tue, Jun 3, 2014 at 12:48 PM, Marjorie Dugrand
<marjorie.dugrand at gmail.com> wrote:
> Hi All,
>
> I am currently working on a FPGA Nexys3, I synthesized on it a processor
> Leon3, above which I put an OS RTEMS.
>
> I faced a lot of difficulties developing RTEMS applications, so I
> decided to focus on interacting with the LEDs and switches of the
> Nexys3, but even this I can't seem to be able to implement. I think I
> understood the methods I had to use, and designed a little test of my
> own :
>
> #include <rtems.h>
> #include <gpiolib.h>
> #include <stdio.h>
> #include <stdlib.h>
>
> #define LED_ADR IO_L2P_CMPCLK
>
> int main() {
>     void * port;
>     int val = 0;
>
>      printf("Attempting to open the port\n");
>      gpiolib_initialize();
>      port = gpiolib_open(LED_ADR);
>      if (port == NULL) {
>          printf("ok not working\n");
>          exit(-1);
>      }
>      printf("Opening succeded\n");
>      printf("Attempting to write in the port\n");
>      gpiolib_set(port,0,0);
>      printf("Writing succeeded\n");
>      printf("Attempting to read the port\n");
>      gpiolib_get(port, &val);
>      printf("Reading succeeded\n");
>
>      printf("value : %d\n, val);
>
>      printf("Attempting to close the port\n");
>      gpiolib_close(port);
>      printf("Port closed\n");
>
>      return 0;
>   }
>
>   but I spent days trying to find out the adress of the ports I would
>   like to open,
>   and searched all over the Internet (including all the available
>   documentation),
>   with no success.
>
>  I would really like it if someone could help me.
>
>   Many thanks,
>
>   Marjorie Dugrand
>
> _______________________________________________
> rtems-devel mailing list
> rtems-devel at rtems.org
> http://www.rtems.org/mailman/listinfo/rtems-devel
>



More information about the devel mailing list