forked from Imagelibrary/rtems
2007-12-08 Till Straumann <strauman@slac.stanford.edu>
*shared/irq/irq_supp.h: removed cpp test for BSP_SHARED_HANDLER_SUPPORT; BSPs using irq_supp.h *must* implement shared handlers.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2007-12-08 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
|
*shared/irq/irq_supp.h: removed cpp test for
|
||||||
|
BSP_SHARED_HANDLER_SUPPORT; BSPs using irq_supp.h
|
||||||
|
*must* implement shared handlers.
|
||||||
|
|
||||||
2007-12-06 Till Straumann <strauman@slac.stanford.edu>
|
2007-12-06 Till Straumann <strauman@slac.stanford.edu>
|
||||||
|
|
||||||
* shared/openpic/openpic.c, shared/openpic/openpic.h:
|
* shared/openpic/openpic.c, shared/openpic/openpic.h:
|
||||||
|
|||||||
@@ -57,10 +57,16 @@ struct _BSP_Exception_frame;
|
|||||||
|
|
||||||
/* IRQ dispatcher to be defined by the PIC driver; note that it MUST
|
/* IRQ dispatcher to be defined by the PIC driver; note that it MUST
|
||||||
* implement shared interrupts.
|
* implement shared interrupts.
|
||||||
* Note that the exception frame passed to this handler is not very
|
* Note also that the exception frame passed to this handler is not very
|
||||||
* meaningful. Only the volatile registers and info are set up.
|
* meaningful. Only the volatile registers and vector info are stored.
|
||||||
|
*
|
||||||
|
*******************************************************************
|
||||||
|
* The routine must return zero if the interrupt was handled. If a
|
||||||
|
* nonzero value is returned the dispatcher may panic and flag an
|
||||||
|
* uncaught exception.
|
||||||
|
*******************************************************************
|
||||||
*/
|
*/
|
||||||
void C_dispatch_irq_handler (struct _BSP_Exception_frame *frame, unsigned int excNum);
|
int C_dispatch_irq_handler (struct _BSP_Exception_frame *frame, unsigned int excNum);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Snippet to be used by PIC drivers;
|
* Snippet to be used by PIC drivers;
|
||||||
@@ -76,29 +82,23 @@ bsp_irq_dispatch_list(
|
|||||||
rtems_irq_hdl sentinel
|
rtems_irq_hdl sentinel
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
register uint32_t l_orig;
|
register uint32_t l_orig;
|
||||||
|
|
||||||
l_orig = _ISR_Get_level();
|
l_orig = _ISR_Get_level();
|
||||||
|
|
||||||
/* Enable all interrupts */
|
/* Enable all interrupts */
|
||||||
_ISR_Set_level(0);
|
_ISR_Set_level(0);
|
||||||
|
|
||||||
#ifndef BSP_SHARED_HANDLER_SUPPORT
|
rtems_irq_connect_data* vchain;
|
||||||
rtems_hdl_tbl[irq].hdl(rtems_hdl_tbl[irq].handle);
|
for( vchain = &tbl[irq];
|
||||||
#else
|
((int)vchain != -1 && vchain->hdl != sentinel);
|
||||||
{
|
vchain = (rtems_irq_connect_data*)vchain->next_handler )
|
||||||
rtems_irq_connect_data* vchain;
|
{
|
||||||
for( vchain = &tbl[irq];
|
vchain->hdl(vchain->handle);
|
||||||
((int)vchain != -1 && vchain->hdl != sentinel);
|
}
|
||||||
vchain = (rtems_irq_connect_data*)vchain->next_handler )
|
|
||||||
{
|
|
||||||
vchain->hdl(vchain->handle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* Restore original level */
|
/* Restore original level */
|
||||||
_ISR_Set_level(l_orig);
|
_ISR_Set_level(l_orig);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|||||||
Reference in New Issue
Block a user