User`s manual

RX62N Group, RX621 Group 4. Library Reference
8) R_INTC_Write
Synopsis
Update an interrupt register.
Prototype
bool R_INTC_Write(
uint16_t data1,
// Register selection
uint8_t data2
// Register value
);
Description
Write the new value to an interrupt register.
[data1]
The register to be updated.
PDL_INTC_REG_IPL or
PDL_INTC_REG_IR_(register) or
PDL_INTC_REG_IER_(register) or
PDL_INTC_REG_IPR_(register) or
PDL_INTC_REG_DTCER_(register) or
PDL_INTC_REG_SWINTR
Select the current CPU interrupt priority level or
Interrupt Request register or
Interrupt Request Enable register or
Interrupt Priority register or
DTC Activation Enable register or
Software interrupt activation register
[data2]
The value to be written to the register.
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.
Write 1 to the SWINTR register to generate a software interrupt request.
Program example
/* RPDL definitions */
#include "r_pdl_intc.h"
/* RPDL device-specific definitions */
#include "r_pdl_definitions.h"
void func( void )
{
/* Set the IPL to 6 */
R_INTC_Write(
PDL_INTC_REG_IPL,
6
);
/* Set the IR for IRQ0 to 0 */
R_INTC_Write(
PDL_INTC_REG_IR_ICU_IRQ0,
0
);
}
R20UT0084EE0112 Rev.1.12 Page 4-25
July. 16, 2014