Rev.1.00 2007.11.1
REC10B0002-0100
85
__GetInterruptFlag
Synopsis
<Get the status of external interrupt flag>
Boolean __GetInterruptFlag(unsigned long data1, unsigned int *data2))
data1 Setup data 1
data2 Pointer to the buffer in which the acquired flag data is stored
Description
Gets the value of interrupt request flag 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]
Value of interrupt request flag (0: Interrupt not requested; 1: Interrupt requested)
Return value
If the external interrupt specification is incorrect, RAPI_FALSE is returned; otherwise,
RAPI_TRUE is returned.
Functionality
External interrupt
Reference
__SetInterrupt, __EnableInterrupt, __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 )
{
unsigned char data;
/* Get flag of _INT2 interrupt */
__GetInterruptFlag( RAPI_INT2, &data );
}
00000 0 0