cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Explorer
Explorer
921 Views
Registered: ‎10-19-2017

Accessing Zynq 7100 LEDS from Linux

I have been reading about the Linux GPIO interface. I was wondering if there was a way to know which number GPIO to append to the /sys/class/gpio/export file in PetaLinux to access the GPIOs controlling the three LEDs on the Zynq 7100 board.

 

 

exportfd = open("/sys/class/gpio/export", O_WRONLY);

 if(exportfd < 0)
 {
  printf("Cannot open GPIO to export it\n");
  exit(1);
 }

 write(exportfd, "<WHAT NUMBER CORRESPONDS TO LEDS?>", 4);
 close(exportfd);

 

 

Tags (3)
0 Kudos
1 Reply
Highlighted
Moderator
Moderator
802 Views
Registered: ‎09-12-2007

Re: Accessing Zynq 7100 LEDS from Linux

There is a brief description at the wiki here that is very helpfull:

http://www.wiki.xilinx.com/Linux+GPIO+Driver

 

 

0 Kudos