Forum Discussion
Altera_Forum
Honored Contributor
20 years agothe problem of the PIO interrupts
Hello,everybody! My program can't get into the interrupt fuction. the code like is the following.is there any questions? and I can't use a main() but alt_main(),if I use main() the nis...
Altera_Forum
Honored Contributor
20 years agoYou can't use alt_main() _and_ the alt_irq_register() function. You've got to be using a program with main(). I know that you mentioned that you had troubles compiling code with main() in it, but you have to have it if you want to use the HAL functions. (like alt_irq_register())
By using alt_main() you're telling the tools that you don't want to use any of the HAL's functionality. The count_binary() example shows you how to do this. Best Regards, - slacker