Forum Discussion
Altera_Forum
Honored Contributor
16 years agotry this:
# include "system.h"# include "altera_avalon_pio_regs.h"# include "alt_types.h"# include "stdio.h"# include "stdlib.h" int alt_main (void){ alt_u8 button = 0x2; while(1){ button = IORD_ALTERA_AVALON_PIO_DATA(BUTTON_PIO_BASE); IOWR_ALTERA_AVALON_PIO_DATA(LED_PIO_BASE, button); } }