Hey guys now i have good news. Interruptions are working here!
I make a single exemple for help others guys:
/********************************************************/
My context: I have 1 IRQ on my system. IRQ N.º 1.
/********************************************************/# include <stdio.h># include <sys/alt_irq.h>
/********************************************************/
int main(){
alt_u32 id = 1;
volatile int button=1;
printf("star
t:\n");
alt_irq_register( id, (void*)&button, my_isr );
while(1){
if(button!=0){
printf("exception runing...\n");
button=0;
}
else
printf("main runing... \n");
}
return 0;
}
/********************************************************/
static void my_isr(void* context, alt_u32 id)
{
int* button = (int *)context;
if( id == 1 ) //test interruption id
*button = 1;
else
*button = 0;
}
/********************************************************/
Slacker, thanks for exemple. Its help me too
^^