cyg_interrupt_create | |
Name: | cyg_interrupt_create ( ) - create an interrupt handler |
---|---|
Synopsis: | void cyg_interrupt_create ( cyg_vector_t vector, /* interrupt vector */ cyg_priority_t priority, /* priority of interrupt */ cyg_addrword_t data, /* data pointer */ cyg_ISR_t *isr, /* interrupt service routine */ cyg_DSR_t *dsr, /* deferred service routine */ cyg_handle_t *handle, /* returned handle to interrupt */ cyg_interrupt *intr /* put interrupt here */ ) |
Description: | This creates a new interrupt handler. Interrupts are highly architecture dependent. The queue priority is used only in the case that interrupts are chained. Interrupts need to be attached before they will be called by the system. 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_ISR_HANDLED the DSR will NOT be called, if the ISR returns CYG_ISR_CALL_DSR the DSR is called. The "dsr" 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 DSR can access more routines. What can and cannot be called safely from these routines I have not found in the documentation yet. The "handle" returns a handle to the newly created handler. The "intr" argument is an interrupt object that is used for memory storage. |
Include: | #include <cyg/kernel/kapi.h> |
Returns: | nothing |
See Also: | cyg_interrupt_delete, cyg_interrupt_attach, cyg_interrupt_detach, cyg_interrupt_get_vsr, cyg_interrupt_set_vsr, cyg_interrupt_configure |
cyg_interrupt_delete | |
Name: | cyg_interrupt_delete ( ) - delete an interrupt handler |
---|---|
Synopsis: | void cyg_interrupt_delete ( cyg_handle_t interrupt /* interrupt to delete */ ) |
Description: | This removes an interrupt handler from the system |
Include: | #include <cyg/kernel/kapi.h> |
Returns: | nothing |
See Also: | cyg_interrupt_create, cyg_interrupt_attach, cyg_interrupt_detach |
cyg_interrupt_attach | |
Name: | cyg_interrupt_attach ( ) - attach an interrupt vector |
---|---|
Synopsis: | void cyg_interrupt_attach ( cyg_handle_t interrupt /* interrupt to attach */ ) |
Description: | This attaches an interrupt to the physical layer. An interrupt cannot be called by the hardware until it's attached. |
Include: | #include <cyg/kernel/kapi.h> |
Returns: | nothing |
See Also: | cyg_interrupt_create, cyg_interrupt_delete, cyg_interrupt_detach |
cyg_interrupt_detach | |
Name: | cyg_interrupt_detach ( ) - detach an interrupt |
---|---|
Synopsis: | void cyg_interrupt_detach ( cyg_handle_t interrupt /* interrupt to detach */ ) |
Description: | This detaches an interrupt from the physical layer. |
Include: | #include <cyg/kernel/kapi.h> |
Returns: | nothing |
See Also: | cyg_interrupt_create, cyg_interrupt_delete, cyg_interrupt_attach |
cyg_interrupt_get_vsr | |
Name: | cyg_interrupt_get_vsr ( ) - get VSR pointer of an interrupt |
---|---|
Synopsis: | void cyg_interrupt_get_vsr ( cyg_vector_t vector, /* vector to get */ cyg_VSR_t **vsr /* pointer to store vsr pointer */ ) |
Description: | This gets an interrupt's associated VSR through the second argument. It is rarely necessary to change or modify the VSR of a system since VSR's are normally setup by the eCos HAL layer. |
Include: | #include <cyg/kernel/kapi.h> |
Returns: | nothing. |
See Also: | cyg_interrupt_create, cyg_interrupt_get_vsr, cyg_interrupt_set_vsr |
cyg_interrupt_set_vsr | |
Name: | cyg_interrupt_set_vsr ( ) - set the VSR of an interrupt |
---|---|
Synopsis: | void cyg_interrupt_set_vsr ( cyg_vector_t vector, /* vector to set */ cyg_VSR_t *vsr /* pointer to new vsr */ ) |
Description: | This sets an interrupt's VSR. It is rarely necessary to change or modify the VSR of a system since VSR's are normally setup by the eCos HAL layer. |
Include: | #include <cyg/kernel/kapi.h> |
Returns: | nothing. |
See Also: | cyg_interrupt_create, cyg_interrupt_delete, cyg_interrupt_get_vsr |
cyg_interrupt_disable | |
Name: | cyg_interrupt_disable ( ) - disable all interrupts |
---|---|
Synopsis: | void cyg_interrupt_disable ( void ) |
Description: | This disables all interrupts in the system. Avoid using this function unless strictly necessary since it will affect interrupt latency. It is better to disable thread context switching. This call can be nested, i.e. every call to cyg_interrupt_disable must be matched with cyg_interrupt_enable to re-enable interrupts. |
Include: | #include <cyg/kernel/kapi.h> |
Returns: | nothing |
See Also: | cyg_interrupt_enable, cyg_interrupt_mask, cyg_interrupt_mask_intunsafe, cyg_interrupt_unmask, cyg_interrupt_unmask_intunsafe |
cyg_interrupt_enable | |
Name: | cyg_interrupt_enable ( ) - re-enable interrupts |
---|---|
Synopsis: | void cyg_interrupt_enable ( void ) |
Description: | This is the complement to cyg_interrupt_disable. For each call to cyg_interrupt_disable, there must be a matching call to cyg_interrupt_enable to re-enable interrupts. Be cautious in using these functions since they will affect overall system interrupt latency. |
Include: | #include <cyg/kernel/kapi.h> |
Returns: | nothing |
See Also: | cyg_interrupt_disable, cyg_interrupt_mask, cyg_interrupt_mask_intunsafe, cyg_interrupt_unmask, cyg_interrupt_unmask_intunsafe |
cyg_interrupt_mask | |
Name: | cyg_interrupt_mask ( ) - mask a single interrupt vector |
---|---|
Synopsis: | void cyg_interrupt_mask ( cyg_vector_t vector /* vector to mask */ ) |
Description: | This function masks a single interrupt. |
Include: | #include <cyg/kernel/kapi.h> |
Returns: | nothing |
See Also: | cyg_interrupt_disable, cyg_interrupt_enable, cyg_interrupt_mask_intunsafe, cyg_interrupt_unmask, cyg_interrupt_unmask_intunsafe |
cyg_interrupt_mask_intunsafe | |
Name: | cyg_interrupt_mask_intunsafe ( ) - mask interrupt, not interrupt safe |
---|---|
Synopsis: | void cyg_interrupt_mask_intunsafe ( cyg_vector_t vector /* vector to mask */ ) |
Description: | This function masks a single interrupt. This call is not interrupt safe. |
Include: | #include <cyg/kernel/kapi.h> |
Returns: | nothing |
See Also: | cyg_interrupt_disable, cyg_interrupt_enable, cyg_interrupt_mask, cyg_interrupt_unmask, cyg_interrupt_unmask_intunsafe |
cyg_interrupt_unmask | |
Name: | cyg_interrupt_unmask ( ) - unmask an interrupt |
---|---|
Synopsis: | void cyg_interrupt_unmask ( cyg_vector_t vector /* vector to unmask */ ) |
Description: | This unmasks an interrupt. |
Include: | #include <cyg/kernel/kapi.h> |
Returns: | nothing |
See Also: | cyg_interrupt_disable, cyg_interrupt_enable, cyg_interrupt_mask, cyg_interrupt_mask_intunsafe, cyg_interrupt_unmask_intunsafe |
cyg_interrupt_unmask_intunsafe | |
Name: | cyg_interrupt_unmask_intunsafe ( ) - unmask an interrupt, interrupt unsafe |
---|---|
Synopsis: | void cyg_interrupt_unmask_intunsafe ( cyg_vector_t vector /* vector to unmask */ ) |
Description: | This masks and interrupt. This call is not interrupt safe. |
Include: | #include <cyg/kernel/kapi.h> |
Returns: | nothing |
See Also: | cyg_interrupt_disable, cyg_interrupt_enable, cyg_interrupt_mask, cyg_interrupt_mask_intunsafe, cyg_interrupt_unmask |
cyg_interrupt_acknowledge | |
Name: | cyg_interrupt_acknowledge ( ) - acknowledge an interrupt |
---|---|
Synopsis: | void cyg_interrupt_acknowledge ( cyg_vector_t vector /* vector to acknowledge */ ) |
Description: | This acknowledges (clears) an interrupt. |
Include: | #include <cyg/kernel/kapi.h> |
Returns: | |
See Also: | cyg_interrupt_create, cyg_interrupt_delete, cyg_interrupt_attach, cyg_interrupt_detach |
cyg_interrupt_configure | |
Name: | cyg_interrupt_configure ( ) - configure an interrupt |
---|---|
Synopsis: | void cyg_interrupt_configure ( cyg_vector_t vector, /* vector to configure */ cyg_bool_t level, /* level or edge triggered */ cyg_bool_t up /* rising/falling edge, high/low level */ ) |
Description: | This configures an interrupt for level or edge triggering as well as rising/falling edge or high/low level. |
Include: | #include <cyg/kernel/kapi.h> |
Returns: | nothing |
See Also: | cyg_interrupt_create |
cyg_interrupt_set_cpu | |
Name: | cyg_interrupt_set_cpu ( ) - set a CPU |
---|---|
Synopsis: | void cyg_interrupt_set_cpu ( cyg_vector_t vector, /* vector to control */ cyg_cpu_t cpu /* CPU to set */ ) |
Description: | I really have no idea what this does in an SMP sytem. |
Include: | #include <cyg/kernel/kapi.h> |
Returns: | nothing |
See Also: | cyg_interrupt_get_cpu |
cyg_interrupt_get_cpu | |
Name: | cyg_interrupt_get_cpu ( ) - get CPU |
---|---|
Synopsis: | cyg_cpu_t cyg_interrupt_get_cpu ( cyg_vector_t vector /* vector to control */ ) |
Description: | I really have no idea what this does in an SMP system |
Include: | #include <cyg/kernel/kapi.h> |
Returns: | something, apparently the CPU a vector is attached to. |
See Also: | cyg_interrupt_set_cpu |