Well, this is not really what i want. I will try to be more specific :
I launched some examples that i found in the following directory : DE2_demonstrations\DE2_NET\hello_led_0 (from a resource pack by Altera)
I tried to figure out what does this program do and how it does it.
Well, this program prints text on the LCD screen and lights some green leds thanks to buttons.
After a few tests i isolated the function which is responsible to light the green leds when i press the key buttons. Here is its code :
void init_button_irq()
{
/* Enable all 4 button interrupts. */
set_pio_irq_mask(BUTTON_PIO_BASE, BUTTON_INT_MASK);
/* Reset the edge capture register. */
set_pio_edge_cap(BUTTON_PIO_BASE, 0x0);
/* Register the interrupt handler. */
alt_irq_register( BUTTON_PIO_IRQ, NULL, (void*)handle_button_interrupts );
}
The questions that i am asking to myself are :
what are those functions :
- set_pio_irq_mask()
- set_pio_edge_cap()
- alt_irq_register()
I know that BUTTON_PIO_BASE, BUTTON_INT_MASK, BUTTON_PIO_IRQ can be found in the file "system.". However i really don't know what are they used for in this example (and even anywhere else).
This is the kind of things that i want to learn and understand for my project. Do you have any idea where i could find that kind of knowledge ?