C55_enableIER0, C55_enableIER1
Application Program Interface
2-29
C Interface
Syntax
C55_enableIER0(oldmask);
C55_enableIER1(oldmask);
Parameters
Uns
oldmask; /* enable mask */
Return Value
Void
Description
C55_disableIER0, C55_disableIER1, C55_enableIER0, and
C55_enableIER1 disable and enable specific internal interrupts by
modifying the Interrupt Enable Register (IER0/IER1). C55_disableIER0
and C55_disableIER1 clear the bits specified by the mask parameter in
the Interrupt Mask Register and return a mask of the bits it cleared.
C55_enableIER0 and C55_enableIER1 set the bits specified by the
oldmask parameter in the Interrupt Mask Register.
C55_disableIER0 and C55_disableIER1 and C55_enableIER0 and
C55_enableIER1 are usually used in tandem to protect a critical section
of code from interrupts. The following code examples show a region
protected from all maskable interrupts:
/* C example */
Uns oldmask;
oldmask0 = c55_disableIER0(~0);
`do some critical operation; `
`do not call TSK_sleep, SEM_post, etc.`
c55_enableIER0(oldmask0);
Note:
DSP/BIOS kernel calls that can cause rescheduling of tasks (for
example, SEM_post and TSK_sleep) should be avoided within a
C55_disableIER0, C55_disableIER1, C55_enableIER0, and /
C55_enableIER1 block since the interrupts can be disabled for an
indeterminate amount of time if a task switch occurs.
You can use C55_disableIER0, C55_disableIER1, C55_enableIER0,
and C55_enableIER1 to disable selected interrupts, while allowing other
interrupts to occur. However, if another hardware interrupt occurs during
C55_enableIER0,
C55_enableIER1
Enable certain maskable interrupts