Sorry, you need to enable JavaScript to visit this website.

linux application

Unsolved
4 posts / 0 new
roumarou's picture
roumarou
Junior(0)
linux application

Good evening, after build in the linux zedboard. I want to turn the LEDs without the write_led . with a Linux application in the SDK tool:

using the port in the file system.ucf
Net processing_system7_0_GPIO <7> LOC = T22 | IOSTANDARD = LVCMOS33;
Net processing_system7_0_GPIO <8> LOC = T21 | IOSTANDARD = LVCMOS33;
Net processing_system7_0_GPIO <9> LOC = U22 | = IOSTANDARD= LVCMOS33;
Net processing_system7_0_GPIO <10> LOC = U21 | = IOSTANDARD =LVCMOS33;
Net processing_system7_0_GPIO <11> LOC = V22 | = IOSTANDARD =LVCMOS33;
Net processing_system7_0_GPIO <12> LOC = W22 | IOSTANDARD = LVCMOS33;
Net processing_system7_0_GPIO <13> LOC = U19 | = IOSTANDARD =LVCMOS33;
Net processing_system7_0_GPIO <14> LOC = U14 | = IOSTANDARD= LVCMOS33;

I don't no if the port using is correct or not?

# include "xgpio.h"
# include "xparameters.h"
int main ();
{
xgpio LED;

XGpio_Initialize (& led, XPAR_PS7_GPIO_0_DEVICE_ID);
XGpio_SetDataDirection (& LED,1,x0000)//i can find the right mask derection Bits 7-14
XGpio_DiscreteWrite (& LED,1,0xffff);

return 0;
}

thank you :)

MikeWhy's picture
MikeWhy
Junior(0)
Google...

Linux supports user space gpio through reads and writes to special files. You don't have to write a special driver. Google on Linux GPIO.

eactor's picture
eactor
Junior(4)
It's also part of the Avnet

It's also part of the Avnet Speedway Training "mplementing Linux on the Zynq-7000 SoC" and discussed in:
-Chapter-3.1 Linux Device Drivers View
-Lab-3.1 Device Drivers and MIO GPIO Hardware

cheers eactor

roumarou's picture
roumarou
Junior(0)
@eactor, @mikewhy: thank you

@eactor, @mikewhy: thank you for your help :)