Cyg_Interrupt::Cyg_Interrupt
Name: Cyg_Interrupt::Cyg_Interrupt ( ) - create an interrupt handler
Synopsis:
Cyg_Interrupt::Cyg_Interrupt
(
  cyg_vector   vector,   /* Interrupt vector          */
  cyg_priority priority, /* queue priority            */
  CYG_ADDRWORD data,     /* data pointer              */
  cyg_ISR      *isr,     /* interrupt service routine */
  cyg_DSR      *dsr      /* deferred service routine  */
)
Description: Constructor for an interrupt handler. The queue priority is used only in the case that interrupts are chained.

The isr has the prototype of cyg_uint32 cyg_ISR(cyg_vector vector, CYG_ADDRWORD data). The ISR is called from the VSR. The VSR is usually implemented by eCos itself. If the ISR returns Cyg_Interrupt::HANDLED the VSR will NOT be called, if the ISR returns Cyg_Interrupt::CALL_DSR the VSR is called.

The vsr has the prototype of void cyg_DSR(cyg_vector vector, cyg_ucount32 count, CYG_ADDRWORD data). The DSR returns nothing.

ISR's cannot access the vast majority of kernel routines. The VSR can access more routines. What can and cannot be called safely from these routines I have not found in the documentation yet.

Include: #include <cyg/kernel/intr.hxx>
Returns: nothing
See Also: Cyg_Interrupt::~Cyg_Interrupt

Cyg_Interrupt::~Cyg_Interrupt
Name: Cyg_Interrupt::~Cyg_Interrupt ( ) - delete an interrupt handler
Synopsis:
Cyg_Interrupt::~Cyg_Interrupt
(
  void
)
Description: This is a destructor for an interrupt handler.
Include: #include <cyg/kernel/intr.hxx>
Returns: nothing
See Also: Cyg_Interrupt::Cyg_Interrupt

Cyg_Interrupt::attach
Name: Cyg_Interrupt::attach ( ) - attach an interrupt
Synopsis:
void Cyg_Interrupt::attach
(
  void
)
Description: This attaches the ISR and DSR of an interrupt to the physical interrupt. An interrupt must be attached before the ISR or DSR will be used.
Include: #include <cyg/kernel/intr.hxx>
Returns: nothing
See Also: Cyg_Interrupt::detach

Cyg_Interrupt::detach
Name: Cyg_Interrupt::detach ( ) - detach an interrupt
Synopsis:
void Cyg_Interrupt::detach
(
  void
)
Description: This detaches the ISR and DSR of an interrupt to the physical interrupt.
Include: #include <cyg/kernel/intr.hxx>
Returns: nothing
See Also: Cyg_Interrupt::attach

Cyg_Interrupt::get_vsr
Name: Cyg_Interrupt::get_vsr ( ) - get the VSR pointer of an interrupt
Synopsis:
void Cyg_Interrupt::get_vsr
(
  cyg_vector vector, /* interrupt vector                   */
  cyg_VSR    **vsr   /* address of pointer to retrieve VSR */
)
Description: This function gets the address of the interrupt's VSR writing into to address pointed to by *vsr.
Include: #include <cyg/kernel/intr.hxx>
Returns: nothing
See Also: Cyg_Interrupt::set_vsr

Cyg_Interrupt::set_vsr
Name: Cyg_Interrupt::set_vsr ( ) - set a new VSR
Synopsis:
void Cyg_Interrupt::set_vsr
(
  cyg_vector vector, /* interrupt vector                       */
  cyg_VSR    *vsr,   /* address of the new VSR                 */
  cyg_VSR    **old   /* address of pointer to retrieve old VSR */
)
Description: This function sets a new vsr for the interrupt and writes the address of the old vsr to the address pointed to by *old.
Include: #include <cyg/kernel/intr.hxx>
Returns: nothing
See Also: Cyg_Interrupt::get_vsr

Cyg_Interrupt::disable_interrupts
Name: Cyg_Interrupt::disable_interrupts ( ) - disable interrupts globally
Synopsis:
void Cyg_Interrupt::disable_interrupts
(
  void
)
Description: This disables the interrupts on the calling CPU. Every call to this function must have a matching call to Cyg_Interrupt::enable_interrupts to re-enable interrupts again.
Include: #include <cyg/kernel/intr.hxx>
Returns: nothing
See Also: Cyg_Interrupt::enable_interrupts, Cyg_Interrupt::mask_interrupt

Cyg_Interrupt::enable_interrupts
Name: Cyg_Interrupt::enable_interrupts ( ) - enable interrupts globally
Synopsis:
void Cyg_Interrupt::enable_interrupts
(
  void
)
Description: This enables the interrupts on the calling CPU. If Cyg_Interrupt::disable_interrupts has been called multiple times, this function will have to be called multiple times to actually enable interrupts again.
Include: #include <cyg/kernel/intr.hxx>
Returns: nothing
See Also: Cyg_Interrupt::disable_interrupts, Cyg_Interrupt::unmask_interrupt

