Forum Discussion
Altera_Forum
Honored Contributor
12 years agoho about
///////////////////////// c code (^v^ )///////////////////////////////////////// # include <io.h> # include <system.h> ..... short pio_button; pio_button = IORD_16DIRECT(PIO_BUTTON_BASE,0); IOWR_16DIRECT(PIO_LED_BASE,0,pio_button); /////////////////////////////////////////////////////////////////////////////////// IORD_16DIRECT is reading register from address of PIO_BUTTON_BASE IOWR_16DIRECT is writing data to PIO_LED_BASE those base addresses are written in <system.h> serch IOWR_*DIRECT functions