Forum Discussion
Altera_Forum
Honored Contributor
15 years agoLook into system.h file.
You'll find the *_BASE defines for every sopc peripheral. Use those of led and switch pio ports to read and write pio status. For example if these were LED_BASE and SWITCH_BASE you write: IOWR_ALTERA_AVALON_PIO_DATA(LED_BASE, led_mask); to set led status sw = IORD_ALTERA_AVALON_PIO_DATA(SWITCH_BASE); to get switch status