User`s manual
RX62N Group, RX621 Group 4. Library Reference
9) R_INTC_Modify
Synopsis
Modify an interrupt register.
Prototype
bool R_INTC_Modify(
uint16_t data1,
// Register selection
uint8_t data2,
// Logical operation
uint8_t data3
// Modification value
);
Description
Update the value in an interrupt register.
[data1]
•
The register to be updated.
PDL_INTC_REG_IR_(register) or
PDL_INTC_REG_IER_(register) or
PDL_INTC_REG_IPR_(register)
Select the Interrupt Request register or
Interrupt Request Enable register or
Interrupt Priority register
[data2]
•
The logical operation to be applied to the register contents.
PDL_INTC_AND or
PDL_INTC_OR or
PDL_INTC_XOR
Select between AND (&), OR (|) or Exclusive-OR (^).
[data3]
The value to be used by the logical operation.
Return value
True if the parameter is within range; otherwise false.
Category
Interrupt control
Reference
None.
Remarks
•
This function uses an interrupt routine to modify the IPL bits. If the user has disabled interrupts
(cleared the ‘I’ bit in the PSW register) in their own code, this function will lock up.
•
For (register), select one of the registers listed in the tables starting on page 4-20.
Program example
/* RPDL definitions */
#include "r_pdl_intc.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
void func( void )
{
/* Set bits 6 and 4 in IER09 to 1 */
R_INTC_Modify(
PDL_INTC_REG_IER09,
PDL_INTC_OR,
0x50
);
}
R20UT0084EE0112 Rev.1.12 Page 4-26
July. 16, 2014