Forum Discussion
Altera_Forum
Honored Contributor
14 years agogpio input and output
I have a de2-115 board and i'm trying to do some basic functions but i'm hitting a roadblock. I used SOPC builder to create a system that has nios ii, two PIO interfaces where one is input and ...
Altera_Forum
Honored Contributor
14 years agoYou need to include <altera_avalon_pio_regs.h> in your code and you can use the IORD_ALTERA_AVALON_PIO_DATA(base) and IOWR_ALTERA_AVALON_PIO_DATA(base, data) macros to read/write to/from your PIO ports.
base is the component's base address, that you can find in the system.h file generated with the BSP.