Cyg_Interrupt::mask_interrupt
Name: Cyg_Interrupt::mask_interrupt ( ) - mask an interrupt
Synopsis:
void Cyg_Interrupt::mask_interrupt
(
  cyg_vector vector /* interrupt vector */
)
Description: This function masks an interrupt.
Include: #include <cyg/kernel/intr.hxx>
Returns: nothing
See Also: Cyg_Interrupt::mask_interrupt_intunsafe, Cyg_Interrupt::unmask_interrupt, Cyg_Interrupt::unmask_interrupt_intunsafe

Cyg_Interrupt::mask_interrupt_intunsafe
Name: Cyg_Interrupt::mask_interrupt_intunsafe ( ) - interrupt unsafe mask an interrupt
Synopsis:
void Cyg_Interrupt::mask_interrupt_intunsafe
(
  cyg_vector vector /* interrupt vector */
)
Description: This function masks an interrupt but it's not interrupt safe.
Include: #include <cyg/kernel/intr.hxx>
Returns: nothing
See Also: Cyg_Interrupt::mask_interrupt, Cyg_Interrupt::unmask_interrupt, Cyg_Interrupt::unmask_interrupt_intunsafe

Cyg_Interrupt::unmask_interrupt
Name: Cyg_Interrupt::unmask_interrupt ( ) - unmask an interrupt
Synopsis:
void Cyg_Interrupt::unmask_interrupt
(
  cyg_vector vector /* interrupt vector */
)
Description: This function unmasks an interrupt.
Include: #include <cyg/kernel/intr.hxx>
Returns: nothing
See Also: Cyg_Interrupt::mask_interrupt, Cyg_Interrupt::mask_interrupt_intunsafe, Cyg_Interrupt::unmask_interrupt_intunsafe

Cyg_Interrupt::unmask_interrupt_intunsafe
Name: Cyg_Interrupt::unmask_interrupt_intunsafe ( ) - interrupt unsafe unmask an interrupt
Synopsis:
void Cyg_Interrupt::unmask_interrupt
(
  cyg_vector vector /* interrupt vector */
)
Description: This function unmasks an interrupt but it's not interrupt safe.
Include: #include <cyg/kernel/intr.hxx>
Returns: nothing
See Also: Cyg_Interrupt::mask_interrupt, Cyg_Interrupt::mask_interrupt_intunsafe, Cyg_Interrupt::unmask_interrupt

Cyg_Interrupt::acknowledge_interrupt
Name: Cyg_Interrupt::acknowledge_interrupt ( ) - acknowledge an interrupt
Synopsis:
void Cyg_Interrupt::acknowledge_interrupt
(
  cyg_vector vector /* interrupt vector */
)
Description: This function acknowledges an interrupt.
Include: #include <cyg/kernel/intr.hxx>
Returns: nothing
See Also:

Cyg_Interrupt::configure_interrupt
Name: Cyg_Interrupt::configure_interrupt ( ) - configure an interrupt
Synopsis:
void Cyg_Interrupt::configure_interrupt
(
  cyg_vector vector, /* interrupt vector                 */
  cyg_bool   level,  /* level or edge triggered          */
  cyg_bool   up      /* hi/lo level, rising/falling edge */
)
Description: This configures an interrupt for level triggering or edge, as well as hi/low and rising/fallig edge.
Include: #include <cyg/kernel/intr.hxx>
Returns: nothing
See Also:

Cyg_Interrupt::set_cpu
Name: Cyg_Interrupt::set_cpu ( ) - set cpu
Synopsis:
void Cyg_Interrupt::set_cpu
(
  cyg_vector       vector, /* interrupt vector */
  HAL_SMP_CPU_TYPE cpu     /* CPU to set       */
)
Description: This sets a CPU. Honestly, I have no idea what this does in an SMP system but when I find out I'll properly document it.
Include: #include <cyg/kernel/intr.hxx>
Returns: nothing
See Also: Cyg_Interrupt::get_cpu

Cyg_Interrupt::get_cpu
Name: Cyg_Interrupt::get_cpu ( ) - get cpu
Synopsis:
HAL_SMP_CPU_TYPE Cyg_Interrupt::get_cpu
(
  cyg_vector vector /* interrupt vector */
)
Description: This gets a CPU. Honestly, I have no idea what this does in an SMP system but when I find out I'll properly document it.
Include: #include <cyg/kernel/intr.hxx>
Returns: presumably the CPU attached to this interrupt.
See Also: Cyg_Interrupt::set_cpu