- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi everyone:
the interrupt register function in nios: int alt_ic_isr_register (alt_u32 ic_id, alt_u32 irq, alt_isr_func isr, void* isr_context, void* flags) isr_context is the input argument to isr . isr_context points to a data structure associated with the device driver instance. i do not understand what is "isr_context " , so i find some codes from internet: some people write base_addr to the void* isr_context; some people write NULLto the void* isr_context; and nois examples write others. in my project, i write base_addr, and the interrupt works what is the meaning of isr_context ? is it right to write base_addr to it? thanks,qd0090.Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Interrupt function looks something like:
void ISR_Handler (void* isr_context){
*** code here ***
}
isr_context is a pointer which gets passed to the interrupt function, you can use it as a data storage.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page