
Rev.1.00 May 22 2012
REJ09B0566
4.2.2 33BInterrupt Control Unit
6) R_INTC_Write
Synopsis
Update an interrupt register.
Prototype bool R_INTC_Write(
uint8_t data1, // Register selection
uint8_t data2, // Register number
uint8_t data3 // Register value
);
Description
Write the new value to an interrupt register.
[data1]
• The register to be updated.
PDL_INTC_REG_ICR or
PDL_INTC_REG_IPR or
PDL_INTC_REG_IRQRR or
PDL_INTC_REG_PIRR or
PDL_INTC_REG_PINTER or
PDL_INTC_REG_IBNR or
PDL_INTC_REG_IBCR
Select the current CPU interrupt priority level or
IRQ Control Register
IRQ Priority Register
IRQ Interrupt Request Register
PINT Interrupt Enable Register
PINT Interrupt Request Register
Bank Control Register
Bank Number Register
[data2]
The register number.
ICR: Between 0 and 3
IPR: Between 0 and 22 (16h).
IRQRR: Ignored.
PIRR: Ignored.
PINTER: Ignored.
IBCR: Ignored.
IBCR: Ignored.
[data3]
The value to be written to the register.
Return value
True if the parameter is within range; otherwise false.
Category
Interrupt control
Reference
R_INTC_Read, R_INTC_Modify
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.
Program example
/* PDL definitions */
#include “r_pdl_intc.h”
/* PDL device-specific definitions */
#include “r_pdl_definitions.h”
void func( void )
{
/* Set the IPL to 6 */
R_INTC_Write(
PDL_INTC_REG_IPL,
0,
6
);
}
Komentáře k této Příručce