提交 4586e48c 编写于 作者: B Bernard Xiong

Merge pull request #374 from limxuzheng/master

add a support for rx62n
/* Adapted for use with IAR Embedded Workbench */
/*""FILE COMMENT""*******************************************************
* System Name : Interrupt program for RX62Nxx
* File Name : Interrupt_INTC.c
* Version : 1.02
* Contents : Interrupt handlers for the external interrupts
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#include "r_pdl_intc.h"
#include "r_pdl_definitions.h"
#include "r_pdl_user_definitions.h"
/* External functions */
extern void PowerON_Reset_PC(void);
extern void rpdl_ADC_10_Start(void);
/* CMT control register definition */
#define CMSTR_ADDRESS(a) ( (volatile uint16_t *)&CMT.CMSTR0 + ( (0x10u * (a >> 1)) / sizeof(uint16_t)) )
/*""FUNC COMMENT""***************************************************
* Module outline: External interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_XXXX(void)
*-------------------------------------------------------------------
* Function : Interrupt processing function for External interrupts
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*------------------------------------------------------------------
* Input :
* Output :
*-------------------------------------------------------------------
* Use function : rpdl_INTC_callback_func[n]()
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if FAST_INTC_VECTOR == VECT_ICU_IRQ0
__fast_interrupt void Interrupt_IRQ0(void)
#else
#pragma vector = VECT_ICU_IRQ0
__interrupt void Interrupt_IRQ0(void)
#endif
{
/* Call the user function */
if (rpdl_INTC_callback_func[PDL_INTC_IRQ0] != PDL_NO_FUNC)
{
rpdl_INTC_callback_func[PDL_INTC_IRQ0]();
}
}
#if FAST_INTC_VECTOR == VECT_ICU_IRQ1
__fast_interrupt void Interrupt_IRQ1(void)
#else
#pragma vector = VECT_ICU_IRQ1
__interrupt void Interrupt_IRQ1(void)
#endif
{
/* Call the user function */
if (rpdl_INTC_callback_func[PDL_INTC_IRQ1] != PDL_NO_FUNC)
{
rpdl_INTC_callback_func[PDL_INTC_IRQ1]();
}
}
#if FAST_INTC_VECTOR == VECT_ICU_IRQ2
__fast_interrupt void Interrupt_IRQ2(void)
#else
#pragma vector = VECT_ICU_IRQ2
__interrupt void Interrupt_IRQ2(void)
#endif
{
/* Call the user function */
if (rpdl_INTC_callback_func[PDL_INTC_IRQ2] != PDL_NO_FUNC)
{
rpdl_INTC_callback_func[PDL_INTC_IRQ2]();
}
}
#if FAST_INTC_VECTOR == VECT_ICU_IRQ3
__fast_interrupt void Interrupt_IRQ3(void)
#else
#pragma vector = VECT_ICU_IRQ3
__interrupt void Interrupt_IRQ3(void)
#endif
{
/* Call the user function */
if (rpdl_INTC_callback_func[PDL_INTC_IRQ3] != PDL_NO_FUNC)
{
rpdl_INTC_callback_func[PDL_INTC_IRQ3]();
}
}
#if FAST_INTC_VECTOR == VECT_ICU_IRQ4
__fast_interrupt void Interrupt_IRQ4(void)
#else
#pragma vector = VECT_ICU_IRQ4
__interrupt void Interrupt_IRQ4(void)
#endif
{
/* Call the user function */
if (rpdl_INTC_callback_func[PDL_INTC_IRQ4] != PDL_NO_FUNC)
{
rpdl_INTC_callback_func[PDL_INTC_IRQ4]();
}
}
#if FAST_INTC_VECTOR == VECT_ICU_IRQ5
__fast_interrupt void Interrupt_IRQ5(void)
#else
#pragma vector = VECT_ICU_IRQ5
__interrupt void Interrupt_IRQ5(void)
#endif
{
#ifdef DEVICE_PACKAGE_TFLGA_85
/* This pin is not available on the 85-pin package */
nop();
#else
/* Call the user function */
if (rpdl_INTC_callback_func[PDL_INTC_IRQ5] != PDL_NO_FUNC)
{
rpdl_INTC_callback_func[PDL_INTC_IRQ5]();
}
#endif
}
#if FAST_INTC_VECTOR == VECT_ICU_IRQ6
__fast_interrupt void Interrupt_IRQ6(void)
#else
#pragma vector = VECT_ICU_IRQ6
__interrupt void Interrupt_IRQ6(void)
#endif
{
#ifdef DEVICE_PACKAGE_TFLGA_85
/* This pin is not available on the 85-pin package */
nop();
#else
/* Call the user function */
if (rpdl_INTC_callback_func[PDL_INTC_IRQ6] != PDL_NO_FUNC)
{
rpdl_INTC_callback_func[PDL_INTC_IRQ6]();
}
#endif
}
#if FAST_INTC_VECTOR == VECT_ICU_IRQ7
__fast_interrupt void Interrupt_IRQ7(void)
#else
#pragma vector = VECT_ICU_IRQ7
__interrupt void Interrupt_IRQ7(void)
#endif
{
#ifdef DEVICE_PACKAGE_TFLGA_85
/* This pin is not available on the 85-pin package */
nop();
#else
/* Call the user function */
if (rpdl_INTC_callback_func[PDL_INTC_IRQ7] != PDL_NO_FUNC)
{
rpdl_INTC_callback_func[PDL_INTC_IRQ7]();
}
#endif
}
#if FAST_INTC_VECTOR == VECT_ICU_IRQ8
__fast_interrupt void Interrupt_IRQ8(void)
#else
#pragma vector = VECT_ICU_IRQ8
__interrupt void Interrupt_IRQ8(void)
#endif
{
/* Call the user function */
if (rpdl_INTC_callback_func[PDL_INTC_IRQ8] != PDL_NO_FUNC)
{
rpdl_INTC_callback_func[PDL_INTC_IRQ8]();
}
}
#if FAST_INTC_VECTOR == VECT_ICU_IRQ9
__fast_interrupt void Interrupt_IRQ9(void)
#else
#pragma vector = VECT_ICU_IRQ9
__interrupt void Interrupt_IRQ9(void)
#endif
{
/* Call the user function */
if (rpdl_INTC_callback_func[PDL_INTC_IRQ9] != PDL_NO_FUNC)
{
rpdl_INTC_callback_func[PDL_INTC_IRQ9]();
}
}
#if FAST_INTC_VECTOR == VECT_ICU_IRQ10
__fast_interrupt void Interrupt_IRQ10(void)
#else
#pragma vector = VECT_ICU_IRQ10
__interrupt void Interrupt_IRQ10(void)
#endif
{
/* Call the user function */
if (rpdl_INTC_callback_func[PDL_INTC_IRQ10] != PDL_NO_FUNC)
{
rpdl_INTC_callback_func[PDL_INTC_IRQ10]();
}
}
#if FAST_INTC_VECTOR == VECT_ICU_IRQ11
__fast_interrupt void Interrupt_IRQ11(void)
#else
#pragma vector = VECT_ICU_IRQ11
__interrupt void Interrupt_IRQ11(void)
#endif
{
/* Call the user function */
if (rpdl_INTC_callback_func[PDL_INTC_IRQ11] != PDL_NO_FUNC)
{
rpdl_INTC_callback_func[PDL_INTC_IRQ11]();
}
}
#if FAST_INTC_VECTOR == VECT_ICU_IRQ12
__fast_interrupt void Interrupt_IRQ12(void)
#else
#pragma vector = VECT_ICU_IRQ12
__interrupt void Interrupt_IRQ12(void)
#endif
{
/* Call the user function */
if (rpdl_INTC_callback_func[PDL_INTC_IRQ12] != PDL_NO_FUNC)
{
rpdl_INTC_callback_func[PDL_INTC_IRQ12]();
}
}
#if FAST_INTC_VECTOR == VECT_ICU_IRQ13
__fast_interrupt void Interrupt_IRQ13(void)
#else
#pragma vector = VECT_ICU_IRQ13
__interrupt void Interrupt_IRQ13(void)
#endif
{
/* Call the user function */
if (rpdl_INTC_callback_func[PDL_INTC_IRQ13] != PDL_NO_FUNC)
{
rpdl_INTC_callback_func[PDL_INTC_IRQ13]();
}
}
#if FAST_INTC_VECTOR == VECT_ICU_IRQ14
__fast_interrupt void Interrupt_IRQ14(void)
#else
#pragma vector = VECT_ICU_IRQ14
__interrupt void Interrupt_IRQ14(void)
#endif
{
/* Call the user function */
if (rpdl_INTC_callback_func[PDL_INTC_IRQ14] != PDL_NO_FUNC)
{
rpdl_INTC_callback_func[PDL_INTC_IRQ14]();
}
}
#if FAST_INTC_VECTOR == VECT_ICU_IRQ15
__fast_interrupt void Interrupt_IRQ15(void)
#else
#pragma vector = VECT_ICU_IRQ15
__interrupt void Interrupt_IRQ15(void)
#endif
{
/* Call the user function */
if (rpdl_INTC_callback_func[PDL_INTC_IRQ15] != PDL_NO_FUNC)
{
rpdl_INTC_callback_func[PDL_INTC_IRQ15]();
}
}
/*""FUNC COMMENT""***************************************************
* Module outline: Software interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_SWINT(void)
*-------------------------------------------------------------------
* Function : Interrupt processing function for the software interrupt
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*------------------------------------------------------------------
* Input :
* Output :
*-------------------------------------------------------------------
* Use function : rpdl_INTC_callback_func[PDL_INTC_SWINT]()
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
/*""FUNC COMMENT""***************************************************
* Module outline: Break interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_BRK(void)
*-------------------------------------------------------------------
* Function : Interrupt processing function for the break interrupt
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*------------------------------------------------------------------
* Input :
* Output :
*-------------------------------------------------------------------
* Use function :
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if 0
#pragma vector = 0
__interrupt void Interrupt_BRK(void)
{
uint32_t * vector_location;
volatile uint32_t * stacked_psw_ptr;
uint32_t psw_copy;
switch (rpdl_INTC_brk_command)
{
case BRK_START_ADC_10:
rpdl_ADC_10_Start();
break;
case BRK_START_ADC_10_AND_SLEEP:
rpdl_ADC_10_Start();
/* Prevent all-module clock stop */
SYSTEM.MSTPCRA.BIT.ACSE = 0;
/* Select sleep or all-module clock stop */
SYSTEM.SBYCR.BIT.SSBY = 0;
/* Prevent out-of-order execution */
while (SYSTEM.SBYCR.BIT.SSBY != 0);
wait();
break;
case BRK_SLEEP:
/* Prevent all-module clock stop */
SYSTEM.MSTPCRA.BIT.ACSE = 0;
/* Select sleep or all-module clock stop */
SYSTEM.SBYCR.BIT.SSBY = 0;
/* Prevent out-of-order execution */
while (SYSTEM.SBYCR.BIT.SSBY != 0);
wait();
break;
case BRK_ALL_MODULE_CLOCK_STOP:
/* Select sleep or all-module clock stop */
SYSTEM.SBYCR.BIT.SSBY = 0;
/* Prevent out-of-order execution */
while (SYSTEM.SBYCR.BIT.SSBY != 0);
wait();
break;
case BRK_STANDBY:
/* Prevent deep standby mode */
SYSTEM.DPSBYCR.BIT.DPSBY = 0;
/* Select standby mode */
SYSTEM.SBYCR.BIT.SSBY = 1;
/* Prevent out-of-order execution */
while (SYSTEM.SBYCR.BIT.SSBY != 1);
wait();
break;
case BRK_DEEP_STANDBY:
/* Stop the RAM clock */
SYSTEM.MSTPCRC.BIT.MSTPC0 = 1;
SYSTEM.MSTPCRC.BIT.MSTPC1 = 1;
/* Select deep standby mode */
SYSTEM.DPSBYCR.BIT.DPSBY = 1;
/* Select standby mode */
SYSTEM.SBYCR.BIT.SSBY = 1;
/* Prevent out-of-order execution */
while (SYSTEM.SBYCR.BIT.SSBY != 1);
wait();
break;
case BRK_LOAD_FINTV_REGISTER:
/* Find the start of the maskable interrupt vector table */
vector_location = (uint32_t *)get_intb();
/* Move to the location of the address of the selected interrupt */
vector_location += ICU.FIR.BIT.FVCT;
/* Store the address of this vector in the FINTV register */
set_fintv((__fast_int_f)*vector_location);
break;
case BRK_WRITE_IPL:
/* Find the stacked PSW */
stacked_psw_ptr = (uint32_t *)(rpdl_INTC_saved_isp) - 1;
/* Read the stacked PSW */
psw_copy = *stacked_psw_ptr;
/* Clear the IPL bits */
psw_copy &= (uint32_t)(INV_BIT_27 & INV_BIT_26 & INV_BIT_25 & INV_BIT_24);
/* Modify the IPL bits */
psw_copy |= (uint32_t)(rpdl_INTC_brk_data8 << 24);
/* Modify the saved IPL */
*stacked_psw_ptr = psw_copy;
break;
case BRK_CMT_START:
/* Set STRn to 1 */
*(CMSTR_ADDRESS(rpdl_INTC_brk_data8)) |= (uint16_t)((rpdl_INTC_brk_data8 & 0x01u) + 1);
break;
case BRK_CMT_STOP:
/* Set STRn to 0 */
*(CMSTR_ADDRESS(rpdl_INTC_brk_data8)) &= (uint16_t)(0x2u >> (rpdl_INTC_brk_data8 & 0x01u));
break;
default:
/* This must never occur */
break;
}
rpdl_INTC_brk_command = BRK_NO_COMMAND;
}
#endif
/* Exception (Privileged Instruction) */
__interrupt void __privileged_handler(void)
{
if (rpdl_INTC_callback_func[PDL_INTC_PRIVILEGED] != PDL_NO_FUNC)
{
/* Call the user function */
rpdl_INTC_callback_func[PDL_INTC_PRIVILEGED]();
}
}
/* Exception (Undefined Instruction) */
__interrupt void __undefined_handler(void)
{
if (rpdl_INTC_callback_func[PDL_INTC_UNDEFINED] != PDL_NO_FUNC)
{
/* Call the user function */
rpdl_INTC_callback_func[PDL_INTC_UNDEFINED]();
}
}
/* Exception(Floating Point) */
__interrupt void __floating_point_handler(void)
{
if (rpdl_INTC_callback_func[PDL_INTC_FLOATING_POINT] != PDL_NO_FUNC)
{
/* Call the user function */
rpdl_INTC_callback_func[PDL_INTC_FLOATING_POINT]();
}
}
__interrupt void __NMI_handler(void)
{
if (rpdl_INTC_callback_func[PDL_INTC_NMI] != PDL_NO_FUNC)
{
/* Call the user function */
rpdl_INTC_callback_func[PDL_INTC_NMI]();
}
}
/* End of file */
/*""FILE COMMENT""*******************************************************
* System Name : RTC Interrupt program for RX62Nxx
* File Name : Interrupt_RTC.c
* Version : 1.02
* Contents : Interrupt handler for RTC
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#include "r_pdl_rtc.h"
#include "r_pdl_definitions.h"
#include "r_pdl_user_definitions.h"
/*""FUNC COMMENT""***************************************************
* Module outline: RTC periodic interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_RTC_PRD(void)
*-------------------------------------------------------------------
* Function : Interrupt processing function for RTC
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*-------------------------------------------------------------------
* Input :
* Output :
*-------------------------------------------------------------------
* Use function : rpdl_RTC_Periodic_callback_func()
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if FAST_INTC_VECTOR == VECT_RTC_PRD
__fast_interrupt void Interrupt_RTC_PRD(void)
#else
#pragma vector = VECT_RTC_PRD
__interrupt void Interrupt_RTC_PRD(void)
#endif
{
/* Call the user function */
if (rpdl_RTC_Periodic_callback_func != PDL_NO_FUNC)
{
rpdl_RTC_Periodic_callback_func();
}
}
/*""FUNC COMMENT""***************************************************
* Module outline: RTC alarm interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_RTC_ALM(void)
*-------------------------------------------------------------------
* Function : Interrupt processing function for RTC
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*-------------------------------------------------------------------
* Input :
* Output :
*-------------------------------------------------------------------
* Use function : rpdl_RTC_Alarm_callback_func()
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if FAST_INTC_VECTOR == VECT_RTC_ALM
__fast_interrupt void Interrupt_RTC_ALM(void)
#else
#pragma vector = VECT_RTC_ALM
__interrupt void Interrupt_RTC_ALM(void)
#endif
{
/* Call the user function */
if (rpdl_RTC_Alarm_callback_func != PDL_NO_FUNC)
{
rpdl_RTC_Alarm_callback_func();
}
}
/*""FUNC COMMENT""***************************************************
* Module outline: RTC Carry interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_RTC_CUP(void)
*-------------------------------------------------------------------
* Function : Interrupt processing function for RTC
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*-------------------------------------------------------------------
* Input :
* Output :
*-------------------------------------------------------------------
* Use function :
*-------------------------------------------------------------------
* Notes : This interrupt is not used.
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if FAST_INTC_VECTOR == VECT_RTC_CUP
__fast_interrupt void Interrupt_RTC_CUP(void)
#else
#pragma vector = VECT_RTC_CUP
__interrupt void Interrupt_RTC_CUP(void)
#endif
{
/* Disable further requests */
ICU.IER[IER_RTC_CUP].BIT.IEN_RTC_CUP = 0;
}
/* End of file */
/*""FILE COMMENT""*******************************************************
* System Name : Interrupt program for RX62Nxx
* File Name : Interrupt_SPI.c
* Version : 1.02
* Contents : Interrupt handlers for all SPI channels
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#include "r_pdl_spi.h"
#include "r_pdl_definitions.h"
#include "r_pdl_user_definitions.h"
/*""FUNC COMMENT""***************************************************
* Module outline: SPIn receive data error interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_RSPIn_SPEIn(void)
*-------------------------------------------------------------------
* Function :
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*-------------------------------------------------------------------
* Output : None
*-------------------------------------------------------------------
* Use function : rpdl_SPI_callback_func[n]
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if FAST_INTC_VECTOR == VECT_RSPI0_SPEI0
__fast_interrupt void Interrupt_RSPI0_SPEI0(void)
#else
#pragma vector = VECT_RSPI0_SPEI0
__interrupt void Interrupt_RSPI0_SPEI0(void)
#endif
{
/* Will the user handle the errors? */
if (rpdl_SPI_callback_func[0] != PDL_NO_FUNC)
{
/* Notify the user */
rpdl_SPI_callback_func[0]();
}
}
#if FAST_INTC_VECTOR == VECT_RSPI1_SPEI1
__fast_interrupt void Interrupt_RSPI1_SPEI1(void)
#else
#pragma vector = VECT_RSPI1_SPEI1
__interrupt void Interrupt_RSPI1_SPEI1(void)
#endif
{
/* Will the user handle the errors? */
if (rpdl_SPI_callback_func[1] != PDL_NO_FUNC)
{
/* Notify the user */
rpdl_SPI_callback_func[1]();
}
}
/*""FUNC COMMENT""***************************************************
* Module outline: SPIn receive data interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_RSPIn_SPRIn(void)
*-------------------------------------------------------------------
* Function :
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*-------------------------------------------------------------------
* Input : (I/ ) : SPDCR, SBDR
* Output : (I/O) : SPCR, SPCR2
*-------------------------------------------------------------------
* Use function : None
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if FAST_INTC_VECTOR == VECT_RSPI0_SPRI0
__fast_interrupt void Interrupt_RSPI0_SPRI0(void)
#else
#pragma vector = VECT_RSPI0_SPRI0
__interrupt void Interrupt_RSPI0_SPRI0(void)
#endif
{
uint8_t frame_count;
uint32_t received_frame;
uint8_t spdcr_copy;
uint8_t splw;
uint8_t spfc;
volatile uint32_t * rx_data_ptr;
/* Ok to process the data? */
if (rpdl_SPI_method[0] == SPI_USING_IRQ)
{
spdcr_copy = RSPI0.SPDCR.BYTE;
splw = (uint8_t)(spdcr_copy & BIT_5);
spfc = (uint8_t)(spdcr_copy & 0x03u);
rx_data_ptr = rpdl_SPI_rx_ptr[0];
/* Load the data register */
for (frame_count = 0; frame_count <= spfc; frame_count++)
{
if (splw == 0)
{
/* Read the data */
received_frame = (uint32_t)RSPI0.SPDR.WORD.H;
}
else
{
/* Read the data */
received_frame = RSPI0.SPDR.LONG;
}
/* Store the data? */
if (rx_data_ptr != PDL_NO_PTR)
{
*rx_data_ptr = received_frame;
/* Increment the address pointer */
rx_data_ptr ++;
}
/* Increment the frame counter */
rpdl_SPI_rx_frame_counter[0] ++;
}
/* Store the updated pointer */
rpdl_SPI_rx_ptr[0] = rx_data_ptr;
/* All data read? */
if (rpdl_SPI_rx_frame_counter[0] == rpdl_SPI_frame_total[0])
{
/* Increment the loop counter */
rpdl_SPI_rx_sequence_counter[0]++;
/* All loops completed? */
if (rpdl_SPI_rx_sequence_counter[0] == rpdl_SPI_sequence_count[0])
{
/* Disable receive interrupts */
RSPI0.SPCR.BIT.SPRIE = 0;
/* Master mode? */
if (RSPI0.SPCR.BIT.MSTR == 1)
{
/* Enable idle interrupts */
RSPI0.SPCR2.BIT.SPIIE = 1;
}
else
{
/* Notify the user */
if (rpdl_SPI_callback_func[0] != PDL_NO_FUNC)
{
rpdl_SPI_callback_func[0]();
}
}
}
else
{
/* Reset the frame counter */
rpdl_SPI_rx_frame_counter[0] = 0;
}
}
}
else
{
/* Notify the user */
if (rpdl_SPI_callback_func[0] != PDL_NO_FUNC)
{
rpdl_SPI_callback_func[0]();
}
}
}
#if FAST_INTC_VECTOR == VECT_RSPI1_SPRI1
__fast_interrupt void Interrupt_RSPI1_SPRI1(void)
#else
#pragma vector = VECT_RSPI1_SPRI1
__interrupt void Interrupt_RSPI1_SPRI1(void)
#endif
{
uint8_t frame_count;
uint32_t received_frame;
uint8_t spdcr_copy;
uint8_t splw;
uint8_t spfc;
volatile uint32_t * rx_data_ptr;
/* Ok to process the data? */
if (rpdl_SPI_method[1] == SPI_USING_IRQ)
{
spdcr_copy = RSPI1.SPDCR.BYTE;
splw = (uint8_t)(spdcr_copy & BIT_5);
spfc = (uint8_t)(spdcr_copy & 0x03u);
rx_data_ptr = rpdl_SPI_rx_ptr[1];
/* Load the data register */
for (frame_count = 0; frame_count <= spfc; frame_count++)
{
if (splw == 0)
{
/* Read the data */
received_frame = (uint32_t)RSPI1.SPDR.WORD.H;
}
else
{
/* Read the data */
received_frame = RSPI1.SPDR.LONG;
}
/* Store the data? */
if (rx_data_ptr != PDL_NO_PTR)
{
*rx_data_ptr = received_frame;
/* Increment the address pointer */
rx_data_ptr ++;
}
/* Increment the frame counter */
rpdl_SPI_rx_frame_counter[1] ++;
}
/* Store the updated pointer */
rpdl_SPI_rx_ptr[1] = rx_data_ptr;
/* All data read? */
if (rpdl_SPI_rx_frame_counter[1] == rpdl_SPI_frame_total[1])
{
/* Increment the loop counter */
rpdl_SPI_rx_sequence_counter[1]++;
/* All loops completed? */
if (rpdl_SPI_rx_sequence_counter[1] == rpdl_SPI_sequence_count[1])
{
/* Disable receive interrupts */
RSPI1.SPCR.BIT.SPRIE = 0;
/* Master mode? */
if (RSPI1.SPCR.BIT.MSTR == 1)
{
/* Enable idle interrupts */
RSPI1.SPCR2.BIT.SPIIE = 1;
}
else
{
/* Notify the user */
if (rpdl_SPI_callback_func[1] != PDL_NO_FUNC)
{
rpdl_SPI_callback_func[1]();
}
}
}
else
{
/* Reset the frame counter */
rpdl_SPI_rx_frame_counter[1] = 0;
}
}
}
else
{
/* Notify the user */
if (rpdl_SPI_callback_func[1] != PDL_NO_FUNC)
{
rpdl_SPI_callback_func[1]();
}
}
}
/*""FUNC COMMENT""***************************************************
* Module outline: SPIn transmit data interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_RSPIn_SPTIn(void)
*-------------------------------------------------------------------
* Function :
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*-------------------------------------------------------------------
* Input : (I/ ) : SPDCR
* Output : ( /O) : SBDR
* : (I/O) : SPCR, SPCR2
*-------------------------------------------------------------------
* Use function :
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if FAST_INTC_VECTOR == VECT_RSPI0_SPTI0
__fast_interrupt void Interrupt_RSPI0_SPTI0(void)
#else
#pragma vector = VECT_RSPI0_SPTI0
__interrupt void Interrupt_RSPI0_SPTI0(void)
#endif
{
uint8_t frame_count;
uint8_t spdcr_copy;
uint8_t splw;
uint8_t spfc;
volatile const uint32_t * tx_data_ptr;
/* Ok to process the string? */
if (rpdl_SPI_method[0] == SPI_USING_IRQ)
{
spdcr_copy = RSPI0.SPDCR.BYTE;
splw = (uint8_t)(spdcr_copy & BIT_5);
spfc = (uint8_t)(spdcr_copy & 0x03u);
tx_data_ptr = rpdl_SPI_tx_ptr[0];
/* Load the data register */
for (frame_count = 0; frame_count <= spfc; frame_count++)
{
if (splw == 0)
{
RSPI0.SPDR.WORD.H = (uint16_t)*tx_data_ptr;
}
else
{
RSPI0.SPDR.LONG = *tx_data_ptr;
}
/* Increment the address pointer? */
if (tx_data_ptr != PDL_NO_PTR)
{
tx_data_ptr ++;
}
/* Increment the frame counter */
rpdl_SPI_tx_frame_counter[0] ++;
}
/* Store the updated pointer */
rpdl_SPI_tx_ptr[0] = tx_data_ptr;
/* All data written? */
if (rpdl_SPI_tx_frame_counter[0] == rpdl_SPI_frame_total[0])
{
/* Increment the loop counter */
rpdl_SPI_tx_sequence_counter[0]++;
/* All loops completed? */
if (rpdl_SPI_tx_sequence_counter[0] == rpdl_SPI_sequence_count[0])
{
/* Disable transmit interrupts */
RSPI0.SPCR.BIT.SPTIE = 0;
/* Transmit only? */
if (RSPI0.SPCR.BIT.TXMD == 1)
{
/* Master mode? */
if (RSPI0.SPCR.BIT.MSTR == 1)
{
/* Enable idle interrupts */
RSPI0.SPCR2.BIT.SPIIE = 1;
}
else
{
/* Notify the user */
if (rpdl_SPI_callback_func[0] != PDL_NO_FUNC)
{
rpdl_SPI_callback_func[0]();
}
}
}
}
else
{
/* Reset the frame counter */
rpdl_SPI_tx_frame_counter[0] = 0;
}
}
}
else
{
/* Notify the user */
if (rpdl_SPI_callback_func[0] != PDL_NO_FUNC)
{
rpdl_SPI_callback_func[0]();
}
}
}
#if FAST_INTC_VECTOR == VECT_RSPI1_SPTI1
__fast_interrupt void Interrupt_RSPI1_SPTI1(void)
#else
#pragma vector = VECT_RSPI1_SPTI1
__interrupt void Interrupt_RSPI1_SPTI1(void)
#endif
{
uint8_t frame_count;
uint8_t spdcr_copy;
uint8_t splw;
uint8_t spfc;
volatile const uint32_t * tx_data_ptr;
/* Ok to process the string? */
if (rpdl_SPI_method[1] == SPI_USING_IRQ)
{
spdcr_copy = RSPI1.SPDCR.BYTE;
splw = (uint8_t)(spdcr_copy & BIT_5);
spfc = (uint8_t)(spdcr_copy & 0x03u);
tx_data_ptr = rpdl_SPI_tx_ptr[1];
/* Load the data register */
for (frame_count = 0; frame_count <= spfc; frame_count++)
{
if (splw == 0)
{
RSPI1.SPDR.WORD.H = (uint16_t)*tx_data_ptr;
}
else
{
RSPI1.SPDR.LONG = *tx_data_ptr;
}
/* Increment the address pointer? */
if (tx_data_ptr != PDL_NO_PTR)
{
tx_data_ptr ++;
}
/* Increment the frame counter */
rpdl_SPI_tx_frame_counter[1] ++;
}
/* Store the updated pointer */
rpdl_SPI_tx_ptr[1] = tx_data_ptr;
/* All data written? */
if (rpdl_SPI_tx_frame_counter[1] == rpdl_SPI_frame_total[1])
{
/* Increment the loop counter */
rpdl_SPI_tx_sequence_counter[1]++;
/* All loops completed? */
if (rpdl_SPI_tx_sequence_counter[1] == rpdl_SPI_sequence_count[1])
{
/* Disable transmit interrupts */
RSPI1.SPCR.BIT.SPTIE = 0;
/* Transmit only? */
if (RSPI1.SPCR.BIT.TXMD == 1)
{
/* Master mode? */
if (RSPI1.SPCR.BIT.MSTR == 1)
{
/* Enable idle interrupts */
RSPI1.SPCR2.BIT.SPIIE = 1;
}
else
{
/* Notify the user */
if (rpdl_SPI_callback_func[1] != PDL_NO_FUNC)
{
rpdl_SPI_callback_func[1]();
}
}
}
}
else
{
/* Reset the frame counter */
rpdl_SPI_tx_frame_counter[1] = 0;
}
}
}
else
{
/* Notify the user */
if (rpdl_SPI_callback_func[1] != PDL_NO_FUNC)
{
rpdl_SPI_callback_func[1]();
}
}
}
/*""FUNC COMMENT""***************************************************
* Module outline: SPIn idle interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_RSPIn_SPIIn(void)
*-------------------------------------------------------------------
* Function :
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*-------------------------------------------------------------------
* Output : SPCR, SPCR2
*-------------------------------------------------------------------
* Use function : rpdl_SPI_callback_func()
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if FAST_INTC_VECTOR == VECT_RSPI0_SPII0
__fast_interrupt void Interrupt_RSPI0_SPII0(void)
#else
#pragma vector = VECT_RSPI0_SPII0
__interrupt void Interrupt_RSPI0_SPII0(void)
#endif
{
/* Disable the channel */
RSPI0.SPCR.BIT.SPE = 0;
/* Disable idle interrupts */
RSPI0.SPCR2.BIT.SPIIE = 0;
/* Call the callback function */
if (rpdl_SPI_callback_func[0] != PDL_NO_FUNC)
{
rpdl_SPI_callback_func[0]();
}
}
#if FAST_INTC_VECTOR == VECT_RSPI1_SPII1
__fast_interrupt void Interrupt_RSPI1_SPII1(void)
#else
#pragma vector = VECT_RSPI1_SPII1
__interrupt void Interrupt_RSPI1_SPII1(void)
#endif
{
/* Disable the channel */
RSPI1.SPCR.BIT.SPE = 0;
/* Disable idle interrupts */
RSPI1.SPCR2.BIT.SPIIE = 0;
/* Call the callback function */
if (rpdl_SPI_callback_func[1] != PDL_NO_FUNC)
{
rpdl_SPI_callback_func[1]();
}
}
/* End of file */
/*""FILE COMMENT""*******************************************************
* System Name : Interrupt program for RX62Nxx
* File Name : Interrupt_TMR.c
* Version : 1.02
* Contents : Interrupt handlers for the Timer units
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#include "r_pdl_tmr.h"
#include "r_pdl_definitions.h"
#include "r_pdl_user_definitions.h"
/*""FUNC COMMENT""***************************************************
* Module outline : Timer interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_TMRn_XXX(void)
*-------------------------------------------------------------------
* Function : Interrupt processing function for Timer TMR channel n
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*-------------------------------------------------------------------
* Input :
* Output :
*-------------------------------------------------------------------
* Use function : R_TmrOverflowFunc[n](), R_TmrCMAFunc[n]() or
* : R_TmrCMBFunc[n]() as appropriate.
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if FAST_INTC_VECTOR == VECT_TMR0_CMIA0
__fast_interrupt void Interrupt_TMR0_CMA(void)
#else
#pragma vector = VECT_TMR0_CMIA0
__interrupt void Interrupt_TMR0_CMA(void)
#endif
{
/* Call the user function? */
if (rpdl_TMR_CMA_callback_func[0] != PDL_NO_FUNC)
{
/* Call the user function */
rpdl_TMR_CMA_callback_func[0]();
}
}
#if FAST_INTC_VECTOR == VECT_TMR0_CMIB0
__fast_interrupt void Interrupt_TMR0_CMB(void)
#else
#pragma vector = VECT_TMR0_CMIB0
__interrupt void Interrupt_TMR0_CMB(void)
#endif
{
if (rpdl_TMR_one_shot[0] != false)
{
/* Channel mode? */
if (rpdl_TMR_one_shot[0] == CHANNEL_MODE)
{
/* Stop the channel 0 clock input */
TMR0.TCCR.BYTE = 0x00u;
}
/* Unit mode? */
else
{
/* Stop the channel 1 clock input */
TMR1.TCCR.BYTE = 0x00u;
}
rpdl_TMR_one_shot[0] = false;
/* Clear the interrupt request flag (the timer may have set it again) */
ICU.IR[VECT_TMR0_CMIB0].BIT.IR = 0;
}
/* Call the user function? */
if (rpdl_TMR_CMB_callback_func[0] != PDL_NO_FUNC)
{
rpdl_TMR_CMB_callback_func[0]();
}
}
#if FAST_INTC_VECTOR == VECT_TMR0_OVI0
__fast_interrupt void Interrupt_TMR0_OV(void)
#else
#pragma vector = VECT_TMR0_OVI0
__interrupt void Interrupt_TMR0_OV(void)
#endif
{
/* Call the user function */
if (rpdl_TMR_Overflow_callback_func[0] != PDL_NO_FUNC)
{
rpdl_TMR_Overflow_callback_func[0]();
}
}
#if FAST_INTC_VECTOR == VECT_TMR1_CMIA1
__fast_interrupt void Interrupt_TMR1_CMA(void)
#else
#pragma vector = VECT_TMR1_CMIA1
__interrupt void Interrupt_TMR1_CMA(void)
#endif
{
/* Call the user function? */
if (rpdl_TMR_CMA_callback_func[1] != PDL_NO_FUNC)
{
/* Call the user function */
rpdl_TMR_CMA_callback_func[1]();
}
}
#if FAST_INTC_VECTOR == VECT_TMR1_CMIB1
__fast_interrupt void Interrupt_TMR1_CMB(void)
#else
#pragma vector = VECT_TMR1_CMIB1
__interrupt void Interrupt_TMR1_CMB(void)
#endif
{
if (rpdl_TMR_one_shot[1] != false)
{
/* Stop the channel 1 clock input */
TMR1.TCCR.BYTE = 0x00u;
rpdl_TMR_one_shot[1] = false;
/* Clear the interrupt request flag (the timer may have set it again) */
ICU.IR[VECT_TMR1_CMIB1].BIT.IR = 0u;
}
/* Call the user function? */
if (rpdl_TMR_CMB_callback_func[1] != PDL_NO_FUNC)
{
rpdl_TMR_CMB_callback_func[1]();
}
}
#if FAST_INTC_VECTOR == VECT_TMR1_OVI1
__fast_interrupt void Interrupt_TMR1_OV(void)
#else
#pragma vector = VECT_TMR1_OVI1
__interrupt void Interrupt_TMR1_OV(void)
#endif
{
/* Call the user function */
if (rpdl_TMR_Overflow_callback_func[1] != PDL_NO_FUNC)
{
rpdl_TMR_Overflow_callback_func[1]();
}
}
#if FAST_INTC_VECTOR == VECT_TMR2_CMIA2
__fast_interrupt void Interrupt_TMR2_CMA(void)
#else
#pragma vector = VECT_TMR2_CMIA2
__interrupt void Interrupt_TMR2_CMA(void)
#endif
{
/* Call the user function? */
if (rpdl_TMR_CMA_callback_func[2] != PDL_NO_FUNC)
{
/* Call the user function */
rpdl_TMR_CMA_callback_func[2]();
}
}
#if FAST_INTC_VECTOR == VECT_TMR2_CMIB2
__fast_interrupt void Interrupt_TMR2_CMB(void)
#else
#pragma vector = VECT_TMR2_CMIB2
__interrupt void Interrupt_TMR2_CMB(void)
#endif
{
if (rpdl_TMR_one_shot[2] != false)
{
/* Channel mode? */
if (rpdl_TMR_one_shot[2] == CHANNEL_MODE)
{
/* Stop the channel 2 clock input */
TMR2.TCCR.BYTE = 0x00u;
}
/* Unit mode? */
else
{
/* Stop the channel 3 clock input */
TMR3.TCCR.BYTE = 0x00u;
}
rpdl_TMR_one_shot[2] = false;
/* Clear the interrupt request flag (the timer may have set it again) */
ICU.IR[VECT_TMR2_CMIB2].BIT.IR = 0;
}
/* Call the user function? */
if (rpdl_TMR_CMB_callback_func[2] != PDL_NO_FUNC)
{
rpdl_TMR_CMB_callback_func[2]();
}
}
#if FAST_INTC_VECTOR == VECT_TMR2_OVI2
__fast_interrupt void Interrupt_TMR2_OV(void)
#else
#pragma vector = VECT_TMR2_OVI2
__interrupt void Interrupt_TMR2_OV(void)
#endif
{
/* Call the user function */
if (rpdl_TMR_Overflow_callback_func[2] != PDL_NO_FUNC)
{
rpdl_TMR_Overflow_callback_func[2]();
}
}
#if FAST_INTC_VECTOR == VECT_TMR3_CMIA3
__fast_interrupt void Interrupt_TMR3_CMA(void)
#else
#pragma vector = VECT_TMR3_CMIA3
__interrupt void Interrupt_TMR3_CMA(void)
#endif
{
/* Call the user function? */
if (rpdl_TMR_CMA_callback_func[3] != PDL_NO_FUNC)
{
/* Call the user function */
rpdl_TMR_CMA_callback_func[3]();
}
}
#if FAST_INTC_VECTOR == VECT_TMR3_CMIB3
__fast_interrupt void Interrupt_TMR3_CMB(void)
#else
#pragma vector = VECT_TMR3_CMIB3
__interrupt void Interrupt_TMR3_CMB(void)
#endif
{
if (rpdl_TMR_one_shot[3] != false)
{
/* Stop the channel 3 clock input */
TMR3.TCCR.BYTE = 0x00u;
rpdl_TMR_one_shot[3] = false;
/* Clear the interrupt request flag (the timer may have set it again) */
ICU.IR[VECT_TMR3_CMIB3].BIT.IR = 0;
}
/* Call the user function? */
if (rpdl_TMR_CMB_callback_func[3] != PDL_NO_FUNC)
{
rpdl_TMR_CMB_callback_func[3]();
}
}
#if FAST_INTC_VECTOR == VECT_TMR3_OVI3
__fast_interrupt void Interrupt_TMR3_OV(void)
#else
#pragma vector = VECT_TMR3_OVI3
__interrupt void Interrupt_TMR3_OV(void)
#endif
{
/* Call the user function */
if (rpdl_TMR_Overflow_callback_func[3] != PDL_NO_FUNC)
{
rpdl_TMR_Overflow_callback_func[3]();
}
}
/* End of file */
/*""FILE COMMENT""*******************************************************
* System Name : Interrupt program for RX62Nxx
* File Name : Interrupt_ADC_10.c
* Version : 1.02
* Contents : Interrupt handlers for the ADC units
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#include "r_pdl_adc_10.h"
#include "r_pdl_definitions.h"
#include "r_pdl_user_definitions.h"
/*""FUNC COMMENT""***************************************************
* Module outline: ADC interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_ADCn(void)
*-------------------------------------------------------------------
* Function : Interrupt processing function for ADC unit n
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*-------------------------------------------------------------------
* Input :
* Output :
*-------------------------------------------------------------------
* Use function : ADC_callback_func[n]()
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if FAST_INTC_VECTOR == VECT_AD0_ADI0
__fast_interrupt void Interrupt_ADC0(void)
#else
#pragma vector = VECT_AD0_ADI0
__interrupt void Interrupt_ADC0(void)
#endif
{
/* Call the user function */
if (rpdl_ADC_10_callback_func[0] != PDL_NO_FUNC)
{
rpdl_ADC_10_callback_func[0]();
}
}
#if FAST_INTC_VECTOR == VECT_AD1_ADI1
__fast_interrupt void Interrupt_ADC1(void)
#else
#pragma vector = VECT_AD1_ADI1
__interrupt void Interrupt_ADC1(void)
#endif
{
/* Call the user function */
if (rpdl_ADC_10_callback_func[1] != PDL_NO_FUNC)
{
rpdl_ADC_10_callback_func[1]();
}
}
/* End of file */
/*""FILE COMMENT""*******************************************************
* System Name : 12-bit ADC Interrupt program for RX62Nxx
* File Name : Interrupt_ADC_12.c
* Version : 1.02
* Contents : Interrupt handler for ADC_12
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#include "r_pdl_adc_12.h"
#include "r_pdl_definitions.h"
#include "r_pdl_user_definitions.h"
/*""FUNC COMMENT""***************************************************
* Module outline: ADC interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_ADCn(void)
*-------------------------------------------------------------------
* Function : Interrupt processing function for ADC unit n
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*-------------------------------------------------------------------
* Input :
* Output :
*-------------------------------------------------------------------
* Use function : rpdl_ADC_12_callback_func[n]()
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if FAST_INTC_VECTOR == VECT_S12AD_ADI
__fast_interrupt void Interrupt_ADC_12_0(void)
#else
#pragma vector = VECT_S12AD_ADI
__interrupt void Interrupt_ADC_12_0(void)
#endif
{
/* Call the user function */
if (rpdl_ADC_12_callback_func[0] != PDL_NO_FUNC)
{
rpdl_ADC_12_callback_func[0]();
}
}
/* End of file */
/*""FILE COMMENT""*******************************************************
* System Name : Interrupt program for RX62Nxx
* File Name : Interrupt_BSC.c
* Version : 1.02
* Contents : Interrupt handler for the BSC
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#include "r_pdl_bsc.h"
#include "r_pdl_definitions.h"
#include "r_pdl_user_definitions.h"
/*""FUNC COMMENT""***************************************************
* Module outline : BSC interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_BSC(void)
*-------------------------------------------------------------------
* Function : Interrupt processing function for the BSC
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*-------------------------------------------------------------------
* Input :
* Output :
*-------------------------------------------------------------------
* Use function : rpdl_BSC_callback_func
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if FAST_INTC_VECTOR == VECT_BSC_BUSERR
__fast_interrupt void Interrupt_BSC(void)
#else
#pragma vector = VECT_BSC_BUSERR
__interrupt void Interrupt_BSC(void)
#endif
{
/* Call the user function */
if (rpdl_BSC_callback_func != PDL_NO_FUNC)
{
rpdl_BSC_callback_func();
}
}
/* End of file */
/*""FILE COMMENT""*******************************************************
* System Name : Interrupt program for RX62Nxx
* File Name : Interrupt_CMT.c
* Version : 1.02
* Contents : Interrupt handlers for the CMT channels
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#include "r_pdl_cmt.h"
#include "r_pdl_definitions.h"
#include "r_pdl_user_definitions.h"
/*""FUNC COMMENT""***************************************************
* Module outline : Timer interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_CMTn(void)
*-------------------------------------------------------------------
* Function : Interrupt processing function for CMT channel n
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*-------------------------------------------------------------------
* Input :
* Output :
*-------------------------------------------------------------------
* Use function : CMT_callback_func[n]
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if 0
#if FAST_INTC_VECTOR == VECT_CMT0_CMI0
__fast_interrupt void Interrupt_CMT0(void)
#else
#pragma vector = VECT_CMT0_CMI0
__interrupt void Interrupt_CMT0(void)
#endif
{
if (rpdl_CMT_one_shot[0] != false)
{
/* Stop the channel 0 clock input */
CMT.CMSTR0.BIT.STR0 = 0;
/* Clear the interrupt request flag (the timer may have set it again) */
ICU.IR[IR_CMT0_CMI0].BIT.IR = 0;
}
/* Call the user function */
if (rpdl_CMT_callback_func[0] != PDL_NO_FUNC)
{
rpdl_CMT_callback_func[0]();
}
}
#endif
#if FAST_INTC_VECTOR == VECT_CMT1_CMI1
__fast_interrupt void Interrupt_CMT1(void)
#else
#pragma vector = VECT_CMT1_CMI1
__interrupt void Interrupt_CMT1(void)
#endif
{
if (rpdl_CMT_one_shot[1] != false)
{
/* Stop the channel 0 clock input */
CMT.CMSTR0.BIT.STR1 = 0;
/* Clear the interrupt request flag (the timer may have set it again) */
ICU.IR[IR_CMT1_CMI1].BIT.IR = 0;
}
/* Call the user function */
if (rpdl_CMT_callback_func[1] != PDL_NO_FUNC)
{
rpdl_CMT_callback_func[1]();
}
}
#if FAST_INTC_VECTOR == VECT_CMT2_CMI2
__fast_interrupt void Interrupt_CMT2(void)
#else
#pragma vector = VECT_CMT2_CMI2
__interrupt void Interrupt_CMT2(void)
#endif
{
if (rpdl_CMT_one_shot[2] != false)
{
/* Stop the channel 0 clock input */
CMT.CMSTR1.BIT.STR2 = 0;
/* Clear the interrupt request flag (the timer may have set it again) */
ICU.IR[IR_CMT2_CMI2].BIT.IR = 0;
}
/* Call the user function */
if (rpdl_CMT_callback_func[2] != PDL_NO_FUNC)
{
rpdl_CMT_callback_func[2]();
}
}
#if FAST_INTC_VECTOR == VECT_CMT3_CMI3
__fast_interrupt void Interrupt_CMT3(void)
#else
#pragma vector = VECT_CMT3_CMI3
__interrupt void Interrupt_CMT3(void)
#endif
{
if (rpdl_CMT_one_shot[3] != false)
{
/* Stop the channel 0 clock input */
CMT.CMSTR1.BIT.STR3 = 0;
/* Clear the interrupt request flag (the timer may have set it again) */
ICU.IR[IR_CMT3_CMI3].BIT.IR = 0;
}
/* Call the user function */
if (rpdl_CMT_callback_func[3] != PDL_NO_FUNC)
{
rpdl_CMT_callback_func[3]();
}
}
/* End of file */
/*""FILE COMMENT""*******************************************************
* System Name : Interrupt program for RX62N
* File Name : Interrupt_DMAC.c
* Version : 1.02
* Contents : Interrupt handlers for the DMAC channels
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#include "r_pdl_dmac.h"
#include "r_pdl_definitions.h"
#include "r_pdl_user_definitions.h"
/*""FUNC COMMENT""***************************************************
* Module outline : DMAC interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_DMACn(void)
*-------------------------------------------------------------------
* Function : Interrupt processing function for DMAC channel n
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*-------------------------------------------------------------------
* Input :
* Output :
*-------------------------------------------------------------------
* Use function : DMAC_callback_func[n]
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if FAST_INTC_VECTOR == VECT_DMAC_DMAC0I
__fast_interrupt void Interrupt_DMAC0(void)
#else
#pragma vector = VECT_DMAC_DMAC0I
__interrupt void Interrupt_DMAC0(void)
#endif
{
/* Call the user function */
if (rpdl_DMAC_callback_func[0] != PDL_NO_FUNC)
{
rpdl_DMAC_callback_func[0]();
}
}
#if FAST_INTC_VECTOR == VECT_DMAC_DMAC1I
__fast_interrupt void Interrupt_DMAC1(void)
#else
#pragma vector = VECT_DMAC_DMAC1I
__interrupt void Interrupt_DMAC1(void)
#endif
{
/* Call the user function */
if (rpdl_DMAC_callback_func[1] != PDL_NO_FUNC)
{
rpdl_DMAC_callback_func[1]();
}
}
#if FAST_INTC_VECTOR == VECT_DMAC_DMAC2I
__fast_interrupt void Interrupt_DMAC2(void)
#else
#pragma vector = VECT_DMAC_DMAC2I
__interrupt void Interrupt_DMAC2(void)
#endif
{
/* Call the user function */
if (rpdl_DMAC_callback_func[2] != PDL_NO_FUNC)
{
rpdl_DMAC_callback_func[2]();
}
}
#if FAST_INTC_VECTOR == VECT_DMAC_DMAC3I
__fast_interrupt void Interrupt_DMAC3(void)
#else
#pragma vector = VECT_DMAC_DMAC3I
__interrupt void Interrupt_DMAC3(void)
#endif
{
/* Call the user function */
if (rpdl_DMAC_callback_func[3] != PDL_NO_FUNC)
{
rpdl_DMAC_callback_func[3]();
}
}
/* End of file */
/*""FILE COMMENT""*******************************************************
* System Name : Interrupt program for RX62N
* File Name : Interrupt_EXDMAC.c
* Version : 1.02
* Contents : Interrupt handlers for the EXDMAC channels
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#include "r_pdl_exdmac.h"
#include "r_pdl_definitions.h"
#include "r_pdl_user_definitions.h"
/*""FUNC COMMENT""***************************************************
* Module outline : EXDMAC interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_EXDMACn(void)
*-------------------------------------------------------------------
* Function : Interrupt processing function for EXDMAC channel n
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*-------------------------------------------------------------------
* Input :
* Output :
*-------------------------------------------------------------------
* Use function : EXDMAC_callback_func[n]
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if FAST_INTC_VECTOR == VECT_EXDMAC_EXDMAC0I
__fast_interrupt void Interrupt_EXDMAC0(void)
#else
#pragma vector = VECT_EXDMAC_EXDMAC0I
__interrupt void Interrupt_EXDMAC0(void)
#endif
{
#if defined(DEVICE_PACKAGE_LQFP_100) || defined(DEVICE_PACKAGE_TFLGA_85)
/* This peripheral is not available on the 100-pin or 85-pin packages */
nop();
#else
/* Call the user function */
if (rpdl_EXDMAC_callback_func[0] != PDL_NO_FUNC)
{
rpdl_EXDMAC_callback_func[0]();
}
#endif
}
#if FAST_INTC_VECTOR == VECT_EXDMAC_EXDMAC1I
__fast_interrupt void Interrupt_EXDMAC1(void)
#else
#pragma vector = VECT_EXDMAC_EXDMAC1I
__interrupt void Interrupt_EXDMAC1(void)
#endif
{
#if defined(DEVICE_PACKAGE_LQFP_100) || defined(DEVICE_PACKAGE_TFLGA_85)
/* This peripheral is not available on the 100-pin or 85-pin packages */
nop();
#else
/* Call the user function */
if (rpdl_EXDMAC_callback_func[1] != PDL_NO_FUNC)
{
rpdl_EXDMAC_callback_func[1]();
}
#endif
}
/* End of file */
此差异已折叠。
此差异已折叠。
/*""FILE COMMENT""*******************************************************
* System Name : Interrupt program for RX62Nxx
* File Name : Interrupt_not_RPDL.c
* Version : 1.02
* Contents : Interrupt handlers for peripherals outside the scope
* : of RPDL
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#include "r_pdl_common_defs_RX62Nxx.h"
#include "r_pdl_user_definitions.h"
#if FAST_INTC_VECTOR == VECT_FCU_FIFERR
__fast_interrupt void Interrupt_FIFERR(void)
#else
#pragma vector = VECT_FCU_FIFERR
__interrupt void Interrupt_FIFERR(void)
#endif
{
/* The user can put their own code here */
nop();
}
#if FAST_INTC_VECTOR == VECT_FCU_FRDYI
__fast_interrupt void Interrupt_FRDYI(void)
#else
#pragma vector = VECT_FCU_FRDYI
__interrupt void Interrupt_FRDYI(void)
#endif
{
/* The user can put their own code here */
nop();
}
#if FAST_INTC_VECTOR == VECT_ETHER_EINT
__fast_interrupt void Interrupt_EINT(void)
#else
#pragma vector = VECT_ETHER_EINT
__interrupt void Interrupt_EINT(void)
#endif
{
/* The user can put their own code here */
nop();
}
#if FAST_INTC_VECTOR == VECT_USB0_D0FIFO0
__fast_interrupt void Interrupt_D0FIFO0(void)
#else
#pragma vector = VECT_USB0_D0FIFO0
__interrupt void Interrupt_D0FIFO0(void)
#endif
{
/* The user can put their own code here */
nop();
}
#if FAST_INTC_VECTOR == VECT_USB0_D1FIFO0
__fast_interrupt void Interrupt_D1FIFO0(void)
#else
#pragma vector = VECT_USB0_D1FIFO0
__interrupt void Interrupt_D1FIFO0(void)
#endif
{
/* The user can put their own code here */
nop();
}
#if FAST_INTC_VECTOR == VECT_USB0_USBI0
__fast_interrupt void Interrupt_USBI0(void)
#else
#pragma vector = VECT_USB0_USBI0
__interrupt void Interrupt_USBI0(void)
#endif
{
/* The user can put their own code here */
nop();
}
#if FAST_INTC_VECTOR == VECT_USB_USBR0
__fast_interrupt void Interrupt_USBR0(void)
#else
#pragma vector = VECT_USB_USBR0
__interrupt void Interrupt_USBR0(void)
#endif
{
/* The user can put their own code here */
nop();
}
#if FAST_INTC_VECTOR == VECT_USB1_D0FIFO1
__fast_interrupt void Interrupt_D0FIFO1(void)
#else
#pragma vector = VECT_USB1_D0FIFO1
__interrupt void Interrupt_D0FIFO1(void)
#endif
{
/* The user can put their own code here */
nop();
}
#if FAST_INTC_VECTOR == VECT_USB1_D1FIFO1
__fast_interrupt void Interrupt_D1FIFO1(void)
#else
#pragma vector = VECT_USB1_D1FIFO1
__interrupt void Interrupt_D1FIFO1(void)
#endif
{
/* The user can put their own code here */
nop();
}
#if FAST_INTC_VECTOR == VECT_USB1_USBI1
__fast_interrupt void Interrupt_USBI1(void)
#else
#pragma vector = VECT_USB1_USBI1
__interrupt void Interrupt_USBI1(void)
#endif
{
/* The user can put their own code here */
nop();
}
#if FAST_INTC_VECTOR == VECT_USB_USBR1
__fast_interrupt void Interrupt_USBR1(void)
#else
#pragma vector = VECT_USB_USBR1
__interrupt void Interrupt_USBR1(void)
#endif
{
/* The user can put their own code here */
nop();
}
#if FAST_INTC_VECTOR == VECT_CAN0_ERS0
__fast_interrupt void Interrupt_ERS0(void)
#else
#pragma vector = VECT_CAN0_ERS0
__interrupt void Interrupt_ERS0(void)
#endif
{
/* The user can put their own code here */
nop();
}
#if FAST_INTC_VECTOR == VECT_CAN0_RXF0
__fast_interrupt void Interrupt_RXF0(void)
#else
#pragma vector = VECT_CAN0_RXF0
__interrupt void Interrupt_RXF0(void)
#endif
{
/* The user can put their own code here */
nop();
}
#if FAST_INTC_VECTOR == VECT_CAN0_TXF0
__fast_interrupt void Interrupt_TXF0(void)
#else
#pragma vector = VECT_CAN0_TXF0
__interrupt void Interrupt_TXF0(void)
#endif
{
/* The user can put their own code here */
nop();
}
#if FAST_INTC_VECTOR == VECT_CAN0_RXM0
__fast_interrupt void Interrupt_RXM0(void)
#else
#pragma vector = VECT_CAN0_RXM0
__interrupt void Interrupt_RXM0(void)
#endif
{
/* The user can put their own code here */
nop();
}
#if FAST_INTC_VECTOR == VECT_CAN0_TXM0
__fast_interrupt void Interrupt_TXM0(void)
#else
#pragma vector = VECT_CAN0_TXM0
__interrupt void Interrupt_TXM0(void)
#endif
{
/* The user can put their own code here */
nop();
}
/* End of file */
/*""FILE COMMENT""*******************************************************
* System Name : Interrupt program for RX62N
* File Name : Interrupt_POE.c
* Version : 1.02
* Contents : Interrupt handlers for the Port Output Enable module
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#include "r_pdl_poe.h"
#include "r_pdl_definitions.h"
#include "r_pdl_user_definitions.h"
/*""FUNC COMMENT""***************************************************
* Module outline : POE interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_OEIn(void)
*-------------------------------------------------------------------
* Function : Interrupt processing function for POE interrupt n
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*-------------------------------------------------------------------
* Input :
* Output :
*-------------------------------------------------------------------
* Use function : POE_callback_func[n]
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if FAST_INTC_VECTOR == VECT_POE_OEI1
__fast_interrupt void Interrupt_OEI1(void)
#else
#pragma vector = VECT_POE_OEI1
__interrupt void Interrupt_OEI1(void)
#endif
{
#ifdef DEVICE_PACKAGE_TFLGA_85
/* This peripheral is not available on the 85-pin package */
nop();
#else
/* Call the user function */
if (rpdl_POE_callback_func[0] != PDL_NO_FUNC)
{
rpdl_POE_callback_func[0]();
}
#endif
}
#if FAST_INTC_VECTOR == VECT_POE_OEI2
__fast_interrupt void Interrupt_OEI2(void)
#else
#pragma vector = VECT_POE_OEI2
__interrupt void Interrupt_OEI2(void)
#endif
{
#ifdef DEVICE_PACKAGE_TFLGA_85
/* This peripheral is not available on the 85-pin package */
nop();
#else
/* Call the user function */
if (rpdl_POE_callback_func[2] != PDL_NO_FUNC)
{
rpdl_POE_callback_func[2]();
}
#endif
}
#if FAST_INTC_VECTOR == VECT_POE_OEI3
__fast_interrupt void Interrupt_OEI3(void)
#else
#pragma vector = VECT_POE_OEI3
__interrupt void Interrupt_OEI3(void)
#endif
{
#ifdef DEVICE_PACKAGE_TFLGA_85
/* This peripheral is not available on the 85-pin package */
nop();
#else
/* Call the user function */
if (rpdl_POE_callback_func[1] != PDL_NO_FUNC)
{
rpdl_POE_callback_func[1]();
}
#endif
}
#if FAST_INTC_VECTOR == VECT_POE_OEI4
__fast_interrupt void Interrupt_OEI4(void)
#else
#pragma vector = VECT_POE_OEI4
__interrupt void Interrupt_OEI4(void)
#endif
{
#ifdef DEVICE_PACKAGE_TFLGA_85
/* This peripheral is not available on the 85-pin package */
nop();
#else
/* Call the user function */
if (rpdl_POE_callback_func[3] != PDL_NO_FUNC)
{
rpdl_POE_callback_func[3]();
}
#endif
}
/* End of file */
此差异已折叠。
/*""FILE COMMENT""*******************************************************
* System Name : Interrupt program for RX62Nxx
* File Name : Interrupt_WDT.c
* Version : 1.02
* Contents : Interrupt handler for the Watchdog timer
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#include "r_pdl_wdt.h"
#include "r_pdl_definitions.h"
#include "r_pdl_user_definitions.h"
/*""FUNC COMMENT""***************************************************
* Module outline : Timer interrupt processing
*-------------------------------------------------------------------
* Declaration : void Interrupt_WDT(void)
*-------------------------------------------------------------------
* Function : Interrupt processing function for the WDT
*-------------------------------------------------------------------
* Argument : Nothing
*-------------------------------------------------------------------
* Return value : Nothing
*-------------------------------------------------------------------
* Input :
* Output :
*-------------------------------------------------------------------
* Use function : WDT_callback_func
*-------------------------------------------------------------------
* Notes :
*-------------------------------------------------------------------
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FUNC COMMENT END""**********************************************/
#if FAST_INTC_VECTOR == VECT_WDT_WOVI
__fast_interrupt void Interrupt_WDT(void)
#else
#pragma vector = VECT_WDT_WOVI
__interrupt void Interrupt_WDT(void)
#endif
{
/* Call the user function */
if (rpdl_WDT_callback_func != PDL_NO_FUNC)
{
rpdl_WDT_callback_func();
}
}
/* End of file */
/********************************************************************************/
/* RX FAMILY C/C++ Compiler */
/* Copyright (C) 2007 Renesas Technology Corp. and Renesas Solutions Corp. */
/* All Rights Reserved. */
/********************************************************************************/
#ifndef _MACRO
#define _MACRO
#ifdef __RX
#ifndef _NO_MT
#define _NO_MT
#endif /* !_NO_MT */
#ifdef __STDC_VERSION__
#if 199901L <= __STDC_VERSION__
#define _C99
#endif /* 199901L <= __STDC_VERSION__ */
#endif /* __STDC_VERSION__ */
#ifndef _HAS_TR1
#define _HAS_TR1 0
#endif /* !_HAS_TR1 */
#ifndef __STDC_WANT_LIB_EXT1__
#define __STDC_WANT_LIB_EXT1__ 0
#endif /* !__STDC_WANT_LIB_EXT1 */
#ifndef _ADDED_C_LIB
#define _ADDED_C_LIB 0
#endif /* !_ADDED_C_LIB */
#ifndef __STDC_WANT_SAFER_LIB__
#define __STDC_WANT_SAFER_LIB__ 0
#endif /* !__STDC_WANT_SAFER_LIB__ */
#ifndef _ALT_NS
#define _ALT_NS 0
#endif /* !_ALT_NS */
#ifdef __cplusplus
#ifndef _C99
#define _C99
#endif /* !_C99*/
#endif /* __cplusplus */
#ifdef __embedded_cplusplus
#ifndef _NO_NS
#define _NO_NS
#endif /* !_NO_NS */
#ifndef _ECPP
#define _ECPP
#endif /* !_ECPP */
#endif /* __embedded_cplusplus */
#ifdef _REENTRANT
#ifndef _R_REENT
#define _R_REENT
#endif /* !_R_REENT */
#endif /* _REENTRANT */
#endif /* __RX */
#endif /* _MACRO */
/*""FILE COMMENT""*******************************************************
* System Name : ADC converter API for RX62Nxx
* File Name : r_pdl_adc_10.h
* Version : 1.02
* Contents : ADC function prototypes
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS :
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#ifndef R_PDL_ADC_10_H
#define R_PDL_ADC_10_H
#include "r_pdl_common_defs_RX62Nxx.h"
/* Function prototypes */
bool R_ADC_10_Create(
uint8_t,
uint32_t,
uint32_t,
float,
void *,
uint8_t
);
bool R_ADC_10_Destroy(
uint8_t
);
bool R_ADC_10_Control(
uint16_t
);
bool R_ADC_10_Read(
uint8_t,
uint16_t *
);
/* Scan mode */
#define PDL_ADC_10_MODE_SINGLE 0x00000001u
#define PDL_ADC_10_MODE_CONTINUOUS_SCAN 0x00000002u
#define PDL_ADC_10_MODE_ONE_CYCLE_SCAN 0x00000004u
/* Channel selection */
#define PDL_ADC_10_CHANNELS_OPTION_1 0x00000008u
#define PDL_ADC_10_CHANNELS_OPTION_2 0x00000010u
#define PDL_ADC_10_CHANNELS_OPTION_3 0x00000020u
#define PDL_ADC_10_CHANNELS_OPTION_4 0x00000040u
/* Trigger selection */
#define PDL_ADC_10_TRIGGER_SOFTWARE 0x00000080u
#define PDL_ADC_10_TRIGGER_MTU0_MTU4_CMIC_A 0x00000100u
#define PDL_ADC_10_TRIGGER_TMR0_CM_A 0x00000200u
#define PDL_ADC_10_TRIGGER_ADTRG0 0x00000400u
#define PDL_ADC_10_TRIGGER_ADTRG1 0x00000800u
#define PDL_ADC_10_TRIGGER_MTU0_CMIC 0x00001000u
#define PDL_ADC_10_TRIGGER_MTU6_MTU10_CMIC_A 0x00002000u
#define PDL_ADC_10_TRIGGER_MTU4_CM 0x00004000u
#define PDL_ADC_10_TRIGGER_MTU10_CM 0x00008000u
/* Data alignment */
#define PDL_ADC_10_DATA_ALIGNMENT_LEFT 0x00010000u
#define PDL_ADC_10_DATA_ALIGNMENT_RIGHT 0x00020000u
/* DMAC / DTC trigger control */
#define PDL_ADC_10_DMAC_DTC_TRIGGER_DISABLE 0x00040000u
#define PDL_ADC_10_DMAC_TRIGGER_ENABLE 0x00080000u
#define PDL_ADC_10_DTC_TRIGGER_ENABLE 0x00100000u
/* Sampling time calcuation control */
#define PDL_ADC_10_ADSSTR_CALCULATE 0x00200000u
#define PDL_ADC_10_ADSSTR_SPECIFY 0x00400000u
/* Pin selection */
#define PDL_ADC_10_PIN_ADTRG0_A 0x00800000u
#define PDL_ADC_10_PIN_ADTRG0_B 0x01000000u
/* Self-Diagnostic */
#define PDL_ADC_10_SINGLE_AN0_SW (PDL_ADC_10_MODE_SINGLE | \
PDL_ADC_10_CHANNELS_OPTION_1 | \
PDL_ADC_10_TRIGGER_SOFTWARE)
#define PDL_ADC_10_ADDIAGR_DISABLE 0x02000000u
#define PDL_ADC_10_ADDIAGR_VREF_0 0x04000000u
#define PDL_ADC_10_ADDIAGR_VREF_0_5 0x08000000u
#define PDL_ADC_10_ADDIAGR_VREF_1 0x10000000u
#define PDL_ADC_10_SELF_DIAGNOSTIC_DISABLE (PDL_ADC_10_ADDIAGR_DISABLE)
#define PDL_ADC_10_SELF_DIAGNOSTIC_VREF_0 (PDL_ADC_10_SINGLE_AN0_SW | PDL_ADC_10_ADDIAGR_VREF_0)
#define PDL_ADC_10_SELF_DIAGNOSTIC_VREF_0_5 (PDL_ADC_10_SINGLE_AN0_SW | PDL_ADC_10_ADDIAGR_VREF_0_5)
#define PDL_ADC_10_SELF_DIAGNOSTIC_VREF_1 (PDL_ADC_10_SINGLE_AN0_SW | PDL_ADC_10_ADDIAGR_VREF_1)
/* On / off control */
#define PDL_ADC_10_0_ON 0x0001u
#define PDL_ADC_10_0_OFF 0x0002u
#define PDL_ADC_10_1_ON 0x0004u
#define PDL_ADC_10_1_OFF 0x0008u
/* CPU control */
#define PDL_ADC_10_CPU_ON 0x0100u
#define PDL_ADC_10_CPU_OFF 0x0200u
#endif
/* End of file */
/*""FILE COMMENT""*******************************************************
* System Name : A/D converter API for RX62Nxx
* File Name : r_pdl_adc_10_RX62Nxx.h
* Version : 1.02
* Contents : ADC header
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#ifndef R_PDL_ADC_10_RX62Nxx_H
#define R_PDL_ADC_10_RX62Nxx_H
#define ADC_10_UNITS 2
extern VoidCallBackFunc rpdl_ADC_10_callback_func[];
/* Library prototypes */
bool R_ADC_10_CreateAll(
const uint8_t,
const uint32_t,
const uint32_t,
const float,
VoidCallBackFunc const,
const uint8_t
);
bool R_ADC_10_DestroyAll(
const uint8_t
);
bool R_ADC_10_ControlAll(
const uint16_t
);
bool R_ADC_10_ReadAll(
const uint8_t,
volatile uint16_t * const
);
bool ReturnFalse(void);
/* Macro definitions */
#define R_ADC_10_Create(a, b, c, d, e, f) \
( \
( ( ((a) < ADC_10_UNITS) && ((f) <= IPL_MAX) ) ) ? \
R_ADC_10_CreateAll( (a), (b), (c), (d), (e), (f)): \
ReturnFalse() \
)
#define R_ADC_10_Destroy(a) \
( \
( (a) < ADC_10_UNITS ) ? \
R_ADC_10_DestroyAll( (a) ): \
ReturnFalse() \
)
#define R_ADC_10_Control(a) \
( \
( ((a) & 0xFFu) != 0x00u ) ? \
R_ADC_10_ControlAll( (a) ): \
ReturnFalse() \
)
#define R_ADC_10_Read(a, b) \
( \
( (a) < ADC_10_UNITS ) ? \
R_ADC_10_ReadAll( (a), (b) ): \
ReturnFalse() \
)
#endif
/* End of file */
/*""FILE COMMENT""*******************************************************
* System Name : 12-bit ADC converter API for RX62Nxx
* File Name : r_pdl_adc_12.h
* Version : 1.02
* Contents : ADC_12 function prototypes
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS :
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#ifndef R_PDL_ADC_12_H
#define R_PDL_ADC_12_H
#include "r_pdl_common_defs_RX62Nxx.h"
/* Function prototypes */
bool R_ADC_12_Create(
uint8_t,
uint32_t,
uint16_t,
uint16_t,
void *,
uint8_t
);
bool R_ADC_12_Destroy(
uint8_t
);
bool R_ADC_12_Control(
uint8_t
);
bool R_ADC_12_Read(
uint8_t,
uint16_t *
);
/* Scan mode */
#define PDL_ADC_12_SCAN_SINGLE 0x00000001ul
#define PDL_ADC_12_SCAN_CONTINUOUS 0x00000002ul
// Input channel selection
#define PDL_ADC_12_CHANNEL_0 0x00000004ul
#define PDL_ADC_12_CHANNEL_1 0x00000008ul
#define PDL_ADC_12_CHANNEL_2 0x00000010ul
#define PDL_ADC_12_CHANNEL_3 0x00000020ul
#define PDL_ADC_12_CHANNEL_4 0x00000040ul
#define PDL_ADC_12_CHANNEL_5 0x00000080ul
#define PDL_ADC_12_CHANNEL_6 0x00000100ul
#define PDL_ADC_12_CHANNEL_7 0x00000200ul
/* Clock division */
#define PDL_ADC_12_DIV_1 0x00000400ul
#define PDL_ADC_12_DIV_2 0x00000800ul
#define PDL_ADC_12_DIV_4 0x00001000ul
#define PDL_ADC_12_DIV_8 0x00002000ul
/* Data alignment */
#define PDL_ADC_12_DATA_ALIGNMENT_LEFT 0x00004000ul
#define PDL_ADC_12_DATA_ALIGNMENT_RIGHT 0x00008000ul
/* Result register clearing */
#define PDL_ADC_12_RETAIN_RESULT 0x00010000ul
#define PDL_ADC_12_CLEAR_RESULT 0x00020000ul
/* DMAC / DTC trigger control */
#define PDL_ADC_12_DMAC_DTC_TRIGGER_DISABLE 0x00040000ul
#define PDL_ADC_12_DMAC_TRIGGER_ENABLE 0x00080000ul
#define PDL_ADC_12_DTC_TRIGGER_ENABLE 0x00100000ul
/* Trigger selection */
#define PDL_ADC_12_TRIGGER_SOFTWARE 0x0001u
#define PDL_ADC_12_TRIGGER_ADTRG0 0x0002u
#define PDL_ADC_12_TRIGGER_MTU0_ICCM_A 0x0004u
#define PDL_ADC_12_TRIGGER_MTU0_ICCM_B 0x0008u
#define PDL_ADC_12_TRIGGER_MTU0_MTU4_ICCM 0x0010u
#define PDL_ADC_12_TRIGGER_MTU6_MTU10_ICCM 0x0020u
#define PDL_ADC_12_TRIGGER_MTU0_CM_E 0x0040u
#define PDL_ADC_12_TRIGGER_MTU0_CM_F 0x0080u
#define PDL_ADC_12_TRIGGER_MTU4_CM 0x0100u
#define PDL_ADC_12_TRIGGER_MTU10_CM 0x0200u
#define PDL_ADC_12_TRIGGER_TMR0 0x0400u
#define PDL_ADC_12_TRIGGER_TMR2 0x0800u
/* Pin selection */
#define PDL_ADC_12_PIN_ADTRG0_A 0x1000u
#define PDL_ADC_12_PIN_ADTRG0_B 0x2000u
/* Value addition mode selection */
#define PDL_ADC_12_VALUE_ADD_CHANNEL_0 0x0001u
#define PDL_ADC_12_VALUE_ADD_CHANNEL_1 0x0002u
#define PDL_ADC_12_VALUE_ADD_CHANNEL_2 0x0004u
#define PDL_ADC_12_VALUE_ADD_CHANNEL_3 0x0008u
#define PDL_ADC_12_VALUE_ADD_CHANNEL_4 0x0010u
#define PDL_ADC_12_VALUE_ADD_CHANNEL_5 0x0020u
#define PDL_ADC_12_VALUE_ADD_CHANNEL_6 0x0040u
#define PDL_ADC_12_VALUE_ADD_CHANNEL_7 0x0080u
/* Value addition count selection */
#define PDL_ADC_12_VALUE_ADD_TIME_1 0x0100u
#define PDL_ADC_12_VALUE_ADD_TIME_2 0x0200u
#define PDL_ADC_12_VALUE_ADD_TIME_3 0x0400u
#define PDL_ADC_12_VALUE_ADD_TIME_4 0x0800u
/* On / off control */
#define PDL_ADC_12_0_ON 0x01u
#define PDL_ADC_12_0_OFF 0x02u
/* CPU control */
#define PDL_ADC_12_CPU_OFF 0x04u
#endif
/* End of file */
/*""FILE COMMENT""*******************************************************
* System Name : 12-bit A/D converter API for RX62Nxx
* File Name : r_pdl_adc_12_RX62Nxx.h
* Version : 1.02
* Contents : ADC_12 header
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#ifndef R_PDL_ADC_12_RX62Nxx_H
#define R_PDL_ADC_12_RX62Nxx_H
extern VoidCallBackFunc rpdl_ADC_12_callback_func[];
#define ADC_12_UNITS 1
/* Library prototypes */
bool R_ADC_12_CreateAll(
const uint8_t,
const uint32_t,
const uint16_t,
const uint16_t,
VoidCallBackFunc const,
const uint8_t
);
bool R_ADC_12_DestroyAll(
const uint8_t
);
bool R_ADC_12_ControlAll(
const uint8_t
);
bool R_ADC_12_ReadAll(
const uint8_t,
volatile uint16_t * const
);
bool ReturnFalse(void);
/* Macro definitions */
#define R_ADC_12_Create(a, b, c, d, e, f) \
( \
( ( ((a) < ADC_12_UNITS) && ((f) <= IPL_MAX) ) ) ? \
R_ADC_12_CreateAll( (a), (b), (c), (d), (e), (f)): \
ReturnFalse() \
)
#define R_ADC_12_Destroy(a) \
( \
( (a) < ADC_12_UNITS ) ? \
R_ADC_12_DestroyAll( (a) ): \
ReturnFalse() \
)
#define R_ADC_12_Control(a) \
( \
R_ADC_12_ControlAll( (a) ) \
)
#define R_ADC_12_Read(a, b) \
( \
( (a) < ADC_12_UNITS ) ? \
R_ADC_12_ReadAll( (a), (b) ): \
ReturnFalse() \
)
#endif
/* End of file */
此差异已折叠。
/*""FILE COMMENT""*******************************************************
* System Name : BSC API for RX62N
* File Name : r_pdl_bsc_RX62Nxx.h
* Version : 1.02
* Contents : BSC API header
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#ifndef R_PDL_BSC_RX62Nxx_H
#define R_PDL_BSC_RX62Nxx_H
#define BSC_AREAS 8
/* Callback function storage */
extern VoidCallBackFunc rpdl_BSC_callback_func;
/* Library prototypes */
bool R_BSC_CreateAll(
const uint32_t,
const uint32_t,
const uint8_t,
VoidCallBackFunc const,
const uint8_t
);
bool R_BSC_CreateAreaAll(
const uint8_t,
const uint16_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_BSC_SDRAM_CreateAreaAll(
const uint16_t,
const uint16_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint16_t
);
bool R_BSC_DestroyAll(
const uint8_t
);
bool R_BSC_ControlAll(
const uint16_t
);
bool R_BSC_GetStatusAll(
volatile uint8_t * const,
volatile uint16_t * const,
volatile uint8_t * const
);
bool ReturnFalse(void);
/* Macro definitions */
#define R_BSC_Create(a, b, c, d, e) \
( \
( (e) <= IPL_MAX ) ? \
R_BSC_CreateAll( (a), (b), (c), (d), (e) ) : \
ReturnFalse() \
)
#define R_BSC_CreateArea(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o) \
( \
( (a) < BSC_AREAS ) ? \
R_BSC_CreateAreaAll( (a), (b), (c), (d), (e), (f), (g), (h), (i), (j), (k), (l), (m), (n), (o) ) : \
ReturnFalse() \
)
#if defined (DEVICE_PACKAGE_LQFP_100) || defined (DEVICE_PACKAGE_TFLGA_85)
#define R_BSC_SDRAM_CreateArea(a, b, c, d, e, f, g, h, i, j, k, l) \
( \
ReturnFalse() \
)
#else
#define R_BSC_SDRAM_CreateArea(a, b, c, d, e, f, g, h, i, j, k, l) \
( \
R_BSC_SDRAM_CreateAreaAll( (a), (b), (c), (d), (e), (f), (g), (h), (i), (j), (k), (l) ) \
)
#endif
#define R_BSC_Destroy(a) \
( \
( (a) < BSC_AREAS ) ? \
R_BSC_DestroyAll( (a) ) : \
ReturnFalse() \
)
#define R_BSC_Control(a) \
( \
R_BSC_ControlAll( (a) ) \
)
#define R_BSC_GetStatus(a, b, c) \
( \
R_BSC_GetStatusAll( (a), (b), (c) ) \
)
#endif
/* End of file */
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
/*""FILE COMMENT""*******************************************************
* System Name : Voltage detection circuit API for RX62Nxx
* File Name : r_pdl_lvd.h
* Version : 1.02
* Contents : LVD API header
* Customer :
* Model :
* Order :
* CPU : RX
* Compiler : RXC
* OS : Nothing
* Programmer :
* Note :
************************************************************************
* Copyright, 2011. Renesas Electronics Corporation
* and Renesas Solutions Corporation
************************************************************************
* History : 2011.04.08
* : Ver 1.02
* : CS-5 release.
*""FILE COMMENT END""**************************************************/
#ifndef R_PDL_LVD_H
#define R_PDL_LVD_H
#include "r_pdl_common_defs_RX62Nxx.h"
/* Function prototypes */
bool LVD_Control(
uint8_t
);
/* LVD2 and LVD1 control */
#define PDL_LVD_VDET2_DISABLE_VDET1_DISABLE 0x01u
#define PDL_LVD_VDET2_DISABLE_VDET1_RESET 0x02u
#define PDL_LVD_VDET2_DISABLE_VDET1_INTERRUPT 0x04u
#define PDL_LVD_VDET2_RESET_VDET1_DISABLE 0x08u
#define PDL_LVD_VDET2_INTERRUPT_VDET1_DISABLE 0x10u
#define PDL_LVD_VDET2_INTERRUPT_VDET1_RESET 0x20u
#endif
/* End of file */
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
文件已添加
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册