Forum Discussion
Altera_Forum
Honored Contributor
12 years agoThank you Daixiwen !!
Now I'm not so confused. One more question, in handle_my_interrupt(void * context, uint32_t id) I have to work with some variables that are defined in main(). So, I have added some pointers to the handle_my_interrup function: handle_my_interrup(void * context, uint32_t id, uint8_t * var_ptr1 , uint8_t var_ptr1). After doing so and rebuilding the preject I get this warning in corrispondence of alt_irq_register(my_pio_irq_interrupt_controller_id, my_pio_irq, handle_my_interrupt, edge_capture_ptr, 0x0) fuction: warning: passing argument 3 of alt_ic_isr_register from incompatible pointer type
The warning disappear if I rewrite the handle_my_interrupt() routine with the suggested two input arguments. How can I modify the main vars with my interrupt routine ?? Moreover, the interrupt has to be launched when the pin of my slave harware (set as input PIO) go HIGH. This is why I have configured the PIO as rising edge. Should I still change it to level ?? Thank you for the help. I really appreciate. Have a nice day !