Forum Discussion
Altera_Forum
Honored Contributor
13 years agoYou don't need that init stuff... Where did You find that? Try this:
# include "altera_avalon_pio_regs.h"# include "system.h"# include <stddef.h>
int main(void) {
while (1)
{
usleep(1000*1000);
IOWR_ALTERA_AVALON_PIO_DATA(USER_LEDS_BASE, 1);
usleep(1000*1000);
IOWR_ALTERA_AVALON_PIO_DATA(USER_LEDS_BASE, 0);
}
return 0;
}