Rev.1.00 2007.11.1
REC10B0002-0100
84
__EnableInterrupt
Synopsis
<Control external interrupt>
Boolean __EnableInterrupt(unsigned long data1, unsigned int data2)
data1 Setup data 1
data2 Setup data 2
Description
Changes the operating condition of a specified external interrupt.
[data1]
RAPI_INT0 Uses _INT0 interrupt.
RAPI_INT1 Uses _INT1 interrupt.
RAPI_INT2 Uses _INT2 interrupt.
RAPI_INT3 Uses _INT3 interrupt.
RAPI_INT4 Uses _INT4 interrupt.
RAPI_INT5 Uses _INT5 interrupt.
RAPI_KEY Uses key input interrupt.
[data2]
Specify the interrupt priority level (0–7) to be set in the interrupt control register.
Return value
If the external interrupt specification is incorrect, RAPI_FALSE is returned; otherwise,
RAPI_TRUE is returned.
Functionality
External interrupt
Reference
__SetInterrupt, __GetInterruptFlag, __ClearInterruptFlag
Remark
•
If an undefined value is specified in the first argument, operation of the API cannot
be guaranteed.
Program example
#include " rapi_interrupt_m16c_62p.h"
void func( void )
{
/* Activate _INT1 interrupt ( interrupt priority level 5 ) */
__EnableInterrupt( RAPI_INT1, 5 );
}