Merge pull request #374 from limxuzheng/master

add a support for rx62n
This commit is contained in:
Bernard Xiong
2014-11-13 14:27:24 +08:00
100 changed files with 17645 additions and 140 deletions
+475
View File
@@ -0,0 +1,475 @@
/* 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 */
+132
View File
@@ -0,0 +1,132 @@
/*""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 diff suppressed because it is too large Load Diff
+286
View File
@@ -0,0 +1,286 @@
/*""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 */
Binary file not shown.
+78
View File
@@ -0,0 +1,78 @@
/*""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 */
+64
View File
@@ -0,0 +1,64 @@
/*""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 */
+63
View File
@@ -0,0 +1,63 @@
/*""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 */
+141
View File
@@ -0,0 +1,141 @@
/*""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 */
+105
View File
@@ -0,0 +1,105 @@
/*""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 */
+88
View File
@@ -0,0 +1,88 @@
/*""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 diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+203
View File
@@ -0,0 +1,203 @@
/*""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 */
+126
View File
@@ -0,0 +1,126 @@
/*""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 diff suppressed because it is too large Load Diff
+63
View File
@@ -0,0 +1,63 @@
/*""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 */
+72
View File
@@ -0,0 +1,72 @@
/********************************************************************************/
/* 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 */
+111
View File
@@ -0,0 +1,111 @@
/*""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 */
+82
View File
@@ -0,0 +1,82 @@
/*""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 */
+123
View File
@@ -0,0 +1,123 @@
/*""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 */
+80
View File
@@ -0,0 +1,80 @@
/*""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 */
+210
View File
@@ -0,0 +1,210 @@
/*""FILE COMMENT""*******************************************************
* System Name : BSC API for RX62Nxx
* File Name : r_pdl_bsc.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_H
#define R_PDL_BSC_H
#include "r_pdl_common_defs_RX62Nxx.h"
/* Function prototypes */
bool R_BSC_Create(
uint32_t,
uint32_t,
uint8_t,
void *,
uint8_t
);
bool R_BSC_CreateArea(
uint8_t,
uint16_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t
);
bool R_BSC_SDRAM_CreateArea(
uint16_t,
uint16_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
uint8_t,
uint16_t
);
bool R_BSC_Destroy(
uint8_t
);
bool R_BSC_Control(
uint16_t
);
bool R_BSC_GetStatus(
uint8_t *,
uint16_t *,
uint8_t *
);
/* R_BSC_Create parameter options */
/* Configuration1 (pin select control) */
/* Chip select pin selection */
#define PDL_BSC_CS0_A 0x00000001ul
#define PDL_BSC_CS0_B 0x00000002ul
#define PDL_BSC_CS1_A 0x00000004ul
#define PDL_BSC_CS1_B 0x00000008ul
#define PDL_BSC_CS1_C 0x00000010ul
#define PDL_BSC_CS2_A 0x00000020ul
#define PDL_BSC_CS2_B 0x00000040ul
#define PDL_BSC_CS2_C 0x00000080ul
#define PDL_BSC_CS3_A 0x00000100ul
#define PDL_BSC_CS3_B 0x00000200ul
#define PDL_BSC_CS3_C 0x00000400ul
#define PDL_BSC_CS4_A 0x00000800ul
#define PDL_BSC_CS4_B 0x00001000ul
#define PDL_BSC_CS4_C 0x00002000ul
#define PDL_BSC_CS5_A 0x00004000ul
#define PDL_BSC_CS5_B 0x00008000ul
#define PDL_BSC_CS5_C 0x00010000ul
#define PDL_BSC_CS6_A 0x00020000ul
#define PDL_BSC_CS6_B 0x00040000ul
#define PDL_BSC_CS6_C 0x00080000ul
#define PDL_BSC_CS7_A 0x00100000ul
#define PDL_BSC_CS7_B 0x00200000ul
#define PDL_BSC_CS7_C 0x00400000ul
/* Address (A23-A16) pin selection */
#define PDL_BSC_A23_A16_A 0x00800000ul
#define PDL_BSC_A23_A16_B 0x01000000ul
/* WAIT pin selection */
#define PDL_BSC_WAIT_NOT_USED 0x02000000ul
#define PDL_BSC_WAIT_A 0x04000000ul
#define PDL_BSC_WAIT_B 0x08000000ul
#define PDL_BSC_WAIT_C 0x10000000ul
#define PDL_BSC_WAIT_D 0x20000000ul
/* Configuration2 (output enable control) */
/* Address output control */
#define PDL_BSC_A9_A0_DISABLE 0x00000001ul
#define PDL_BSC_A9_A4_DISABLE 0x00000002ul
#define PDL_BSC_A9_A8_DISABLE 0x00000004ul
#define PDL_BSC_A10_DISABLE 0x00000008ul
#define PDL_BSC_A11_DISABLE 0x00000010ul
#define PDL_BSC_A12_DISABLE 0x00000020ul
#define PDL_BSC_A13_DISABLE 0x00000040ul
#define PDL_BSC_A14_DISABLE 0x00000080ul
#define PDL_BSC_A15_DISABLE 0x00000100ul
#define PDL_BSC_A16_DISABLE 0x00000200ul
#define PDL_BSC_A17_DISABLE 0x00000400ul
#define PDL_BSC_A18_DISABLE 0x00000800ul
#define PDL_BSC_A19_DISABLE 0x00001000ul
#define PDL_BSC_A20_DISABLE 0x00002000ul
#define PDL_BSC_A21_DISABLE 0x00004000ul
#define PDL_BSC_A22_DISABLE 0x00008000ul
#define PDL_BSC_A23_DISABLE 0x00010000ul
/* SDRAM output control */
#define PDL_BSC_SDRAM_PINS_DISABLE 0x00020000ul
#define PDL_BSC_SDRAM_PINS_ENABLE 0x00040000ul
#define PDL_BSC_SDRAM_DQM1_DISABLE 0x00080000ul
#define PDL_BSC_SDRAM_DQM1_ENABLE 0x00100000ul
/* Configuration3 (error control) */
/* Error monitoring */
#define PDL_BSC_ERROR_ILLEGAL_ADDRESS_ENABLE 0x01u
#define PDL_BSC_ERROR_ILLEGAL_ADDRESS_DISABLE 0x02u
#define PDL_BSC_ERROR_TIME_OUT_ENABLE 0x04u
#define PDL_BSC_ERROR_TIME_OUT_DISABLE 0x08u
/* R_BSC_CreateArea parameter options */
/* Configuration selection */
/* Bus width */
#define PDL_BSC_WIDTH_16 0x0001u
#define PDL_BSC_WIDTH_8 0x0002u
#define PDL_BSC_WIDTH_32 0x0004u
/* Endian mode */
#define PDL_BSC_ENDIAN_SAME 0x0008u
#define PDL_BSC_ENDIAN_OPPOSITE 0x0010u
/* Write access mode */
#define PDL_BSC_WRITE_BYTE 0x0020u
#define PDL_BSC_WRITE_SINGLE 0x0040u
/* External wait control */
#define PDL_BSC_WAIT_DISABLE 0x0080u
#define PDL_BSC_WAIT_ENABLE 0x0100u
/* Page access control */
#define PDL_BSC_PAGE_READ_DISABLE 0x0200u
#define PDL_BSC_PAGE_READ_NORMAL 0x0400u
#define PDL_BSC_PAGE_READ_CONTINUOUS 0x0800u
#define PDL_BSC_PAGE_WRITE_DISABLE 0x1000u
#define PDL_BSC_PAGE_WRITE_ENABLE 0x2000u
/* R_BSC_Control parameter options */
#define PDL_BSC_ERROR_CLEAR 0x0001u
#define PDL_BSC_SDRAM_INITIALIZATION 0x0002u
#define PDL_BSC_SDRAM_AUTO_REFRESH_ENABLE 0x0004u
#define PDL_BSC_SDRAM_AUTO_REFRESH_DISABLE 0x0008u
#define PDL_BSC_SDRAM_SELF_REFRESH_ENABLE 0x0010u
#define PDL_BSC_SDRAM_SELF_REFRESH_DISABLE 0x0020u
#define PDL_BSC_SDRAM_ENABLE 0x0040u
#define PDL_BSC_SDRAM_DISABLE 0x0080u
#define PDL_BSC_DISABLE_BUSERR_IRQ 0x0100u
/* R_BSC_SDRAM_CreateArea parameter options */
/* Configuration selection */
/* Bus width */
#define PDL_BSC_SDRAM_WIDTH_16 0x0001u
#define PDL_BSC_SDRAM_WIDTH_8 0x0002u
#define PDL_BSC_SDRAM_WIDTH_32 0x0004u
/* Endian mode */
#define PDL_BSC_SDRAM_ENDIAN_SAME 0x0008u
#define PDL_BSC_SDRAM_ENDIAN_OPPOSITE 0x0010u
/* Continuous access mode */
#define PDL_BSC_SDRAM_CONT_ACCESS_ENABLE 0x0020u
#define PDL_BSC_SDRAM_CONT_ACCESS_DISABLE 0x0040u
/* Address multiplex selection */
#define PDL_BSC_SDRAM_8_BIT_SHIFT 0x0080u
#define PDL_BSC_SDRAM_9_BIT_SHIFT 0x0100u
#define PDL_BSC_SDRAM_10_BIT_SHIFT 0x0200u
#define PDL_BSC_SDRAM_11_BIT_SHIFT 0x0400u
#endif
/* End of file */
+129
View File
@@ -0,0 +1,129 @@
/*""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 */
+64
View File
@@ -0,0 +1,64 @@
/*""FILE COMMENT""*******************************************************
* System Name : CGC API
* File Name : r_pdl_cgc.h
* Version : 1.02
* Contents : CGC header
* 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_CGC_H
#define R_PDL_CGC_H
#include "r_pdl_common_defs_RX62Nxx.h"
/* Function prototypes */
bool R_CGC_Set(
uint32_t,
uint32_t,
uint32_t,
uint32_t,
uint16_t
);
bool R_CGC_Control(
uint16_t
);
bool R_CGC_GetStatus(
uint8_t *
);
/* BCLK pin putput control */
#define PDL_CGC_BCLK_DISABLE 0x0001u
#define PDL_CGC_BCLK_DIV_1 0x0002u
#define PDL_CGC_BCLK_DIV_2 0x0004u
#define PDL_CGC_BCLK_HIGH 0x0008u
/* SDCLK pin putput control */
#define PDL_CGC_SDCLK_DISABLE 0x0010u
#define PDL_CGC_SDCLK_ENABLE 0x0020u
/* Oscillation Stop Detection control */
#define PDL_CGC_OSC_STOP_ENABLE 0x0040u
#define PDL_CGC_OSC_STOP_DISABLE 0x0080u
/* Sub-clock oscillator control */
#define PDL_CGC_SUB_CLOCK_ENABLE 0x0100u
#define PDL_CGC_SUB_CLOCK_DISABLE 0x0200u
#endif
/* End of file */
+55
View File
@@ -0,0 +1,55 @@
/*""FILE COMMENT""*******************************************************
* System Name : CGC API for RX62Nxx
* File Name : r_pdl_cgc_RX62Nxx.h
* Version : 1.02
* Contents : CGC 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_CGC_RX62Nxx_H
#define R_PDL_CGC_RX62Nxx_H
/* Library prototypes */
bool R_CGC_SetAll(
const uint32_t,
const uint32_t,
const uint32_t,
const uint32_t,
const uint16_t
);
bool R_CGC_ControlAll(
const uint16_t
);
bool R_CGC_GetStatusAll(
volatile uint8_t * const
);
/* Macro definitions */
#define R_CGC_Set(a, b, c, d, e) \
R_CGC_SetAll( (a), (b), (c), (d), (e) )
#define R_CGC_Control(a) \
R_CGC_ControlAll( (a) )
#define R_CGC_GetStatus(a) \
R_CGC_GetStatusAll( (a) )
#endif
/* End of file */
+83
View File
@@ -0,0 +1,83 @@
/*""FILE COMMENT""*******************************************************
* System Name : CMT API for RX62Nxx
* File Name : r_pdl_cmt.h
* Version : 1.02
* Contents : CMT 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_CMT_H
#define R_PDL_CMT_H
#include "r_pdl_common_defs_RX62Nxx.h"
/* Function prototypes */
bool R_CMT_Create(
uint8_t,
uint16_t,
float,
void *,
uint8_t
);
bool R_CMT_CreateOneShot(
uint8_t,
uint16_t,
float,
void *,
uint8_t
);
bool R_CMT_Destroy(
uint8_t
);
bool R_CMT_Control(
uint8_t,
uint16_t,
float
);
bool R_CMT_Read(
uint8_t,
uint8_t *,
uint16_t *
);
/* Timer counter control */
#define PDL_CMT_STOP 0x0001u
#define PDL_CMT_START 0x0002u
/* Calculation selection */
#define PDL_CMT_PERIOD 0x0004u
#define PDL_CMT_FREQUENCY 0x0008u
/* CPU control */
#define PDL_CMT_CPU_ON 0x0010u
#define PDL_CMT_CPU_OFF 0x0020u
/* DMAC / DTC trigger control */
#define PDL_CMT_DMAC_DTC_TRIGGER_DISABLE 0x0040u
#define PDL_CMT_DMAC_TRIGGER_ENABLE 0x0080u
#define PDL_CMT_DTC_TRIGGER_ENABLE 0x0100u
/* Direct register control */
#define PDL_CMT_CONSTANT 0x0200u
#define PDL_CMT_COUNTER 0x0400u
#define PDL_CMT_PCLK_DIV_8 0x0800u
#define PDL_CMT_PCLK_DIV_32 0x1000u
#define PDL_CMT_PCLK_DIV_128 0x2000u
#define PDL_CMT_PCLK_DIV_512 0x4000u
#endif
/* End of file */
+104
View File
@@ -0,0 +1,104 @@
/*""FILE COMMENT""*******************************************************
* System Name : CMT API for RX62Nxx
* File Name : r_pdl_cmt_RX62Nxx.h
* Version : 1.02
* Contents : CMT 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_CMT_RX62Nxx_H
#define R_PDL_CMT_RX62Nxx_H
#define CMT_UNITS 2
#define CMT_CHANNELS_PER_UNIT 2
#define CMT_CHANNELS (uint8_t)(CMT_UNITS * CMT_CHANNELS_PER_UNIT)
/* Callback function storage */
extern VoidCallBackFunc rpdl_CMT_callback_func[CMT_CHANNELS];
/* Global variables */
extern volatile uint8_t rpdl_CMT_one_shot[CMT_CHANNELS];
/* Library prototypes */
bool R_CMT_CreateAll(
const uint8_t,
const uint16_t,
const float,
VoidCallBackFunc const,
const uint8_t
);
bool R_CMT_CreateOneShotAll(
const uint8_t,
const uint16_t,
const float,
VoidCallBackFunc const,
const uint8_t
);
bool R_CMT_DestroyAll(
const uint8_t
);
bool R_CMT_ControlAll(
const uint8_t,
const uint16_t,
const float
);
bool R_CMT_ReadAll(
const uint8_t,
volatile uint8_t * const,
volatile uint16_t * const
);
bool ReturnFalse(void);
/* Macro definitions */
#define R_CMT_Create(a, b, c, d, e) \
( \
( ( ((a) < CMT_CHANNELS ) && ((e) <= IPL_MAX) ) ) ? \
R_CMT_CreateAll( (a), (b), (c), (d), (e) ) : \
ReturnFalse() \
)
#define R_CMT_CreateOneShot(a, b, c, d, e) \
( \
( ( ((a) < CMT_CHANNELS ) && ((e) <= IPL_MAX) ) ) ? \
R_CMT_CreateOneShotAll( (a), (b), (c), (d), (e) ) : \
ReturnFalse() \
)
#define R_CMT_Destroy(a) \
( \
( (a) < CMT_UNITS ) ? \
R_CMT_DestroyAll( (a) ) : \
ReturnFalse() \
)
#define R_CMT_Control(a, b, c) \
( \
( (a) < CMT_CHANNELS ) ? \
R_CMT_ControlAll( (a), (b), (c) ) : \
ReturnFalse() \
)
#define R_CMT_Read(a, b, c) \
( \
( (a) < CMT_CHANNELS ) ? \
R_CMT_ReadAll( (a), (b), (c) ) : \
ReturnFalse() \
)
#endif
/* End of file */
+315
View File
@@ -0,0 +1,315 @@
/*""FILE COMMENT""*******************************************************
* System Name : API for RX62Nxx
* File Name : r_pdl_common_defs_RX62Nxx.h
* Version : 1.02
* Contents : API common definitions
* 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_COMMON_DEFS_RX62Nxx_H
#define R_PDL_COMMON_DEFS_RX62Nxx_H
#include <stdint.h>
#include <stdbool.h>
#include <machine.h>
#include <stddef.h>
#include <iorx62n.h>
/* Callback function type */
typedef void (* VoidCallBackFunc)(void);
/* The supported MCU group */
#define PDL_MCU_GROUP RX62N
/* The highest interrupt priority level */
#define IPL_MAX 15
/* Use the I/O register area to indicate that a callback function pointer is not to be used */
#define PDL_NO_FUNC (VoidCallBackFunc)0x00080000ul
/* Use the ROM area to indicate that a data pointer is not to be used */
#define PDL_NO_PTR (void *)0xFFFFFFFCul
/* When no parameters options are required */
#define PDL_NO_DATA 0
/* Shared global variables */
extern volatile uint32_t rpdl_CGC_f_pclk;
extern volatile uint32_t rpdl_CGC_f_iclk;
extern volatile uint32_t rpdl_CGC_f_bclk;
extern volatile uint8_t rpdl_INTC_brk_command;
extern volatile uint8_t rpdl_INTC_brk_data8;
extern volatile uint32_t rpdl_INTC_saved_isp;
/* Shared functions */
uint8_t rpdl_DMAC_get_channel(const uint8_t);
/* Utility functions */
uint8_t rpdl_BCD8_to_dec(const uint8_t);
uint16_t rpdl_BCD16_to_dec(const uint16_t);
bool rpdl_common_BCD8_check(const uint8_t);
bool rpdl_common_BCD16_check(const uint16_t);
bool rpdl_common_BCD32_check(const uint32_t);
/* BRK handler command options */
typedef enum {
BRK_NO_COMMAND,
BRK_START_ADC_10,
BRK_START_ADC_10_AND_SLEEP,
BRK_SLEEP,
BRK_ALL_MODULE_CLOCK_STOP,
BRK_STANDBY,
BRK_DEEP_STANDBY,
BRK_LOAD_FINTV_REGISTER,
BRK_WRITE_IPL,
BRK_CMT_START,
BRK_CMT_STOP
} brk_commands;
/* Bit definitions */
#define BIT_0 0x00000001ul
#define BIT_1 0x00000002ul
#define BIT_2 0x00000004ul
#define BIT_3 0x00000008ul
#define BIT_4 0x00000010ul
#define BIT_5 0x00000020ul
#define BIT_6 0x00000040ul
#define BIT_7 0x00000080ul
#define BIT_8 0x00000100ul
#define BIT_9 0x00000200ul
#define BIT_10 0x00000400ul
#define BIT_11 0x00000800ul
#define BIT_12 0x00001000ul
#define BIT_13 0x00002000ul
#define BIT_14 0x00004000ul
#define BIT_15 0x00008000ul
#define BIT_16 0x00010000ul
#define BIT_17 0x00020000ul
#define BIT_18 0x00040000ul
#define BIT_19 0x00080000ul
#define BIT_20 0x00100000ul
#define BIT_21 0x00200000ul
#define BIT_22 0x00400000ul
#define BIT_23 0x00800000ul
#define BIT_24 0x01000000ul
#define BIT_25 0x02000000ul
#define BIT_26 0x04000000ul
#define BIT_27 0x08000000ul
#define BIT_28 0x10000000ul
#define BIT_29 0x20000000ul
#define BIT_30 0x40000000ul
#define BIT_31 0x80000000ul
#define INV_BIT_0 0xFFFFFFFEul
#define INV_BIT_1 0xFFFFFFFDul
#define INV_BIT_2 0xFFFFFFFBul
#define INV_BIT_3 0xFFFFFFF7ul
#define INV_BIT_4 0xFFFFFFEFul
#define INV_BIT_5 0xFFFFFFDFul
#define INV_BIT_6 0xFFFFFFBFul
#define INV_BIT_7 0xFFFFFF7Ful
#define INV_BIT_8 0xFFFFFEFFul
#define INV_BIT_9 0xFFFFFDFFul
#define INV_BIT_10 0xFFFFFBFFul
#define INV_BIT_11 0xFFFFF7FFul
#define INV_BIT_12 0xFFFFEFFFul
#define INV_BIT_13 0xFFFFDFFFul
#define INV_BIT_14 0xFFFFBFFFul
#define INV_BIT_15 0xFFFF7FFFul
#define INV_BIT_16 0xFFFEFFFFul
#define INV_BIT_17 0xFFFDFFFFul
#define INV_BIT_18 0xFFFBFFFFul
#define INV_BIT_19 0xFFF7FFFFul
#define INV_BIT_20 0xFFEFFFFFul
#define INV_BIT_21 0xFFDFFFFFul
#define INV_BIT_22 0xFFBFFFFFul
#define INV_BIT_23 0xFF7FFFFFul
#define INV_BIT_24 0xFEFFFFFFul
#define INV_BIT_25 0xFDFFFFFFul
#define INV_BIT_26 0xFBFFFFFFul
#define INV_BIT_27 0xF7FFFFFFul
#define INV_BIT_28 0xEFFFFFFFul
#define INV_BIT_29 0xDFFFFFFFul
#define INV_BIT_30 0xBFFFFFFFul
#define INV_BIT_31 0x7FFFFFFFul
/* Interrupt vector numbers */
#define PDL_INTC_VECTOR_BUSERR VECT_BSC_BUSERR
#define PDL_INTC_VECTOR_FIFERR VECT_FCU_FIFERR
#define PDL_INTC_VECTOR_FRDYI VECT_FCU_FRDYI
#define PDL_INTC_VECTOR_SWINT VECT_ICU_SWINT
#define PDL_INTC_VECTOR_CMT0 VECT_CMT0_CMI0
#define PDL_INTC_VECTOR_CMT1 VECT_CMT1_CMI1
#define PDL_INTC_VECTOR_CMT2 VECT_CMT2_CMI2
#define PDL_INTC_VECTOR_CMT3 VECT_CMT3_CMI3
#define PDL_INTC_VECTOR_EINT VECT_ETHER_EINT
#define PDL_INTC_VECTOR_D0FIFO0 VECT_USB0_D0FIFO0
#define PDL_INTC_VECTOR_D1FIFO0 VECT_USB0_D1FIFO0
#define PDL_INTC_VECTOR_USBI0 VECT_USB0_USBI0
#define PDL_INTC_VECTOR_USBR0 VECT_USB_USBR0
#define PDL_INTC_VECTOR_D0FIFO1 VECT_USB1_D0FIFO1
#define PDL_INTC_VECTOR_D1FIFO1 VECT_USB1_D1FIFO1
#define PDL_INTC_VECTOR_USBI1 VECT_USB1_USBI1
#define PDL_INTC_VECTOR_USBR1 VECT_USB_USBR1
#define PDL_INTC_VECTOR_SPEI0 VECT_RSPI0_SPEI0
#define PDL_INTC_VECTOR_SPRI0 VECT_RSPI0_SPRI0
#define PDL_INTC_VECTOR_SPTI0 VECT_RSPI0_SPTI0
#define PDL_INTC_VECTOR_SPII0 VECT_RSPI0_SPII0
#define PDL_INTC_VECTOR_SPEI1 VECT_RSPI1_SPEI1
#define PDL_INTC_VECTOR_SPRI1 VECT_RSPI1_SPRI1
#define PDL_INTC_VECTOR_SPTI1 VECT_RSPI1_SPTI1
#define PDL_INTC_VECTOR_SPII1 VECT_RSPI1_SPII1
#define PDL_INTC_VECTOR_ERS0 VECT_CAN0_ERS0
#define PDL_INTC_VECTOR_RXF0 VECT_CAN0_RXF0
#define PDL_INTC_VECTOR_TXF0 VECT_CAN0_TXF0
#define PDL_INTC_VECTOR_RXM0 VECT_CAN0_RXM0
#define PDL_INTC_VECTOR_TXM0 VECT_CAN0_TXM0
#define PDL_INTC_VECTOR_PRD VECT_RTC_PRD
#define PDL_INTC_VECTOR_CUP VECT_RTC_CUP
#define PDL_INTC_VECTOR_ALM VECT_RTC_ALM
#define PDL_INTC_VECTOR_IRQ0 VECT_ICU_IRQ0
#define PDL_INTC_VECTOR_IRQ1 VECT_ICU_IRQ1
#define PDL_INTC_VECTOR_IRQ2 VECT_ICU_IRQ2
#define PDL_INTC_VECTOR_IRQ3 VECT_ICU_IRQ3
#define PDL_INTC_VECTOR_IRQ4 VECT_ICU_IRQ4
#define PDL_INTC_VECTOR_IRQ5 VECT_ICU_IRQ5
#define PDL_INTC_VECTOR_IRQ6 VECT_ICU_IRQ6
#define PDL_INTC_VECTOR_IRQ7 VECT_ICU_IRQ7
#define PDL_INTC_VECTOR_IRQ8 VECT_ICU_IRQ8
#define PDL_INTC_VECTOR_IRQ9 VECT_ICU_IRQ9
#define PDL_INTC_VECTOR_IRQ10 VECT_ICU_IRQ10
#define PDL_INTC_VECTOR_IRQ11 VECT_ICU_IRQ11
#define PDL_INTC_VECTOR_IRQ12 VECT_ICU_IRQ12
#define PDL_INTC_VECTOR_IRQ13 VECT_ICU_IRQ13
#define PDL_INTC_VECTOR_IRQ14 VECT_ICU_IRQ14
#define PDL_INTC_VECTOR_IRQ15 VECT_ICU_IRQ15
#define PDL_INTC_VECTOR_WOVI VECT_WDT_WOVI
#define PDL_INTC_VECTOR_ADI0 VECT_AD0_ADI0
#define PDL_INTC_VECTOR_ADI1 VECT_AD1_ADI1
#define PDL_INTC_VECTOR_ADI12_0 VECT_S12AD_ADI
#define PDL_INTC_VECTOR_TGIA0 VECT_MTU0_TGIA0
#define PDL_INTC_VECTOR_TGIB0 VECT_MTU0_TGIB0
#define PDL_INTC_VECTOR_TGIC0 VECT_MTU0_TGIC0
#define PDL_INTC_VECTOR_TGID0 VECT_MTU0_TGID0
#define PDL_INTC_VECTOR_TCIV0 VECT_MTU0_TCIV0
#define PDL_INTC_VECTOR_TGIE0 VECT_MTU0_TGIE0
#define PDL_INTC_VECTOR_TGIF0 VECT_MTU0_TGIF0
#define PDL_INTC_VECTOR_TGIA1 VECT_MTU1_TGIA1
#define PDL_INTC_VECTOR_TGIB1 VECT_MTU1_TGIB1
#define PDL_INTC_VECTOR_TCIV1 VECT_MTU1_TCIV1
#define PDL_INTC_VECTOR_TCIU1 VECT_MTU1_TCIU1
#define PDL_INTC_VECTOR_TGIA2 VECT_MTU2_TGIA2
#define PDL_INTC_VECTOR_TGIB2 VECT_MTU2_TGIB2
#define PDL_INTC_VECTOR_TCIV2 VECT_MTU2_TCIV2
#define PDL_INTC_VECTOR_TCIU2 VECT_MTU2_TCIU2
#define PDL_INTC_VECTOR_TGIA3 VECT_MTU3_TGIA3
#define PDL_INTC_VECTOR_TGIB3 VECT_MTU3_TGIB3
#define PDL_INTC_VECTOR_TGIC3 VECT_MTU3_TGIC3
#define PDL_INTC_VECTOR_TGID3 VECT_MTU3_TGID3
#define PDL_INTC_VECTOR_TCIV3 VECT_MTU3_TCIV3
#define PDL_INTC_VECTOR_TGIA4 VECT_MTU4_TGIA4
#define PDL_INTC_VECTOR_TGIB4 VECT_MTU4_TGIB4
#define PDL_INTC_VECTOR_TGIC4 VECT_MTU4_TGIC4
#define PDL_INTC_VECTOR_TGID4 VECT_MTU4_TGID4
#define PDL_INTC_VECTOR_TCIV4 VECT_MTU4_TCIV4
#define PDL_INTC_VECTOR_TGIU5 VECT_MTU5_TGIU5
#define PDL_INTC_VECTOR_TGIV5 VECT_MTU5_TGIV5
#define PDL_INTC_VECTOR_TGIW5 VECT_MTU5_TGIW5
#define PDL_INTC_VECTOR_TGIA6 VECT_MTU6_TGIA6
#define PDL_INTC_VECTOR_TGIB6 VECT_MTU6_TGIB6
#define PDL_INTC_VECTOR_TGIC6 VECT_MTU6_TGIC6
#define PDL_INTC_VECTOR_TGID6 VECT_MTU6_TGID6
#define PDL_INTC_VECTOR_TCIV6 VECT_MTU6_TCIV6
#define PDL_INTC_VECTOR_TGIE6 VECT_MTU6_TGIE6
#define PDL_INTC_VECTOR_TGIF6 VECT_MTU6_TGIF6
#define PDL_INTC_VECTOR_TGIA7 VECT_MTU7_TGIA7
#define PDL_INTC_VECTOR_TGIB7 VECT_MTU7_TGIB7
#define PDL_INTC_VECTOR_TCIV7 VECT_MTU7_TCIV7
#define PDL_INTC_VECTOR_TCIU7 VECT_MTU7_TCIU7
#define PDL_INTC_VECTOR_TGIA8 VECT_MTU8_TGIA8
#define PDL_INTC_VECTOR_TGIB8 VECT_MTU8_TGIB8
#define PDL_INTC_VECTOR_TCIV8 VECT_MTU8_TCIV8
#define PDL_INTC_VECTOR_TCIU8 VECT_MTU8_TCIU8
#define PDL_INTC_VECTOR_TGIA9 VECT_MTU9_TGIA9
#define PDL_INTC_VECTOR_TGIB9 VECT_MTU9_TGIB9
#define PDL_INTC_VECTOR_TGIC9 VECT_MTU9_TGIC9
#define PDL_INTC_VECTOR_TGID9 VECT_MTU9_TGID9
#define PDL_INTC_VECTOR_TCIV9 VECT_MTU9_TCIV9
#define PDL_INTC_VECTOR_TGIA10 VECT_MTU10_TGIA10
#define PDL_INTC_VECTOR_TGIB10 VECT_MTU10_TGIB10
#define PDL_INTC_VECTOR_TGIC10 VECT_MTU10_TGIC10
#define PDL_INTC_VECTOR_TGID10 VECT_MTU10_TGID10
#define PDL_INTC_VECTOR_TCIV10 VECT_MTU10_TCIV10
#define PDL_INTC_VECTOR_TGIU11 VECT_MTU11_TGIU11
#define PDL_INTC_VECTOR_TGIV11 VECT_MTU11_TGIV11
#define PDL_INTC_VECTOR_TGIW11 VECT_MTU11_TGIW11
#define PDL_INTC_VECTOR_OEI1 VECT_POE_OEI1
#define PDL_INTC_VECTOR_OEI2 VECT_POE_OEI2
#define PDL_INTC_VECTOR_OEI3 VECT_POE_OEI3
#define PDL_INTC_VECTOR_OEI4 VECT_POE_OEI4
#define PDL_INTC_VECTOR_CMIA0 VECT_TMR0_CMIA0
#define PDL_INTC_VECTOR_CMIB0 VECT_TMR0_CMIB0
#define PDL_INTC_VECTOR_OVI0 VECT_TMR0_OVI0
#define PDL_INTC_VECTOR_CMIA1 VECT_TMR1_CMIA1
#define PDL_INTC_VECTOR_CMIB1 VECT_TMR1_CMIB1
#define PDL_INTC_VECTOR_OVI1 VECT_TMR1_OVI1
#define PDL_INTC_VECTOR_CMIA2 VECT_TMR2_CMIA2
#define PDL_INTC_VECTOR_CMIB2 VECT_TMR2_CMIB2
#define PDL_INTC_VECTOR_OVI2 VECT_TMR2_OVI2
#define PDL_INTC_VECTOR_CMIA3 VECT_TMR3_CMIA3
#define PDL_INTC_VECTOR_CMIB3 VECT_TMR3_CMIB3
#define PDL_INTC_VECTOR_OVI3 VECT_TMR3_OVI3
#define PDL_INTC_VECTOR_DMAC0I VECT_DMAC_DMAC0I
#define PDL_INTC_VECTOR_DMAC1I VECT_DMAC_DMAC1I
#define PDL_INTC_VECTOR_DMAC2I VECT_DMAC_DMAC2I
#define PDL_INTC_VECTOR_DMAC3I VECT_DMAC_DMAC3I
#define PDL_INTC_VECTOR_EXDMAC0I VECT_EXDMAC_EXDMAC0I
#define PDL_INTC_VECTOR_EXDMAC1I VECT_EXDMAC_EXDMAC1I
#define PDL_INTC_VECTOR_ERI0 VECT_SCI0_ERI0
#define PDL_INTC_VECTOR_RXI0 VECT_SCI0_RXI0
#define PDL_INTC_VECTOR_TXI0 VECT_SCI0_TXI0
#define PDL_INTC_VECTOR_TEI0 VECT_SCI0_TEI0
#define PDL_INTC_VECTOR_ERI1 VECT_SCI1_ERI1
#define PDL_INTC_VECTOR_RXI1 VECT_SCI1_RXI1
#define PDL_INTC_VECTOR_TXI1 VECT_SCI1_TXI1
#define PDL_INTC_VECTOR_TEI1 VECT_SCI1_TEI1
#define PDL_INTC_VECTOR_ERI2 VECT_SCI2_ERI2
#define PDL_INTC_VECTOR_RXI2 VECT_SCI2_RXI2
#define PDL_INTC_VECTOR_TXI2 VECT_SCI2_TXI2
#define PDL_INTC_VECTOR_TEI2 VECT_SCI2_TEI2
#define PDL_INTC_VECTOR_ERI3 VECT_SCI3_ERI3
#define PDL_INTC_VECTOR_RXI3 VECT_SCI3_RXI3
#define PDL_INTC_VECTOR_TXI3 VECT_SCI3_TXI3
#define PDL_INTC_VECTOR_TEI3 VECT_SCI3_TEI3
#define PDL_INTC_VECTOR_ERI5 VECT_SCI5_ERI5
#define PDL_INTC_VECTOR_RXI5 VECT_SCI5_RXI5
#define PDL_INTC_VECTOR_TXI5 VECT_SCI5_TXI5
#define PDL_INTC_VECTOR_TEI5 VECT_SCI5_TEI5
#define PDL_INTC_VECTOR_ERI6 VECT_SCI6_ERI6
#define PDL_INTC_VECTOR_RXI6 VECT_SCI6_RXI6
#define PDL_INTC_VECTOR_TXI6 VECT_SCI6_TXI6
#define PDL_INTC_VECTOR_TEI6 VECT_SCI6_TEI6
#define PDL_INTC_VECTOR_ICEEI0 VECT_RIIC0_ICEEI0
#define PDL_INTC_VECTOR_ICRXI0 VECT_RIIC0_ICRXI0
#define PDL_INTC_VECTOR_ICTXI0 VECT_RIIC0_ICTXI0
#define PDL_INTC_VECTOR_ICTEI0 VECT_RIIC0_ICTEI0
#define PDL_INTC_VECTOR_ICEEI1 VECT_RIIC1_ICEEI1
#define PDL_INTC_VECTOR_ICRXI1 VECT_RIIC1_ICRXI1
#define PDL_INTC_VECTOR_ICTXI1 VECT_RIIC1_ICTXI1
#define PDL_INTC_VECTOR_ICTEI1 VECT_RIIC1_ICTEI1
#endif
/* End of file */
+57
View File
@@ -0,0 +1,57 @@
/*""FILE COMMENT""*******************************************************
* System Name : CRC calculator API for RX62Nxx
* File Name : r_pdl_crc.h
* Version : 1.02
* Contents : CRC 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_CRC_H
#define R_PDL_CRC_H
#include "r_pdl_common_defs_RX62Nxx.h"
/* Function prototypes */
bool R_CRC_Create(
uint8_t
);
bool R_CRC_Destroy(
void
);
bool R_CRC_Write(
uint8_t
);
bool R_CRC_Read(
uint8_t,
uint16_t *
);
/* Polynomial selection */
#define PDL_CRC_POLY_CRC_8 0x01u
#define PDL_CRC_POLY_CRC_16 0x02u
#define PDL_CRC_POLY_CRC_CCITT 0x04u
/* Bit order */
#define PDL_CRC_LSB_FIRST 0x08u
#define PDL_CRC_MSB_FIRST 0x10u
/* Result register clearing */
#define PDL_CRC_CLEAR_RESULT 0x01u
#define PDL_CRC_RETAIN_RESULT 0x02u
#endif
/* End of file */
+64
View File
@@ -0,0 +1,64 @@
/*""FILE COMMENT""*******************************************************
* System Name : CRC calculator API for RX62Nxx
* File Name : r_pdl_crc_RX62Nxx.h
* Version : 1.02
* Contents : CRC 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_CRC_RX62Nxx_H
#define R_PDL_CRC_RX62Nxx_H
/* Library prototypes */
bool R_CRC_CreateAll(
const uint8_t
);
bool R_CRC_DestroyAll(
void
);
bool R_CRC_WriteAll(
const uint8_t
);
bool R_CRC_ReadAll(
const uint8_t,
volatile uint16_t * const
);
/* Macro definitions */
#define R_CRC_Create(a) \
( \
R_CRC_CreateAll( (a) ) \
)
#define R_CRC_Destroy() \
( \
R_CRC_DestroyAll() \
)
#define R_CRC_Write(a) \
( \
R_CRC_WriteAll( (a) ) \
)
#define R_CRC_Read(a, b) \
( \
R_CRC_ReadAll( (a), (b) ) \
)
#endif
/* End of file */
+52
View File
@@ -0,0 +1,52 @@
/*""FILE COMMENT""*******************************************************
* System Name : DAC API for RX62Nxx
* File Name : r_pdl_dac_10.h
* Version : 1.02
* Contents : CRC function prototypes
* 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_DAC_H
#define R_PDL_DAC_H
#include "r_pdl_common_defs_RX62Nxx.h"
/* Function prototypes */
bool R_DAC_10_Create(
uint8_t,
uint16_t,
uint16_t
);
bool R_DAC_10_Destroy(
uint8_t
);
bool R_DAC_10_Write(
uint8_t,
uint16_t,
uint16_t
);
/* Channel selection */
#define PDL_DAC_10_CHANNEL_0 0x01u
#define PDL_DAC_10_CHANNEL_1 0x02u
/* Data alignment */
#define PDL_DAC_10_ALIGN_LEFT 0x04u
#define PDL_DAC_10_ALIGN_RIGHT 0x08u
#endif
/* End of file */
+59
View File
@@ -0,0 +1,59 @@
/*""FILE COMMENT""*******************************************************
* System Name : DAC API for RX62Nxx
* File Name : r_pdl_dac_10_RX62Nxx.h
* Version : 1.02
* Contents : DAC 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_DAC_RX62Nxx_H
#define R_PDL_DAC_RX62Nxx_H
/* Library prototypes */
bool R_DAC_10_CreateAll(
const uint8_t,
const uint16_t,
const uint16_t
);
bool R_DAC_10_DestroyAll(
const uint8_t
);
bool R_DAC_10_WriteAll(
const uint8_t,
const uint16_t,
const uint16_t
);
/* Macro definitions */
#define R_DAC_10_Create(a, b, c) \
( \
R_DAC_10_CreateAll( (a), (b), (c) ) \
)
#define R_DAC_10_Destroy(a) \
( \
R_DAC_10_DestroyAll( (a) ) \
)
#define R_DAC_10_Write(a, b, c) \
( \
R_DAC_10_WriteAll( (a), (b), (c) ) \
)
#endif
/* End of file */
+59
View File
@@ -0,0 +1,59 @@
/*""FILE COMMENT""*******************************************************
* System Name : PDL driver API
* File Name : r_pdl_definitions.h
* Version : 1.02
* Contents : API headers for RX62N (100-pin package)
* 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_DEFS_H
#define R_PDL_DEFS_H
#define PDL_VERSION 0x0102u /* v01.02 in BCD format */
#define DEVICE_PACKAGE_LQFP_100
/* Peripiherals that are common to all device packages */
#include "r_pdl_adc_10_RX62Nxx.h"
#include "r_pdl_adc_12_RX62Nxx.h"
#include "r_pdl_bsc_RX62Nxx.h"
#include "r_pdl_cgc_RX62Nxx.h"
#include "r_pdl_cmt_RX62Nxx.h"
#include "r_pdl_crc_RX62Nxx.h"
#include "r_pdl_dac_10_RX62Nxx.h"
#include "r_pdl_dmac_RX62Nxx.h"
#include "r_pdl_dtc_RX62Nxx.h"
#include "r_pdl_intc_RX62Nxx.h"
#include "r_pdl_iwdt_RX62Nxx.h"
#include "r_pdl_lpc_RX62Nxx.h"
#include "r_pdl_lvd_RX62Nxx.h"
#include "r_pdl_mcu_RX62Nxx.h"
#include "r_pdl_mtu2_RX62Nxx.h"
#include "r_pdl_pfc_RX62Nxx.h"
#include "r_pdl_poe_RX62Nxx.h"
#include "r_pdl_ppg_RX62Nxx.h"
#include "r_pdl_rtc_RX62Nxx.h"
#include "r_pdl_sci_RX62Nxx.h"
#include "r_pdl_spi_RX62Nxx.h"
#include "r_pdl_tmr_RX62Nxx.h"
#include "r_pdl_wdt_RX62Nxx.h"
/* Peripiherals that are device package-dependent */
#include "r_pdl_iic_RX62NxFP.h"
#include "r_pdl_io_port_RX62NxFP.h"
#endif
/* End of file */
+174
View File
@@ -0,0 +1,174 @@
/*""FILE COMMENT""*******************************************************
* System Name : DMAC API for RX62Nxx
* File Name : r_pdl_dmac.h
* Version : 1.02
* Contents : DMAC 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_DMAC_H
#define R_PDL_DMAC_H
#include "r_pdl_common_defs_RX62Nxx.h"
/* Function prototypes */
bool R_DMAC_Create(
uint8_t,
uint32_t,
uint8_t,
void *,
void *,
uint16_t,
uint16_t,
int32_t,
uint32_t,
uint32_t,
void *,
uint8_t
);
bool R_DMAC_Destroy(
uint8_t
);
bool R_DMAC_Control(
uint8_t,
uint16_t,
void *,
void *,
uint16_t,
uint16_t,
int32_t,
uint32_t,
uint32_t
);
bool R_DMAC_GetStatus(
uint8_t,
uint8_t *,
uint32_t *,
uint32_t *,
uint16_t *,
uint16_t *
);
/* Transfer mode selection */
#define PDL_DMAC_NORMAL 0x00000001ul
#define PDL_DMAC_REPEAT 0x00000002ul
#define PDL_DMAC_BLOCK 0x00000004ul
#define PDL_DMAC_SOURCE 0x00000008ul
#define PDL_DMAC_DESTINATION 0x00000010ul
/* Address addition direction selection */
#define PDL_DMAC_SOURCE_ADDRESS_FIXED 0x00000020ul
#define PDL_DMAC_SOURCE_ADDRESS_PLUS 0x00000040ul
#define PDL_DMAC_SOURCE_ADDRESS_MINUS 0x00000080ul
#define PDL_DMAC_SOURCE_ADDRESS_OFFSET 0x00000100ul
#define PDL_DMAC_DESTINATION_ADDRESS_FIXED 0x00000200ul
#define PDL_DMAC_DESTINATION_ADDRESS_PLUS 0x00000400ul
#define PDL_DMAC_DESTINATION_ADDRESS_MINUS 0x00000800ul
#define PDL_DMAC_DESTINATION_ADDRESS_OFFSET 0x00001000ul
/* Transfer data size */
#define PDL_DMAC_SIZE_8 0x00002000ul
#define PDL_DMAC_SIZE_16 0x00004000ul
#define PDL_DMAC_SIZE_32 0x00008000ul
/* Interrupt generation */
#define PDL_DMAC_IRQ_END 0x00010000ul
#define PDL_DMAC_IRQ_ESCAPE_END 0x00020000ul
#define PDL_DMAC_IRQ_REPEAT_SIZE_END 0x00040000ul
#define PDL_DMAC_IRQ_EXT_SOURCE 0x00080000ul
#define PDL_DMAC_IRQ_EXT_DESTINATION 0x00100000ul
/* Start trigger forwarding */
#define PDL_DMAC_TRIGGER_CLEAR 0x00200000ul
#define PDL_DMAC_TRIGGER_FORWARD 0x00400000ul
/* DTC trigger control */
#define PDL_DMAC_DTC_TRIGGER_DISABLE 0x00800000ul
#define PDL_DMAC_DTC_TRIGGER_ENABLE 0x01000000ul
/* DMAC activation source */
#define PDL_DMAC_TRIGGER_SW 0x00u
#define PDL_DMAC_TRIGGER_CMT0 VECT_CMT0_CMI0
#define PDL_DMAC_TRIGGER_CMT1 VECT_CMT1_CMI1
#define PDL_DMAC_TRIGGER_CMT2 VECT_CMT2_CMI2
#define PDL_DMAC_TRIGGER_CMT3 VECT_CMT3_CMI3
#define PDL_DMAC_TRIGGER_USB0_D0 VECT_USB0_D0FIFO0
#define PDL_DMAC_TRIGGER_USB0_D1 VECT_USB0_D1FIFO0
#define PDL_DMAC_TRIGGER_USB1_D0 VECT_USB1_D0FIFO1
#define PDL_DMAC_TRIGGER_USB1_D1 VECT_USB1_D1FIFO1
#define PDL_DMAC_TRIGGER_SPI0_RX VECT_RSPI0_SPRI0
#define PDL_DMAC_TRIGGER_SPI0_TX VECT_RSPI0_SPTI0
#define PDL_DMAC_TRIGGER_SPI1_RX VECT_RSPI1_SPRI1
#define PDL_DMAC_TRIGGER_SPI1_TX VECT_RSPI1_SPTI1
#define PDL_DMAC_TRIGGER_IRQ0 VECT_ICU_IRQ0
#define PDL_DMAC_TRIGGER_IRQ1 VECT_ICU_IRQ1
#define PDL_DMAC_TRIGGER_IRQ2 VECT_ICU_IRQ2
#define PDL_DMAC_TRIGGER_IRQ3 VECT_ICU_IRQ3
#define PDL_DMAC_TRIGGER_ADC10_0 VECT_AD0_ADI0
#define PDL_DMAC_TRIGGER_ADC10_1 VECT_AD1_ADI1
#define PDL_DMAC_TRIGGER_ADC12 VECT_S12AD_ADI
#define PDL_DMAC_TRIGGER_MTU0 VECT_MTU0_TGIA0
#define PDL_DMAC_TRIGGER_MTU1 VECT_MTU1_TGIA1
#define PDL_DMAC_TRIGGER_MTU2 VECT_MTU2_TGIA2
#define PDL_DMAC_TRIGGER_MTU3 VECT_MTU3_TGIA3
#define PDL_DMAC_TRIGGER_MTU4 VECT_MTU4_TGIA4
#define PDL_DMAC_TRIGGER_MTU6 VECT_MTU6_TGIA6
#define PDL_DMAC_TRIGGER_MTU7 VECT_MTU7_TGIA7
#define PDL_DMAC_TRIGGER_MTU8 VECT_MTU8_TGIA8
#define PDL_DMAC_TRIGGER_MTU9 VECT_MTU9_TGIA9
#define PDL_DMAC_TRIGGER_MTU10 VECT_MTU10_TGIA10
#define PDL_DMAC_TRIGGER_SCI0_RX VECT_SCI0_RXI0
#define PDL_DMAC_TRIGGER_SCI0_TX VECT_SCI0_TXI0
#define PDL_DMAC_TRIGGER_SCI1_RX VECT_SCI1_RXI1
#define PDL_DMAC_TRIGGER_SCI1_TX VECT_SCI1_TXI1
#define PDL_DMAC_TRIGGER_SCI2_RX VECT_SCI2_RXI2
#define PDL_DMAC_TRIGGER_SCI2_TX VECT_SCI2_TXI2
#define PDL_DMAC_TRIGGER_SCI3_RX VECT_SCI3_RXI3
#define PDL_DMAC_TRIGGER_SCI3_TX VECT_SCI3_TXI3
#define PDL_DMAC_TRIGGER_SCI5_RX VECT_SCI5_RXI5
#define PDL_DMAC_TRIGGER_SCI5_TX VECT_SCI5_TXI5
#define PDL_DMAC_TRIGGER_SCI6_RX VECT_SCI6_RXI6
#define PDL_DMAC_TRIGGER_SCI6_TX VECT_SCI6_TXI6
#define PDL_DMAC_TRIGGER_IIC0_RX VECT_RIIC0_ICRXI0
#define PDL_DMAC_TRIGGER_IIC0_TX VECT_RIIC0_ICTXI0
#define PDL_DMAC_TRIGGER_IIC1_RX VECT_RIIC1_ICRXI1
#define PDL_DMAC_TRIGGER_IIC1_TX VECT_RIIC1_ICTXI1
/* Enable / suspend control */
#define PDL_DMAC_ENABLE 0x0001u
#define PDL_DMAC_SUSPEND 0x0002u
/* Software trigger control */
#define PDL_DMAC_START 0x0004u
#define PDL_DMAC_START_RUN 0x0008u
#define PDL_DMAC_STOP 0x0010u
/* Transfer end interrupt flag control */
#define PDL_DMAC_CLEAR_DTIF 0x0020u
#define PDL_DMAC_CLEAR_ESIF 0x0040u
/* Modify registers selection */
#define PDL_DMAC_UPDATE_SOURCE 0x0080u
#define PDL_DMAC_UPDATE_DESTINATION 0x0100u
#define PDL_DMAC_UPDATE_COUNT 0x0200u
#define PDL_DMAC_UPDATE_SIZE 0x0400u
#define PDL_DMAC_UPDATE_OFFSET 0x0800u
#define PDL_DMAC_UPDATE_REPEAT_SOURCE 0x1000u
#define PDL_DMAC_UPDATE_REPEAT_DESTINATION 0x2000u
#endif
/* End of file */
+101
View File
@@ -0,0 +1,101 @@
/*""FILE COMMENT""*******************************************************
* System Name : DMAC API for RX62Nxx
* File Name : r_pdl_dmac_RX62Nxx.h
* Version : 1.02
* Contents : DMAC 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_DMAC_RX62Nxx_H
#define R_PDL_DMAC_RX62Nxx_H
#define DMAC_CHANNELS 4
/* Callback function storage */
extern VoidCallBackFunc rpdl_DMAC_callback_func[];
/* Library prototypes */
bool R_DMAC_CreateAll(
const uint8_t,
const uint32_t,
const uint8_t,
volatile const void * const,
volatile const void * const,
const uint16_t,
const uint16_t,
const int32_t,
const uint32_t,
const uint32_t,
VoidCallBackFunc const,
const uint8_t
);
bool R_DMAC_DestroyAll(
const uint8_t
);
bool R_DMAC_ControlAll(
const uint8_t,
const uint16_t,
volatile const void * const,
volatile const void * const,
const uint16_t,
const uint16_t,
const int32_t,
const uint32_t,
const uint32_t
);
bool R_DMAC_GetStatusAll(
const uint8_t,
volatile uint8_t * const,
volatile uint32_t * const,
volatile uint32_t * const,
volatile uint16_t * const,
volatile uint16_t * const
);
bool ReturnFalse(void);
/* Macro definitions */
#define R_DMAC_Create(a, b, c, d, e, f, g, h, i, j, k, l) \
( \
( ( ((a) < DMAC_CHANNELS ) && ((l) <= IPL_MAX) ) ) ? \
R_DMAC_CreateAll( (a), (b), (c), (d), (e), (f), (g), (h), (i), (j), (k), (l) ) : \
ReturnFalse() \
)
#define R_DMAC_Control(a, b, c, d, e, f, g, h, i) \
( \
( ((a) < DMAC_CHANNELS) ) ? \
R_DMAC_ControlAll( (a), (b), (c), (d), (e), (f), (g), (h), (i) ) : \
ReturnFalse() \
)
#define R_DMAC_GetStatus(a, b, c, d, e, f) \
( \
( ((a) < DMAC_CHANNELS) ) ? \
R_DMAC_GetStatusAll( (a), (b), (c), (d), (e), (f) ) : \
ReturnFalse() \
)
#define R_DMAC_Destroy(a) \
( \
( ((a) < DMAC_CHANNELS) ) ? \
R_DMAC_DestroyAll( (a) ) : \
ReturnFalse() \
)
#endif
/* End of file */
+214
View File
@@ -0,0 +1,214 @@
/*""FILE COMMENT""*******************************************************
* System Name : DTC API for RX62N
* File Name : r_pdl_dtc.h
* Version : 1.02
* Contents : DTC 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_DTC_H
#define R_PDL_DTC_H
#include "r_pdl_common_defs_RX62Nxx.h"
/* Function prototypes */
bool R_DTC_Set(
uint8_t,
uint32_t *
);
bool R_DTC_Create(
uint32_t,
uint32_t *,
void *,
void *,
uint16_t,
uint8_t
);
bool R_DTC_Destroy(
void
);
bool R_DTC_Control(
uint32_t,
uint32_t *,
void *,
void *,
uint16_t,
uint8_t
);
bool R_DTC_GetStatus(
uint32_t *,
uint16_t *,
uint32_t *,
uint32_t *,
uint16_t *,
uint8_t *
);
/* Read skip control */
#define PDL_DTC_READ_SKIP_DISABLE 0x01u
#define PDL_DTC_READ_SKIP_ENABLE 0x02u
/* Address size control */
#define PDL_DTC_ADDRESS_FULL 0x04u
#define PDL_DTC_ADDRESS_SHORT 0x08u
/* Transfer mode selection */
#define PDL_DTC_NORMAL 0x00000001ul
#define PDL_DTC_REPEAT 0x00000002ul
#define PDL_DTC_BLOCK 0x00000004ul
#define PDL_DTC_SOURCE 0x00000008ul
#define PDL_DTC_DESTINATION 0x00000010ul
/* Address direction selection */
#define PDL_DTC_SOURCE_ADDRESS_FIXED 0x00000020ul
#define PDL_DTC_SOURCE_ADDRESS_PLUS 0x00000040ul
#define PDL_DTC_SOURCE_ADDRESS_MINUS 0x00000080ul
#define PDL_DTC_DESTINATION_ADDRESS_FIXED 0x00000100ul
#define PDL_DTC_DESTINATION_ADDRESS_PLUS 0x00000200ul
#define PDL_DTC_DESTINATION_ADDRESS_MINUS 0x00000400ul
/* Transfer data size */
#define PDL_DTC_SIZE_8 0x00000800ul
#define PDL_DTC_SIZE_16 0x00001000ul
#define PDL_DTC_SIZE_32 0x00002000ul
/* Chain transfer control */
#define PDL_DTC_CHAIN_DISABLE 0x00004000ul
#define PDL_DTC_CHAIN_CONTINUOUS 0x00008000ul
#define PDL_DTC_CHAIN_0 0x00010000ul
/* Interrupt generation */
#define PDL_DTC_IRQ_COMPLETE 0x00020000ul
#define PDL_DTC_IRQ_TRANSFER 0x00040000ul
/* Trigger selection */
#define PDL_DTC_TRIGGER_CHAIN (uint32_t)(0x00u << 24)
#define PDL_DTC_TRIGGER_SW (uint32_t)(VECT_ICU_SWINT << 24)
#define PDL_DTC_TRIGGER_CMT0 (uint32_t)(VECT_CMT0_CMI0 << 24)
#define PDL_DTC_TRIGGER_CMT1 (uint32_t)(VECT_CMT1_CMI1 << 24)
#define PDL_DTC_TRIGGER_CMT2 (uint32_t)(VECT_CMT2_CMI2 << 24)
#define PDL_DTC_TRIGGER_CMT3 (uint32_t)(VECT_CMT3_CMI3 << 24)
#define PDL_DTC_TRIGGER_USB0_D0 (uint32_t)(VECT_USB0_D0FIFO0 << 24)
#define PDL_DTC_TRIGGER_USB1_D0 (uint32_t)(VECT_USB1_D0FIFO1 << 24)
#define PDL_DTC_TRIGGER_USB0_D1 (uint32_t)(VECT_USB0_D1FIFO0 << 24)
#define PDL_DTC_TRIGGER_USB1_D1 (uint32_t)(VECT_USB1_D1FIFO1 << 24)
#define PDL_DTC_TRIGGER_SPI0_RX (uint32_t)(VECT_RSPI0_SPRI0 << 24)
#define PDL_DTC_TRIGGER_SPI1_RX (uint32_t)(VECT_RSPI1_SPRI1 << 24)
#define PDL_DTC_TRIGGER_SPI0_TX (uint32_t)(VECT_RSPI0_SPTI0 << 24)
#define PDL_DTC_TRIGGER_SPI1_TX (uint32_t)(VECT_RSPI1_SPTI1 << 24)
#define PDL_DTC_TRIGGER_IRQ0 (uint32_t)(VECT_ICU_IRQ0 << 24)
#define PDL_DTC_TRIGGER_IRQ1 (uint32_t)(VECT_ICU_IRQ1 << 24)
#define PDL_DTC_TRIGGER_IRQ2 (uint32_t)(VECT_ICU_IRQ2 << 24)
#define PDL_DTC_TRIGGER_IRQ3 (uint32_t)(VECT_ICU_IRQ3 << 24)
#define PDL_DTC_TRIGGER_IRQ4 (uint32_t)(VECT_ICU_IRQ4 << 24)
#define PDL_DTC_TRIGGER_IRQ5 (uint32_t)(VECT_ICU_IRQ5 << 24)
#define PDL_DTC_TRIGGER_IRQ6 (uint32_t)(VECT_ICU_IRQ6 << 24)
#define PDL_DTC_TRIGGER_IRQ7 (uint32_t)(VECT_ICU_IRQ7 << 24)
#define PDL_DTC_TRIGGER_IRQ8 (uint32_t)(VECT_ICU_IRQ8 << 24)
#define PDL_DTC_TRIGGER_IRQ9 (uint32_t)(VECT_ICU_IRQ9 << 24)
#define PDL_DTC_TRIGGER_IRQ10 (uint32_t)(VECT_ICU_IRQ10 << 24)
#define PDL_DTC_TRIGGER_IRQ11 (uint32_t)(VECT_ICU_IRQ11 << 24)
#define PDL_DTC_TRIGGER_IRQ12 (uint32_t)(VECT_ICU_IRQ12 << 24)
#define PDL_DTC_TRIGGER_IRQ13 (uint32_t)(VECT_ICU_IRQ13 << 24)
#define PDL_DTC_TRIGGER_IRQ14 (uint32_t)(VECT_ICU_IRQ14 << 24)
#define PDL_DTC_TRIGGER_IRQ15 (uint32_t)(VECT_ICU_IRQ15 << 24)
#define PDL_DTC_TRIGGER_ADI0 (uint32_t)(VECT_AD0_ADI0 << 24)
#define PDL_DTC_TRIGGER_ADI1 (uint32_t)(VECT_AD1_ADI1 << 24)
#define PDL_DTC_TRIGGER_ADC12 (uint32_t)(VECT_S12AD_ADI << 24)
#define PDL_DTC_TRIGGER_TGIA0 (uint32_t)(VECT_MTU0_TGIA0 << 24)
#define PDL_DTC_TRIGGER_TGIA1 (uint32_t)(VECT_MTU1_TGIA1 << 24)
#define PDL_DTC_TRIGGER_TGIA2 (uint32_t)(VECT_MTU2_TGIA2 << 24)
#define PDL_DTC_TRIGGER_TGIA3 (uint32_t)(VECT_MTU3_TGIA3 << 24)
#define PDL_DTC_TRIGGER_TGIA4 (uint32_t)(VECT_MTU4_TGIA4 << 24)
#define PDL_DTC_TRIGGER_TGIA6 (uint32_t)(VECT_MTU6_TGIA6 << 24)
#define PDL_DTC_TRIGGER_TGIA7 (uint32_t)(VECT_MTU7_TGIA7 << 24)
#define PDL_DTC_TRIGGER_TGIA8 (uint32_t)(VECT_MTU8_TGIA8 << 24)
#define PDL_DTC_TRIGGER_TGIA9 (uint32_t)(VECT_MTU9_TGIA9 << 24)
#define PDL_DTC_TRIGGER_TGIA10 (uint32_t)(VECT_MTU10_TGIA10 << 24)
#define PDL_DTC_TRIGGER_TGIB0 (uint32_t)(VECT_MTU0_TGIB0 << 24)
#define PDL_DTC_TRIGGER_TGIB1 (uint32_t)(VECT_MTU1_TGIB1 << 24)
#define PDL_DTC_TRIGGER_TGIB2 (uint32_t)(VECT_MTU2_TGIB2 << 24)
#define PDL_DTC_TRIGGER_TGIB3 (uint32_t)(VECT_MTU3_TGIB3 << 24)
#define PDL_DTC_TRIGGER_TGIB4 (uint32_t)(VECT_MTU4_TGIB4 << 24)
#define PDL_DTC_TRIGGER_TGIB6 (uint32_t)(VECT_MTU6_TGIB6 << 24)
#define PDL_DTC_TRIGGER_TGIB7 (uint32_t)(VECT_MTU7_TGIB7 << 24)
#define PDL_DTC_TRIGGER_TGIB8 (uint32_t)(VECT_MTU8_TGIB8 << 24)
#define PDL_DTC_TRIGGER_TGIB9 (uint32_t)(VECT_MTU9_TGIB9 << 24)
#define PDL_DTC_TRIGGER_TGIB10 (uint32_t)(VECT_MTU10_TGIB10 << 24)
#define PDL_DTC_TRIGGER_TGIC0 (uint32_t)(VECT_MTU0_TGIC0 << 24)
#define PDL_DTC_TRIGGER_TGIC3 (uint32_t)(VECT_MTU3_TGIC3 << 24)
#define PDL_DTC_TRIGGER_TGIC4 (uint32_t)(VECT_MTU4_TGIC4 << 24)
#define PDL_DTC_TRIGGER_TGIC6 (uint32_t)(VECT_MTU6_TGIC6 << 24)
#define PDL_DTC_TRIGGER_TGIC9 (uint32_t)(VECT_MTU9_TGIC9 << 24)
#define PDL_DTC_TRIGGER_TGIC10 (uint32_t)(VECT_MTU10_TGIC10 << 24)
#define PDL_DTC_TRIGGER_TGID0 (uint32_t)(VECT_MTU0_TGID0 << 24)
#define PDL_DTC_TRIGGER_TGID3 (uint32_t)(VECT_MTU3_TGID3 << 24)
#define PDL_DTC_TRIGGER_TGID4 (uint32_t)(VECT_MTU4_TGID4 << 24)
#define PDL_DTC_TRIGGER_TGID6 (uint32_t)(VECT_MTU6_TGID6 << 24)
#define PDL_DTC_TRIGGER_TGID9 (uint32_t)(VECT_MTU9_TGID9 << 24)
#define PDL_DTC_TRIGGER_TGID10 (uint32_t)(VECT_MTU10_TGID10 << 24)
#define PDL_DTC_TRIGGER_TGIU5 (uint32_t)(VECT_MTU5_TGIU5 << 24)
#define PDL_DTC_TRIGGER_TGIU11 (uint32_t)(VECT_MTU11_TGIU11 << 24)
#define PDL_DTC_TRIGGER_TGIV5 (uint32_t)(VECT_MTU5_TGIV5 << 24)
#define PDL_DTC_TRIGGER_TGIV11 (uint32_t)(VECT_MTU11_TGIV11 << 24)
#define PDL_DTC_TRIGGER_TGIW5 (uint32_t)(VECT_MTU5_TGIW5 << 24)
#define PDL_DTC_TRIGGER_TGIW11 (uint32_t)(VECT_MTU11_TGIW11 << 24)
#define PDL_DTC_TRIGGER_TCIV4 (uint32_t)(VECT_MTU4_TCIV4 << 24)
#define PDL_DTC_TRIGGER_TCIV10 (uint32_t)(VECT_MTU10_TCIV10 << 24)
#define PDL_DTC_TRIGGER_CMIA0 (uint32_t)(VECT_TMR0_CMIA0 << 24)
#define PDL_DTC_TRIGGER_CMIA1 (uint32_t)(VECT_TMR1_CMIA1 << 24)
#define PDL_DTC_TRIGGER_CMIA2 (uint32_t)(VECT_TMR2_CMIA2 << 24)
#define PDL_DTC_TRIGGER_CMIA3 (uint32_t)(VECT_TMR3_CMIA3 << 24)
#define PDL_DTC_TRIGGER_CMIB0 (uint32_t)(VECT_TMR0_CMIB0 << 24)
#define PDL_DTC_TRIGGER_CMIB1 (uint32_t)(VECT_TMR1_CMIB1 << 24)
#define PDL_DTC_TRIGGER_CMIB2 (uint32_t)(VECT_TMR2_CMIB2 << 24)
#define PDL_DTC_TRIGGER_CMIB3 (uint32_t)(VECT_TMR3_CMIB3 << 24)
#define PDL_DTC_TRIGGER_DMACI0 (uint32_t)(VECT_DMAC_DMAC0I << 24)
#define PDL_DTC_TRIGGER_DMACI1 (uint32_t)(VECT_DMAC_DMAC1I << 24)
#define PDL_DTC_TRIGGER_DMACI2 (uint32_t)(VECT_DMAC_DMAC2I << 24)
#define PDL_DTC_TRIGGER_DMACI3 (uint32_t)(VECT_DMAC_DMAC3I << 24)
#define PDL_DTC_TRIGGER_EXDMACI0 (uint32_t)(VECT_EXDMAC_EXDMAC0I << 24)
#define PDL_DTC_TRIGGER_EXDMACI1 (uint32_t)(VECT_EXDMAC_EXDMAC1I << 24)
#define PDL_DTC_TRIGGER_RXI0 (uint32_t)(VECT_SCI0_RXI0 << 24)
#define PDL_DTC_TRIGGER_RXI1 (uint32_t)(VECT_SCI1_RXI1 << 24)
#define PDL_DTC_TRIGGER_RXI2 (uint32_t)(VECT_SCI2_RXI2 << 24)
#define PDL_DTC_TRIGGER_RXI3 (uint32_t)(VECT_SCI3_RXI3 << 24)
#define PDL_DTC_TRIGGER_RXI5 (uint32_t)(VECT_SCI5_RXI5 << 24)
#define PDL_DTC_TRIGGER_RXI6 (uint32_t)(VECT_SCI6_RXI6 << 24)
#define PDL_DTC_TRIGGER_TXI0 (uint32_t)(VECT_SCI0_TXI0 << 24)
#define PDL_DTC_TRIGGER_TXI1 (uint32_t)(VECT_SCI1_TXI1 << 24)
#define PDL_DTC_TRIGGER_TXI2 (uint32_t)(VECT_SCI2_TXI2 << 24)
#define PDL_DTC_TRIGGER_TXI3 (uint32_t)(VECT_SCI3_TXI3 << 24)
#define PDL_DTC_TRIGGER_TXI5 (uint32_t)(VECT_SCI5_TXI5 << 24)
#define PDL_DTC_TRIGGER_TXI6 (uint32_t)(VECT_SCI6_TXI6 << 24)
#define PDL_DTC_TRIGGER_ICRXI0 (uint32_t)(VECT_RIIC0_ICRXI0 << 24)
#define PDL_DTC_TRIGGER_ICRXI1 (uint32_t)(VECT_RIIC1_ICRXI1 << 24)
#define PDL_DTC_TRIGGER_ICTXI0 (uint32_t)(VECT_RIIC0_ICTXI0 << 24)
#define PDL_DTC_TRIGGER_ICTXI1 (uint32_t)(VECT_RIIC1_ICTXI1 << 24)
/* Stop / Start control */
#define PDL_DTC_STOP 0x01u
#define PDL_DTC_START 0x02u
/* Register modification control */
#define PDL_DTC_UPDATE_SOURCE 0x04ul
#define PDL_DTC_UPDATE_DESTINATION 0x08ul
#define PDL_DTC_UPDATE_COUNT 0x10ul
#define PDL_DTC_UPDATE_BLOCK_SIZE 0x20ul
#endif
/* End of file */
+90
View File
@@ -0,0 +1,90 @@
/*""FILE COMMENT""*******************************************************
* System Name : DTC API for RX62N
* File Name : r_pdl_dtc_RX62Nxx.h
* Version : 1.02
* Contents : DTC 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_DTC_RX62Nxx_H
#define R_PDL_DTC_RX62Nxx_H
/* Library prototypes */
bool R_DTC_SetAll(
const uint8_t,
uint32_t * const
);
bool R_DTC_CreateAll(
const uint32_t,
const uint8_t,
uint32_t * const,
volatile const void * const,
volatile const void * const,
const uint16_t,
const uint8_t
);
bool R_DTC_DestroyAll(
void
);
bool R_DTC_ControlAll(
const uint32_t,
const uint8_t,
uint32_t * const,
volatile const void * const,
volatile const void * const,
const uint16_t,
const uint8_t
);
bool R_DTC_GetStatusAll(
const uint32_t * const,
volatile uint16_t * const,
volatile uint32_t * const,
volatile uint32_t * const,
volatile uint16_t * const,
volatile uint8_t * const
);
bool ReturnFalse(void);
/* Macro definitions */
#define R_DTC_Set(a, b) \
( \
R_DTC_SetAll( (a), (b) ) \
)
#define R_DTC_Create(a, b, c, d, e, f) \
( \
R_DTC_CreateAll( (a), (uint8_t)((a) >> 24), (b), (c), (d), (e), (f) ) \
)
#define R_DTC_Destroy() \
( \
R_DTC_DestroyAll() \
)
#define R_DTC_Control(a, b, c, d, e, f) \
( \
R_DTC_ControlAll( (a), (uint8_t)((a) >> 24), (b), (c), (d), (e), (f) ) \
)
#define R_DTC_GetStatus(a, b, c, d, e, f) \
( \
R_DTC_GetStatusAll( (a), (b), (c), (d), (e), (f) ) \
)
#endif
/* End of file */
+148
View File
@@ -0,0 +1,148 @@
/*""FILE COMMENT""*******************************************************
* System Name : EXDMAC API for RX62Nxx
* File Name : r_pdl_exdmac.h
* Version : 1.02
* Contents : EXDMAC 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_EXDMAC_H
#define R_PDL_EXDMAC_H
#include "r_pdl_common_defs_RX62Nxx.h"
/* Function prototypes */
bool R_EXDMAC_Create(
uint8_t,
uint32_t,
uint16_t,
uint8_t,
void *,
void *,
uint16_t,
uint16_t,
int32_t,
uint32_t,
uint32_t,
void *,
uint8_t
);
bool R_EXDMAC_Destroy(
uint8_t
);
bool R_EXDMAC_Control(
uint8_t,
uint16_t,
void *,
void *,
uint16_t,
uint16_t,
int32_t,
uint32_t,
uint32_t
);
bool R_EXDMAC_GetStatus(
uint8_t,
uint8_t *,
uint32_t *,
uint32_t *,
uint16_t *,
uint16_t *
);
/* Transfer mode selection */
#define PDL_EXDMAC_NORMAL 0x00000001ul
#define PDL_EXDMAC_REPEAT 0x00000002ul
#define PDL_EXDMAC_BLOCK 0x00000004ul
#define PDL_EXDMAC_CLUSTER 0x00000008ul
#define PDL_EXDMAC_SOURCE 0x00000010ul
#define PDL_EXDMAC_DESTINATION 0x00000020ul
/* Address addition direction selection */
#define PDL_EXDMAC_SOURCE_ADDRESS_FIXED 0x00000040ul
#define PDL_EXDMAC_SOURCE_ADDRESS_PLUS 0x00000080ul
#define PDL_EXDMAC_SOURCE_ADDRESS_MINUS 0x00000100ul
#define PDL_EXDMAC_SOURCE_ADDRESS_OFFSET 0x00000200ul
#define PDL_EXDMAC_DESTINATION_ADDRESS_FIXED 0x00000400ul
#define PDL_EXDMAC_DESTINATION_ADDRESS_PLUS 0x00000800ul
#define PDL_EXDMAC_DESTINATION_ADDRESS_MINUS 0x00001000ul
#define PDL_EXDMAC_DESTINATION_ADDRESS_OFFSET 0x00002000ul
/* Address mode selection */
#define PDL_EXDMAC_ADDRESS_MODE_READ 0x00004000ul
#define PDL_EXDMAC_ADDRESS_MODE_WRITE 0x00008000ul
#define PDL_EXDMAC_ADDRESS_MODE_DUAL 0x00010000ul
/* Transfer data size */
#define PDL_EXDMAC_SIZE_8 0x00020000ul
#define PDL_EXDMAC_SIZE_16 0x00040000ul
#define PDL_EXDMAC_SIZE_32 0x00080000ul
/* Pin selection */
#define PDL_EXDMAC_PIN_A 0x0001u
#define PDL_EXDMAC_PIN_B 0x0002u
#define PDL_EXDMAC_PIN_C 0x0004u
/* EDACKn pin output control */
#define PDL_EXDMAC_EDACK_DISABLE 0x0008u
#define PDL_EXDMAC_EDACK_LOW 0x0010u
#define PDL_EXDMAC_EDACK_HIGH 0x0020u
#define PDL_EXDMAC_EDACK_SYNC 0x0040u
#define PDL_EXDMAC_EDACK_WAIT 0x0080u
/* Trigger selection */
#define PDL_EXDMAC_TRIGGER_SW 0x0100u
#define PDL_EXDMAC_TRIGGER_RISING 0x0200u
#define PDL_EXDMAC_TRIGGER_FALLING 0x0400u
#define PDL_EXDMAC_TRIGGER_LOW 0x0800u
#define PDL_EXDMAC_TRIGGER_MTU1 0x1000u
/* Interrupt generation */
#define PDL_EXDMAC_IRQ_END 0x01u
#define PDL_EXDMAC_IRQ_ESCAPE_END 0x02u
#define PDL_EXDMAC_IRQ_REPEAT_SIZE_END 0x04u
#define PDL_EXDMAC_IRQ_EXT_SOURCE 0x08u
#define PDL_EXDMAC_IRQ_EXT_DESTINATION 0x10u
/* DTC trigger control */
#define PDL_EXDMAC_DTC_TRIGGER_DISABLE 0x20u
#define PDL_EXDMAC_DTC_TRIGGER_ENABLE 0x40u
/* Enable / suspend control */
#define PDL_EXDMAC_ENABLE 0x0001u
#define PDL_EXDMAC_SUSPEND 0x0002u
/* Software trigger control */
#define PDL_EXDMAC_START 0x0004u
#define PDL_EXDMAC_START_RUN 0x0008u
#define PDL_EXDMAC_STOP 0x0010u
/* Transfer end interrupt flag control */
#define PDL_EXDMAC_CLEAR_DTIF 0x0020u
#define PDL_EXDMAC_CLEAR_ESIF 0x0040u
/* Modify registers selection */
#define PDL_EXDMAC_UPDATE_SOURCE 0x0080u
#define PDL_EXDMAC_UPDATE_DESTINATION 0x0100u
#define PDL_EXDMAC_UPDATE_COUNT 0x0200u
#define PDL_EXDMAC_UPDATE_SIZE 0x0400u
#define PDL_EXDMAC_UPDATE_OFFSET 0x0800u
#define PDL_EXDMAC_UPDATE_REPEAT_SOURCE 0x1000u
#define PDL_EXDMAC_UPDATE_REPEAT_DESTINATION 0x2000u
#endif
/* End of file */
+102
View File
@@ -0,0 +1,102 @@
/*""FILE COMMENT""*******************************************************
* System Name : EXDMAC API for RX62Nxx
* File Name : r_pdl_exdmac_RX62Nxx.h
* Version : 1.02
* Contents : EXDMAC 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_EXDMAC_RX62Nxx_H
#define R_PDL_EXDMAC_RX62Nxx_H
#define EXDMAC_CHANNELS 2
/* Callback function storage */
extern VoidCallBackFunc rpdl_EXDMAC_callback_func[];
/* Library prototypes */
bool R_EXDMAC_CreateAll(
const uint8_t,
const uint32_t,
const uint16_t,
const uint8_t,
volatile const void * const,
volatile const void * const,
const uint16_t,
const uint16_t,
const int32_t,
const uint32_t,
const uint32_t,
VoidCallBackFunc const,
const uint8_t
);
bool R_EXDMAC_DestroyAll(
const uint8_t
);
bool R_EXDMAC_ControlAll(
const uint8_t,
const uint16_t,
volatile const void * const,
volatile const void * const,
const uint16_t,
const uint16_t,
const int32_t,
const uint32_t,
const uint32_t
);
bool R_EXDMAC_GetStatusAll(
const uint8_t,
volatile uint8_t * const,
volatile uint32_t * const,
volatile uint32_t * const,
volatile uint16_t * const,
volatile uint16_t * const
);
bool ReturnFalse(void);
/* Macro definitions */
#define R_EXDMAC_Create(a, b, c, d, e, f, g, h, i, j, k, l, m) \
( \
( ( ((a) < EXDMAC_CHANNELS ) && ((m) <= IPL_MAX) ) ) ? \
R_EXDMAC_CreateAll( (a), (b), (c), (d), (e), (f), (g), (h), (i), (j), (k), (l), (m) ) : \
ReturnFalse() \
)
#define R_EXDMAC_Control(a, b, c, d, e, f, g, h, i) \
( \
( ((a) < EXDMAC_CHANNELS) ) ? \
R_EXDMAC_ControlAll( (a), (b), (c), (d), (e), (f), (g), (h), (i) ) : \
ReturnFalse() \
)
#define R_EXDMAC_GetStatus(a, b, c, d, e, f) \
( \
( ((a) < EXDMAC_CHANNELS) ) ? \
R_EXDMAC_GetStatusAll( (a), (b), (c), (d), (e), (f) ) : \
ReturnFalse() \
)
#define R_EXDMAC_Destroy(a) \
( \
( ((a) < EXDMAC_CHANNELS) ) ? \
R_EXDMAC_DestroyAll( (a) ) : \
ReturnFalse() \
)
#endif
/* End of file */
+203
View File
@@ -0,0 +1,203 @@
/*""FILE COMMENT""*******************************************************
* System Name : I²C API for RX62Nxx
* File Name : r_pdl_iic.h
* Version : 1.02
* Contents : I²C 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_IIC_H
#define R_PDL_IIC_H
#include "r_pdl_common_defs_RX62Nxx.h"
/* Function prototypes */
bool R_IIC_Create(
uint8_t,
uint32_t,
uint32_t,
uint16_t,
uint16_t,
uint16_t,
uint32_t,
uint32_t
);
bool R_IIC_Destroy(
uint8_t
);
bool R_IIC_MasterSend(
uint8_t,
uint16_t,
uint16_t,
uint8_t *,
uint16_t,
void *,
uint8_t
);
bool R_IIC_MasterReceive(
uint8_t,
uint16_t,
uint16_t,
uint8_t *,
uint16_t,
void *,
uint8_t
);
bool R_IIC_MasterReceiveLast(
uint8_t,
uint8_t *
);
bool R_IIC_SlaveMonitor(
uint8_t,
uint16_t,
uint8_t *,
uint16_t,
void *,
uint8_t
);
bool R_IIC_SlaveSend(
uint8_t,
uint8_t *,
uint16_t
);
bool R_IIC_Control(
uint8_t,
uint8_t
);
bool R_IIC_GetStatus(
uint8_t,
uint32_t *,
uint16_t *,
uint16_t *
);
/* Bus mode */
#define PDL_IIC_MODE_IIC 0x00000001ul
#define PDL_IIC_MODE_IIC_FMP 0x00000002ul
#define PDL_IIC_MODE_SMBUS 0x00000004ul
/* Internal reference clock */
#define PDL_IIC_INT_PCLK_DIV_1 0x00000008ul
#define PDL_IIC_INT_PCLK_DIV_2 0x00000010ul
#define PDL_IIC_INT_PCLK_DIV_4 0x00000020ul
#define PDL_IIC_INT_PCLK_DIV_8 0x00000040ul
#define PDL_IIC_INT_PCLK_DIV_16 0x00000080ul
#define PDL_IIC_INT_PCLK_DIV_32 0x00000100ul
#define PDL_IIC_INT_PCLK_DIV_64 0x00000200ul
#define PDL_IIC_INT_PCLK_DIV_128 0x00000400ul
/* Timeout detection */
#define PDL_IIC_TIMEOUT_DISABLE 0x00000800ul
#define PDL_IIC_TIMEOUT_LOW 0x00001000ul
#define PDL_IIC_TIMEOUT_HIGH 0x00002000ul
#define PDL_IIC_TIMEOUT_BOTH 0x00004000ul
/* Timeout mode */
#define PDL_IIC_TIMEOUT_LONG 0x00008000ul
#define PDL_IIC_TIMEOUT_SHORT 0x00010000ul
/* SDA output delay count */
#define PDL_IIC_SDA_DELAY_0 0x00020000ul
#define PDL_IIC_SDA_DELAY_1 0x00040000ul
#define PDL_IIC_SDA_DELAY_2 0x00080000ul
#define PDL_IIC_SDA_DELAY_3 0x00100000ul
#define PDL_IIC_SDA_DELAY_4 0x00200000ul
#define PDL_IIC_SDA_DELAY_5 0x00400000ul
#define PDL_IIC_SDA_DELAY_6 0x00800000ul
#define PDL_IIC_SDA_DELAY_7 0x01000000ul
/* SDA output delay clock source */
#define PDL_IIC_SDA_DELAY_DIV_1 0x02000000ul
#define PDL_IIC_SDA_DELAY_DIV_2 0x04000000ul
/* Noise filter control */
#define PDL_IIC_NF_DISABLE 0x08000000ul
#define PDL_IIC_NF_1 0x10000000ul
#define PDL_IIC_NF_2 0x20000000ul
#define PDL_IIC_NF_3 0x40000000ul
#define PDL_IIC_NF_4 0x80000000ul
/* NACK Transmission Arbitration Lost Detection control */
#define PDL_IIC_NTALD_DISABLE 0x00000001ul
#define PDL_IIC_NTALD_ENABLE 0x00000002ul
/* Slave Arbitration Lost Detection control */
#define PDL_IIC_SALD_DISABLE 0x00000004ul
#define PDL_IIC_SALD_ENABLE 0x00000008ul
/* Slave address detection control */
#define PDL_IIC_SLAVE_0_DISABLE 0x00000010ul
#define PDL_IIC_SLAVE_0_ENABLE_7 0x00000020ul
#define PDL_IIC_SLAVE_0_ENABLE_10 0x00000040ul
#define PDL_IIC_SLAVE_1_DISABLE 0x00000080ul
#define PDL_IIC_SLAVE_1_ENABLE_7 0x00000100ul
#define PDL_IIC_SLAVE_1_ENABLE_10 0x00000200ul
#define PDL_IIC_SLAVE_2_DISABLE 0x00000400ul
#define PDL_IIC_SLAVE_2_ENABLE_7 0x00000800ul
#define PDL_IIC_SLAVE_2_ENABLE_10 0x00001000ul
#define PDL_IIC_SLAVE_GCA_DISABLE 0x00002000ul
#define PDL_IIC_SLAVE_GCA_ENABLE 0x00004000ul
/* Device-ID detection control */
#define PDL_IIC_DEVICE_ID_DISABLE 0x00008000ul
#define PDL_IIC_DEVICE_ID_ENABLE 0x00010000ul
/* Host Address detection control */
#define PDL_IIC_HOST_ADDRESS_DISABLE 0x00020000ul
#define PDL_IIC_HOST_ADDRESS_ENABLE 0x00040000ul
/* Start / Repeated Start condition control */
#define PDL_IIC_START_ENABLE 0x0001u
#define PDL_IIC_START_DISABLE 0x0002u
/* Stop condition control */
#define PDL_IIC_STOP_ENABLE 0x0004u
#define PDL_IIC_STOP_DISABLE 0x0008u
/* Master DMAC / DTC trigger control */
#define PDL_IIC_DMAC_DTC_TRIGGER_DISABLE 0x0010u
#define PDL_IIC_DMAC_TRIGGER_ENABLE 0x0020u
#define PDL_IIC_DTC_TRIGGER_ENABLE 0x0040u
/* Slave DMAC / DTC trigger control */
#define PDL_IIC_RX_DMAC_DTC_TRIGGER_DISABLE 0x0080u
#define PDL_IIC_RX_DMAC_TRIGGER_ENABLE 0x0100u
#define PDL_IIC_RX_DTC_TRIGGER_ENABLE 0x0200u
#define PDL_IIC_TX_DMAC_DTC_TRIGGER_DISABLE 0x0400u
#define PDL_IIC_TX_DMAC_TRIGGER_ENABLE 0x0800u
#define PDL_IIC_TX_DTC_TRIGGER_ENABLE 0x1000u
/* Stop generation */
#define PDL_IIC_STOP 0x01u
/* NACK generation */
#define PDL_IIC_NACK 0x02u
/* Pin control */
#define PDL_IIC_SDA_LOW 0x04u
#define PDL_IIC_SDA_HI_Z 0x08u
#define PDL_IIC_SCL_LOW 0x10u
#define PDL_IIC_SCL_HI_Z 0x20u
/* Extra clock cycle generation */
#define PDL_IIC_CYCLE_SCL 0x40u
/* Reset control */
#define PDL_IIC_RESET 0x80u
#endif
/* End of file */
+203
View File
@@ -0,0 +1,203 @@
/*""FILE COMMENT""*******************************************************
* System Name : I²C API for RX62Nxx (FP suffix)
* File Name : r_pdl_iic_RX62NxFP.h
* Version : 1.02
* Contents : I²C 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_IIC_RX62NxFP_H
#define R_PDL_IIC_RX62NxFP_H
#define IIC_CHANNELS 1
/* Globals */
extern volatile uint8_t rpdl_IIC_stop[IIC_CHANNELS];
extern volatile uint8_t rpdl_IIC_current_state[IIC_CHANNELS];
extern volatile uint8_t rpdl_IIC_next_state[IIC_CHANNELS];
extern volatile uint8_t rpdl_IIC_slave_address_lower[IIC_CHANNELS];
extern volatile uint8_t rpdl_IIC_slave_address_upper[IIC_CHANNELS];
extern const volatile uint8_t * rpdl_IIC_tx_data_pointer[IIC_CHANNELS];
extern const volatile uint8_t * rpdl_IIC_tx_data_start[IIC_CHANNELS];
extern volatile uint8_t * rpdl_IIC_rx_data_pointer[IIC_CHANNELS];
extern volatile uint8_t * rpdl_IIC_rx_data_start[IIC_CHANNELS];
extern volatile uint16_t rpdl_IIC_rx_counter[IIC_CHANNELS];
extern volatile uint16_t rpdl_IIC_tx_counter[IIC_CHANNELS];
extern volatile uint16_t rpdl_IIC_rx_threshold[IIC_CHANNELS];
extern volatile uint16_t rpdl_IIC_tx_threshold[IIC_CHANNELS];
extern volatile uint8_t rpdl_IIC_detected_address[IIC_CHANNELS];
extern volatile uint8_t rpdl_IIC_rx_transfer_method[IIC_CHANNELS];
extern volatile uint8_t rpdl_IIC_rx_dmac_channel[IIC_CHANNELS];
extern volatile uint8_t rpdl_IIC_tx_dmac_channel[IIC_CHANNELS];
/* IIC state machine states */
typedef enum {
IIC_SEND_START,
IIC_MASTER_SEND_SLAVE_ADDRESS_7,
IIC_MASTER_SEND_SLAVE_ADDRESS_10a,
IIC_MASTER_SEND_SLAVE_ADDRESS_10b,
IIC_MASTER_SEND_SLAVE_ADDRESS_10c,
IIC_MASTER_SEND_SLAVE_ADDRESS_10d,
IIC_MASTER_SEND_DATA,
IIC_MASTER_WAIT_FOR_TX_COMPLETE,
IIC_MASTER_WAIT_FOR_STOP,
IIC_EXIT_LOOP,
IIC_MASTER_START_READ,
IIC_MASTER_READ_DATA,
IIC_SEND_STOP,
IIC_SLAVE_MONITOR,
IIC_SLAVE_SEND_DATA,
IIC_SLAVE_READ_SLAVE_ADDRESS,
IIC_SLAVE_READ_DATA
} iic_states;
/* Transfer options */
#define IIC_TRANSFER_CPU 0
#define IIC_TRANSFER_DMAC 2
#define IIC_TRANSFER_DTC 1
/* Callback function prototype */
extern VoidCallBackFunc rpdl_IIC_callback_func[IIC_CHANNELS];
/* Library prototypes */
bool R_IIC_CreateAll(
const uint8_t,
const uint32_t,
const uint32_t,
const uint16_t,
const uint16_t,
const uint16_t,
const uint32_t,
const uint32_t
);
bool R_IIC_DestroyAll(
const uint8_t
);
bool R_IIC_MasterSendAll(
const uint8_t,
const uint16_t,
const uint16_t,
const volatile uint8_t * const,
const uint16_t,
VoidCallBackFunc const,
const uint8_t
);
bool R_IIC_MasterReceiveAll(
const uint8_t,
const uint16_t,
const uint16_t,
volatile uint8_t * const,
const uint16_t,
VoidCallBackFunc const,
const uint8_t
);
bool R_IIC_MasterReceiveLastAll(
const uint8_t,
volatile uint8_t * const
);
bool R_IIC_SlaveMonitorAll(
const uint8_t,
const uint16_t,
volatile uint8_t * const,
const uint16_t,
VoidCallBackFunc const,
const uint8_t
);
bool R_IIC_SlaveSendAll(
const uint8_t,
const volatile uint8_t * const,
const uint16_t
);
bool R_IIC_ControlAll(
const uint8_t,
const uint8_t
);
bool R_IIC_GetStatusAll(
const uint8_t,
volatile uint32_t * const,
volatile uint16_t * const,
volatile uint16_t * const
);
bool ReturnFalse(void);
/* Macro definitions */
#define R_IIC_Create(a, b, c, d, e, f, g, h) \
( \
( (a) < IIC_CHANNELS ) ? \
R_IIC_CreateAll( (a), (b), (c), (d), (e), (f), (g), (h) ) : \
ReturnFalse() \
)
#define R_IIC_Destroy(a) \
( \
( (a) < IIC_CHANNELS ) ? \
R_IIC_DestroyAll( (a) ) : \
ReturnFalse() \
)
#define R_IIC_MasterSend(a, b, c, d, e, f, g) \
( \
( ( (a) < IIC_CHANNELS ) && ((g) <= IPL_MAX) ) ? \
R_IIC_MasterSendAll( (a), (b), (c), (d), (e), (f), (g) ) : \
ReturnFalse() \
)
#define R_IIC_MasterReceive(a, b, c, d, e, f, g) \
( \
( ( (a) < IIC_CHANNELS ) && ((g) <= IPL_MAX) ) ? \
R_IIC_MasterReceiveAll( (a), (b), (c), (d), (e), (f), (g) ) : \
ReturnFalse() \
)
#define R_IIC_MasterReceiveLast(a, b) \
( \
( (a) < IIC_CHANNELS ) ? \
R_IIC_MasterReceiveLastAll( (a), (b) ) : \
ReturnFalse() \
)
#define R_IIC_SlaveMonitor(a, b, c, d, e, f) \
( \
( ( (a) < IIC_CHANNELS ) && ((f) <= IPL_MAX) ) ? \
R_IIC_SlaveMonitorAll( (a), (b), (c), (d), (e), (f) ) : \
ReturnFalse() \
)
#define R_IIC_SlaveSend(a, b, c) \
( \
( (a) < IIC_CHANNELS ) ? \
R_IIC_SlaveSendAll( (a), (b), (c) ) : \
ReturnFalse() \
)
#define R_IIC_Control(a, b) \
( \
( (a) < IIC_CHANNELS ) ? \
R_IIC_ControlAll( (a), (b) ) : \
ReturnFalse() \
)
#define R_IIC_GetStatus(a, b, c, d) \
( \
( (a) < IIC_CHANNELS ) ? \
R_IIC_GetStatusAll( (a), (b), (c), (d) ) : \
ReturnFalse() \
)
#endif
/* End of file */
+203
View File
@@ -0,0 +1,203 @@
/*""FILE COMMENT""*******************************************************
* System Name : I²C API for RX62N (not FP suffix)
* File Name : r_pdl_iic_RX62NxnFP.h
* Version : 1.02
* Contents : I²C 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_IIC_RX62NxnFP_H
#define R_PDL_IIC_RX62NxnFP_H
#define IIC_CHANNELS 2
/* Globals */
extern volatile uint8_t rpdl_IIC_stop[IIC_CHANNELS];
extern volatile uint8_t rpdl_IIC_current_state[IIC_CHANNELS];
extern volatile uint8_t rpdl_IIC_next_state[IIC_CHANNELS];
extern volatile uint8_t rpdl_IIC_slave_address_lower[IIC_CHANNELS];
extern volatile uint8_t rpdl_IIC_slave_address_upper[IIC_CHANNELS];
extern const volatile uint8_t * rpdl_IIC_tx_data_pointer[IIC_CHANNELS];
extern const volatile uint8_t * rpdl_IIC_tx_data_start[IIC_CHANNELS];
extern volatile uint8_t * rpdl_IIC_rx_data_pointer[IIC_CHANNELS];
extern volatile uint8_t * rpdl_IIC_rx_data_start[IIC_CHANNELS];
extern volatile uint16_t rpdl_IIC_rx_counter[IIC_CHANNELS];
extern volatile uint16_t rpdl_IIC_tx_counter[IIC_CHANNELS];
extern volatile uint16_t rpdl_IIC_rx_threshold[IIC_CHANNELS];
extern volatile uint16_t rpdl_IIC_tx_threshold[IIC_CHANNELS];
extern volatile uint8_t rpdl_IIC_detected_address[IIC_CHANNELS];
extern volatile uint8_t rpdl_IIC_rx_transfer_method[IIC_CHANNELS];
extern volatile uint8_t rpdl_IIC_rx_dmac_channel[IIC_CHANNELS];
extern volatile uint8_t rpdl_IIC_tx_dmac_channel[IIC_CHANNELS];
/* IIC state machine states */
typedef enum {
IIC_SEND_START,
IIC_MASTER_SEND_SLAVE_ADDRESS_7,
IIC_MASTER_SEND_SLAVE_ADDRESS_10a,
IIC_MASTER_SEND_SLAVE_ADDRESS_10b,
IIC_MASTER_SEND_SLAVE_ADDRESS_10c,
IIC_MASTER_SEND_SLAVE_ADDRESS_10d,
IIC_MASTER_SEND_DATA,
IIC_MASTER_WAIT_FOR_TX_COMPLETE,
IIC_MASTER_WAIT_FOR_STOP,
IIC_EXIT_LOOP,
IIC_MASTER_START_READ,
IIC_MASTER_READ_DATA,
IIC_SEND_STOP,
IIC_SLAVE_MONITOR,
IIC_SLAVE_SEND_DATA,
IIC_SLAVE_READ_SLAVE_ADDRESS,
IIC_SLAVE_READ_DATA
} iic_states;
/* Transfer options */
#define IIC_TRANSFER_CPU 0
#define IIC_TRANSFER_DMAC 2
#define IIC_TRANSFER_DTC 1
/* Callback function prototype */
extern VoidCallBackFunc rpdl_IIC_callback_func[IIC_CHANNELS];
/* Library prototypes */
bool R_IIC_CreateAll(
const uint8_t,
const uint32_t,
const uint32_t,
const uint16_t,
const uint16_t,
const uint16_t,
const uint32_t,
const uint32_t
);
bool R_IIC_DestroyAll(
const uint8_t
);
bool R_IIC_MasterSendAll(
const uint8_t,
const uint16_t,
const uint16_t,
const volatile uint8_t * const,
const uint16_t,
VoidCallBackFunc const,
const uint8_t
);
bool R_IIC_MasterReceiveAll(
const uint8_t,
const uint16_t,
const uint16_t,
volatile uint8_t * const,
const uint16_t,
VoidCallBackFunc const,
const uint8_t
);
bool R_IIC_MasterReceiveLastAll(
const uint8_t,
volatile uint8_t * const
);
bool R_IIC_SlaveMonitorAll(
const uint8_t,
const uint16_t,
volatile uint8_t * const,
const uint16_t,
VoidCallBackFunc const,
const uint8_t
);
bool R_IIC_SlaveSendAll(
const uint8_t,
const volatile uint8_t * const,
const uint16_t
);
bool R_IIC_ControlAll(
const uint8_t,
const uint8_t
);
bool R_IIC_GetStatusAll(
const uint8_t,
volatile uint32_t * const,
volatile uint16_t * const,
volatile uint16_t * const
);
bool ReturnFalse(void);
/* Macro definitions */
#define R_IIC_Create(a, b, c, d, e, f, g, h) \
( \
( (a) < IIC_CHANNELS ) ? \
R_IIC_CreateAll( (a), (b), (c), (d), (e), (f), (g), (h) ) : \
ReturnFalse() \
)
#define R_IIC_Destroy(a) \
( \
( (a) < IIC_CHANNELS ) ? \
R_IIC_DestroyAll( (a) ) : \
ReturnFalse() \
)
#define R_IIC_MasterSend(a, b, c, d, e, f, g) \
( \
( ( (a) < IIC_CHANNELS ) && ((g) <= IPL_MAX) ) ? \
R_IIC_MasterSendAll( (a), (b), (c), (d), (e), (f), (g) ) : \
ReturnFalse() \
)
#define R_IIC_MasterReceive(a, b, c, d, e, f, g) \
( \
( ( (a) < IIC_CHANNELS ) && ((g) <= IPL_MAX) ) ? \
R_IIC_MasterReceiveAll( (a), (b), (c), (d), (e), (f), (g) ) : \
ReturnFalse() \
)
#define R_IIC_MasterReceiveLast(a, b) \
( \
( (a) < IIC_CHANNELS ) ? \
R_IIC_MasterReceiveLastAll( (a), (b) ) : \
ReturnFalse() \
)
#define R_IIC_SlaveMonitor(a, b, c, d, e, f) \
( \
( ( (a) < IIC_CHANNELS ) && ((f) <= IPL_MAX) ) ? \
R_IIC_SlaveMonitorAll( (a), (b), (c), (d), (e), (f) ) : \
ReturnFalse() \
)
#define R_IIC_SlaveSend(a, b, c) \
( \
( (a) < IIC_CHANNELS ) ? \
R_IIC_SlaveSendAll( (a), (b), (c) ) : \
ReturnFalse() \
)
#define R_IIC_Control(a, b) \
( \
( (a) < IIC_CHANNELS ) ? \
R_IIC_ControlAll( (a), (b) ) : \
ReturnFalse() \
)
#define R_IIC_GetStatus(a, b, c, d) \
( \
( (a) < IIC_CHANNELS ) ? \
R_IIC_GetStatusAll( (a), (b), (c), (d) ) : \
ReturnFalse() \
)
#endif
/* End of file */
File diff suppressed because it is too large Load Diff
+118
View File
@@ -0,0 +1,118 @@
/*""FILE COMMENT""*******************************************************
* System Name : External interrupt API for RX62Nxx
* File Name : r_pdl_intc_RX62Nxx.h
* Version : 1.02
* Contents : INTC 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_INTC_RX62Nxx_H
#define R_PDL_INTC_RX62Nxx_H
/* Callback function storage */
extern VoidCallBackFunc rpdl_INTC_callback_func[];
/* Library prototypes */
bool R_INTC_CreateExtInterruptAll(
const uint8_t,
const uint32_t,
VoidCallBackFunc const,
const uint8_t
);
bool R_INTC_CreateSoftwareInterruptAll(
const uint8_t,
VoidCallBackFunc const,
const uint8_t
);
bool R_INTC_CreateFastInterruptAll(
const uint8_t
);
bool R_INTC_CreateExceptionHandlersAll(
VoidCallBackFunc const,
VoidCallBackFunc const,
VoidCallBackFunc const
);
bool R_INTC_ControlExtInterruptAll(
const uint8_t,
const uint32_t
);
bool R_INTC_GetExtInterruptStatusAll(
const uint8_t,
volatile uint8_t * const
);
bool R_INTC_ReadAll(
const uint16_t,
volatile uint8_t * const
);
bool R_INTC_WriteAll(
const uint16_t,
const uint8_t
);
bool R_INTC_ModifyAll(
const uint16_t,
const uint8_t,
const uint8_t
);
bool ReturnFalse(void);
/* Macro definitions */
#define R_INTC_CreateExtInterrupt(a, b, c, d) \
( \
( ( (a) <= PDL_INTC_NMI ) && ((d) <= IPL_MAX) ) ? \
R_INTC_CreateExtInterruptAll( (a), (b), (c), (d) ) : \
ReturnFalse() \
)
#define R_INTC_CreateSoftwareInterrupt(a, b, c) \
( \
( (c) <= IPL_MAX ) ? \
R_INTC_CreateSoftwareInterruptAll( (a), (b), (c) ) : \
ReturnFalse() \
)
#define R_INTC_ControlExtInterrupt(a, b) \
( \
( (a) <= PDL_INTC_NMI ) ? \
R_INTC_ControlExtInterruptAll( (a), (b) ) : \
ReturnFalse() \
)
#define R_INTC_GetExtInterruptStatus(a, b) \
( \
( (a) <= PDL_INTC_NMI ) ? \
R_INTC_GetExtInterruptStatusAll( (a), (b) ) : \
ReturnFalse() \
)
#define R_INTC_CreateFastInterrupt(a) \
( R_INTC_CreateFastInterruptAll( (a) ) )
#define R_INTC_CreateExceptionHandlers(a, b, c) \
( R_INTC_CreateExceptionHandlersAll( (a), (b), (c) ) )
#define R_INTC_Read(a, b) \
( R_INTC_ReadAll( (a), (b) ) )
#define R_INTC_Write(a, b) \
( R_INTC_WriteAll( (a), (b) ) )
#define R_INTC_Modify(a, b, c) \
( R_INTC_ModifyAll( (a), (b), (c) ) )
#endif
/* End of file */
+252
View File
@@ -0,0 +1,252 @@
/*""FILE COMMENT""*******************************************************
* System Name : I/O Port API
* File Name : r_pdl_io_port.h
* Version : 1.02
* Contents : I/O Port API header
* 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_IO_PORT_H
#define R_PDL_IO_PORT_H
#include "r_pdl_common_defs_RX62Nxx.h"
/* Function prototypes */
bool R_IO_PORT_Set(
uint16_t,
uint8_t
);
bool R_IO_PORT_ReadControl(
uint16_t,
uint8_t,
uint8_t *
);
bool R_IO_PORT_ModifyControl(
uint16_t,
uint8_t,
uint8_t
);
bool R_IO_PORT_Read(
uint16_t,
uint8_t *
);
bool R_IO_PORT_Write(
uint16_t,
uint8_t
);
bool R_IO_PORT_Compare(
uint16_t,
uint8_t,
void *
);
bool R_IO_PORT_Modify(
uint16_t,
uint8_t,
uint8_t
);
bool R_IO_PORT_Wait(
uint16_t,
uint8_t
);
/* I/O Ports*/
#define PDL_IO_PORT_0 0xF000u /* Port 0 */
#define PDL_IO_PORT_1 0xF001u /* Port 1 */
#define PDL_IO_PORT_2 0xF002u /* Port 2 */
#define PDL_IO_PORT_3 0xF003u /* Port 3 */
#define PDL_IO_PORT_4 0xF004u /* Port 4 */
#define PDL_IO_PORT_5 0xF005u /* Port 5 */
#define PDL_IO_PORT_6 0xF006u /* Port 6 */
#define PDL_IO_PORT_7 0xF007u /* Port 7 */
#define PDL_IO_PORT_8 0xF008u /* Port 8 */
#define PDL_IO_PORT_9 0xF009u /* Port 9 */
#define PDL_IO_PORT_A 0xF00Au /* Port A */
#define PDL_IO_PORT_B 0xF00Bu /* Port B */
#define PDL_IO_PORT_C 0xF00Cu /* Port C */
#define PDL_IO_PORT_D 0xF00Du /* Port D */
#define PDL_IO_PORT_E 0xF00Eu /* Port E */
#define PDL_IO_PORT_F 0xF00Fu /* Port F */
#define PDL_IO_PORT_G 0xF010u /* Port G */
/* I/O port pins */
#define PDL_IO_PORT_0_0 0x0001u /* P00 */
#define PDL_IO_PORT_0_1 0x0002u /* P01 */
#define PDL_IO_PORT_0_2 0x0004u /* P02 */
#define PDL_IO_PORT_0_3 0x0008u /* P03 */
#define PDL_IO_PORT_0_5 0x0020u /* P05 */
#define PDL_IO_PORT_0_7 0x0080u /* P07 */
#define PDL_IO_PORT_1_0 0x0101u /* P10 */
#define PDL_IO_PORT_1_1 0x0102u /* P11 */
#define PDL_IO_PORT_1_2 0x0104u /* P12 */
#define PDL_IO_PORT_1_3 0x0108u /* P13 */
#define PDL_IO_PORT_1_4 0x0110u /* P14 */
#define PDL_IO_PORT_1_5 0x0120u /* P15 */
#define PDL_IO_PORT_1_6 0x0140u /* P16 */
#define PDL_IO_PORT_1_7 0x0180u /* P17 */
#define PDL_IO_PORT_2_0 0x0201u /* P20 */
#define PDL_IO_PORT_2_1 0x0202u /* P21 */
#define PDL_IO_PORT_2_2 0x0204u /* P22 */
#define PDL_IO_PORT_2_3 0x0208u /* P23 */
#define PDL_IO_PORT_2_4 0x0210u /* P24 */
#define PDL_IO_PORT_2_5 0x0220u /* P25 */
#define PDL_IO_PORT_2_6 0x0240u /* P26 */
#define PDL_IO_PORT_2_7 0x0280u /* P27 */
#define PDL_IO_PORT_3_0 0x0301u /* P30 */
#define PDL_IO_PORT_3_1 0x0302u /* P31 */
#define PDL_IO_PORT_3_2 0x0304u /* P32 */
#define PDL_IO_PORT_3_3 0x0308u /* P33 */
#define PDL_IO_PORT_3_4 0x0310u /* P34 */
#define PDL_IO_PORT_3_5 0x0320u /* P35 */
#define PDL_IO_PORT_4_0 0x0401u /* P40 */
#define PDL_IO_PORT_4_1 0x0402u /* P41 */
#define PDL_IO_PORT_4_2 0x0404u /* P42 */
#define PDL_IO_PORT_4_3 0x0408u /* P43 */
#define PDL_IO_PORT_4_4 0x0410u /* P44 */
#define PDL_IO_PORT_4_5 0x0420u /* P45 */
#define PDL_IO_PORT_4_6 0x0440u /* P46 */
#define PDL_IO_PORT_4_7 0x0480u /* P47 */
#define PDL_IO_PORT_5_0 0x0501u /* P50 */
#define PDL_IO_PORT_5_1 0x0502u /* P51 */
#define PDL_IO_PORT_5_2 0x0504u /* P52 */
#define PDL_IO_PORT_5_3 0x0508u /* P53 */
#define PDL_IO_PORT_5_4 0x0510u /* P54 */
#define PDL_IO_PORT_5_5 0x0520u /* P55 */
#define PDL_IO_PORT_5_6 0x0540u /* P56 */
#define PDL_IO_PORT_5_7 0x0580u /* P57 */
#define PDL_IO_PORT_6_0 0x0601u /* P60 */
#define PDL_IO_PORT_6_1 0x0602u /* P61 */
#define PDL_IO_PORT_6_2 0x0604u /* P62 */
#define PDL_IO_PORT_6_3 0x0608u /* P63 */
#define PDL_IO_PORT_6_4 0x0610u /* P64 */
#define PDL_IO_PORT_6_5 0x0620u /* P65 */
#define PDL_IO_PORT_6_6 0x0640u /* P66 */
#define PDL_IO_PORT_6_7 0x0680u /* P67 */
#define PDL_IO_PORT_7_0 0x0701u /* P70 */
#define PDL_IO_PORT_7_1 0x0702u /* P71 */
#define PDL_IO_PORT_7_2 0x0704u /* P72 */
#define PDL_IO_PORT_7_3 0x0708u /* P73 */
#define PDL_IO_PORT_7_4 0x0710u /* P74 */
#define PDL_IO_PORT_7_5 0x0720u /* P75 */
#define PDL_IO_PORT_7_6 0x0740u /* P76 */
#define PDL_IO_PORT_7_7 0x0780u /* P77 */
#define PDL_IO_PORT_8_0 0x0801u /* P80 */
#define PDL_IO_PORT_8_1 0x0802u /* P81 */
#define PDL_IO_PORT_8_2 0x0804u /* P82 */
#define PDL_IO_PORT_8_3 0x0808u /* P83 */
#define PDL_IO_PORT_8_4 0x0810u /* P84 */
#define PDL_IO_PORT_8_5 0x0820u /* P85 */
#define PDL_IO_PORT_9_0 0x0901u /* P90 */
#define PDL_IO_PORT_9_1 0x0902u /* P91 */
#define PDL_IO_PORT_9_2 0x0904u /* P92 */
#define PDL_IO_PORT_9_3 0x0908u /* P93 */
#define PDL_IO_PORT_9_4 0x0910u /* P94 */
#define PDL_IO_PORT_9_5 0x0920u /* P95 */
#define PDL_IO_PORT_9_6 0x0940u /* P96 */
#define PDL_IO_PORT_9_7 0x0980u /* P97 */
#define PDL_IO_PORT_A_0 0x0A01u /* PA0 */
#define PDL_IO_PORT_A_1 0x0A02u /* PA1 */
#define PDL_IO_PORT_A_2 0x0A04u /* PA2 */
#define PDL_IO_PORT_A_3 0x0A08u /* PA3 */
#define PDL_IO_PORT_A_4 0x0A10u /* PA4 */
#define PDL_IO_PORT_A_5 0x0A20u /* PA5 */
#define PDL_IO_PORT_A_6 0x0A40u /* PA6 */
#define PDL_IO_PORT_A_7 0x0A80u /* PA7 */
#define PDL_IO_PORT_B_0 0x0B01u /* PB0 */
#define PDL_IO_PORT_B_1 0x0B02u /* PB1 */
#define PDL_IO_PORT_B_2 0x0B04u /* PB2 */
#define PDL_IO_PORT_B_3 0x0B08u /* PB3 */
#define PDL_IO_PORT_B_4 0x0B10u /* PB4 */
#define PDL_IO_PORT_B_5 0x0B20u /* PB5 */
#define PDL_IO_PORT_B_6 0x0B40u /* PB6 */
#define PDL_IO_PORT_B_7 0x0B80u /* PB7 */
#define PDL_IO_PORT_C_0 0x0C01u /* PC0 */
#define PDL_IO_PORT_C_1 0x0C02u /* PC1 */
#define PDL_IO_PORT_C_2 0x0C04u /* PC2 */
#define PDL_IO_PORT_C_3 0x0C08u /* PC3 */
#define PDL_IO_PORT_C_4 0x0C10u /* PC4 */
#define PDL_IO_PORT_C_5 0x0C20u /* PC5 */
#define PDL_IO_PORT_C_6 0x0C40u /* PC6 */
#define PDL_IO_PORT_C_7 0x0C80u /* PC7 */
#define PDL_IO_PORT_D_0 0x0D01u /* PD0 */
#define PDL_IO_PORT_D_1 0x0D02u /* PD1 */
#define PDL_IO_PORT_D_2 0x0D04u /* PD2 */
#define PDL_IO_PORT_D_3 0x0D08u /* PD3 */
#define PDL_IO_PORT_D_4 0x0D10u /* PD4 */
#define PDL_IO_PORT_D_5 0x0D20u /* PD5 */
#define PDL_IO_PORT_D_6 0x0D40u /* PD6 */
#define PDL_IO_PORT_D_7 0x0D80u /* PD7 */
#define PDL_IO_PORT_E_0 0x0E01u /* PE0 */
#define PDL_IO_PORT_E_1 0x0E02u /* PE1 */
#define PDL_IO_PORT_E_2 0x0E04u /* PE2 */
#define PDL_IO_PORT_E_3 0x0E08u /* PE3 */
#define PDL_IO_PORT_E_4 0x0E10u /* PE4 */
#define PDL_IO_PORT_E_5 0x0E20u /* PE5 */
#define PDL_IO_PORT_E_6 0x0E40u /* PE6 */
#define PDL_IO_PORT_E_7 0x0E80u /* PE7 */
#define PDL_IO_PORT_F_0 0x0F01u /* PF0 */
#define PDL_IO_PORT_F_1 0x0F02u /* PF1 */
#define PDL_IO_PORT_F_2 0x0F04u /* PF2 */
#define PDL_IO_PORT_F_3 0x0F08u /* PF3 */
#define PDL_IO_PORT_F_4 0x0F10u /* PF4 */
#define PDL_IO_PORT_G_0 0x1001u /* PG0 */
#define PDL_IO_PORT_G_1 0x1002u /* PG1 */
#define PDL_IO_PORT_G_2 0x1004u /* PG2 */
#define PDL_IO_PORT_G_3 0x1008u /* PG3 */
#define PDL_IO_PORT_G_4 0x1010u /* PG4 */
#define PDL_IO_PORT_G_5 0x1020u /* PG5 */
#define PDL_IO_PORT_G_6 0x1040u /* PG6 */
#define PDL_IO_PORT_G_7 0x1080u /* PG7 */
/* Settings */
#define PDL_IO_PORT_INPUT 0x01u /* Input port */
#define PDL_IO_PORT_OUTPUT 0x02u /* Output port */
#define PDL_IO_PORT_INPUT_BUFFER_ON 0x04u /* The input buffer is enabled */
#define PDL_IO_PORT_INPUT_BUFFER_OFF 0x08u /* The input buffer is disabled */
#define PDL_IO_PORT_PULL_UP_ON 0x10u /* Pulled high */
#define PDL_IO_PORT_PULL_UP_OFF 0x20u /* Not pulled high */
#define PDL_IO_PORT_OPEN_DRAIN 0x40u /* NMOS open-drain output */
#define PDL_IO_PORT_CMOS 0x80u /* CMOS output */
/* Control register selection */
#define PDL_IO_PORT_DIRECTION 0x01u
#define PDL_IO_PORT_INPUT_BUFFER 0x02u
#define PDL_IO_PORT_PULL_UP 0x04u
#define PDL_IO_PORT_TYPE 0x08u
/* Logical operations */
#define PDL_IO_PORT_AND 0x10u
#define PDL_IO_PORT_OR 0x20u
#define PDL_IO_PORT_XOR 0x40u
#endif
/* End of file */
+200
View File
@@ -0,0 +1,200 @@
/*""FILE COMMENT""*******************************************************
* System Name : I/O Port API for RX62N (176-pin LFBGA)
* File Name : r_pdl_io_port_RX62NxBG.h
* Version : 1.02
* Contents : I/O Port 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_IO_PORT_RX62NxBG_H
#define R_PDL_IO_PORT_RX62NxBG_H
/* Library prototypes */
bool R_IO_PORT_SetAll(
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_ReadControlAll(
const uint8_t,
const uint8_t,
const uint8_t,
volatile uint8_t * const
);
bool R_IO_PORT_ReadControlRegisterAll(
const uint8_t,
const uint8_t,
volatile uint8_t * const
);
bool R_IO_PORT_ModifyControlAll(
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_ModifyControlRegisterAll(
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_ReadDataAll(
const uint8_t,
const uint8_t,
volatile uint8_t * const
);
bool R_IO_PORT_ReadDataRegisterAll(
const uint8_t,
volatile uint8_t * const
);
bool R_IO_PORT_WriteAll(
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_WriteRegisterAll(
const uint8_t,
const uint8_t
);
bool R_IO_PORT_CompareAll(
const uint8_t,
const uint8_t,
const uint8_t,
VoidCallBackFunc const
);
bool R_IO_PORT_CompareRegisterAll(
const uint8_t,
const uint8_t,
VoidCallBackFunc const
);
bool R_IO_PORT_ModifyDataAll(
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_ModifyDataRegisterAll(
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_WaitAll(
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_WaitRegisterAll(
const uint8_t,
const uint8_t
);
bool ReturnFalse(void);
/* Macro definitions */
/* R_IO_PORT_Set */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Set(a, b) \
( \
( ((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_G_7) ) ? \
R_IO_PORT_SetAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)~(a), (b) ) : \
ReturnFalse() \
)
/* R_IO_PORT_ReadControl */
/* Call the function if the port number is valid. */
#define R_IO_PORT_ReadControl(a, b, c) \
( \
( (((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_G_7)) ) ? \
R_IO_PORT_ReadControlAll( (uint8_t)((a) >> 8), (uint8_t)(a), (b), (c) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_G) ) ? \
R_IO_PORT_ReadControlRegisterAll( (uint8_t)(a), (b), (c) ) : \
ReturnFalse() \
)
/* R_IO_PORT_ModifyControl */
/* Call the function if the port number is valid. */
#define R_IO_PORT_ModifyControl(a, b, c) \
( \
( (((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_G_7)) ) ? \
R_IO_PORT_ModifyControlAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)~(a), (b), (c) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_G) ) ? \
R_IO_PORT_ModifyControlRegisterAll( (uint8_t)(a), (b), (c) ) : \
ReturnFalse() \
)
/* R_IO_PORT_Read */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Read(a, b) \
( \
( (((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_G_7)) ) ? \
R_IO_PORT_ReadDataAll( (uint8_t)((a) >> 8), (uint8_t)(a), (b) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_G) ) ? \
R_IO_PORT_ReadDataRegisterAll( (uint8_t)(a), (b) ) : \
ReturnFalse() \
)
/* R_IO_PORT_Write */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Write(a, b) \
( \
( (((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_G_7)) ) ? \
R_IO_PORT_WriteAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)~(a), (b) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_G) ) ? \
R_IO_PORT_WriteRegisterAll( (uint8_t)(a), (b) ): \
ReturnFalse() \
)
/* R_IO_PORT_Compare */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Compare(a, b, c) \
( \
( (((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_G_7)) ) ? \
R_IO_PORT_CompareAll( (uint8_t)((a) >> 8), (uint8_t)(a), (b), (c) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_G) ) ? \
R_IO_PORT_CompareRegisterAll( (uint8_t)(a), (b), (c) ): \
ReturnFalse() \
)
/* R_IO_PORT_Modify */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Modify(a, b, c) \
( \
( (((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_G_7)) ) ? \
R_IO_PORT_ModifyDataAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)~(a), (b), (c) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_G) ) ? \
R_IO_PORT_ModifyDataRegisterAll( (uint8_t)(a), (b), (c) ): \
ReturnFalse() \
)
/* R_IO_PORT_Wait */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Wait(a, b) \
( \
( (((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_G_7)) && (b == 1u) ) ? \
R_IO_PORT_WaitAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)(a) ) : \
( (((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_G_7)) && (b == 0u) ) ? \
R_IO_PORT_WaitAll( (uint8_t)((a) >> 8), (uint8_t)(a), 0 ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_G) ) ? \
R_IO_PORT_WaitRegisterAll( (uint8_t)(a), (b) ) : \
ReturnFalse() \
)
#endif
/* End of file */
+201
View File
@@ -0,0 +1,201 @@
/*""FILE COMMENT""*******************************************************
* System Name : I/O Port API for RX62N (144-pin LQFP)
* File Name : r_pdl_io_port_RX62NxFB.h
* Version : 1.02
* Contents : I/O Port 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_IO_PORT_RX62NxFB_H
#define R_PDL_IO_PORT_RX62NxFB_H
/* Library prototypes */
/* Library prototypes */
bool R_IO_PORT_SetAll(
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_ReadControlAll(
const uint8_t,
const uint8_t,
const uint8_t,
volatile uint8_t * const
);
bool R_IO_PORT_ReadControlRegisterAll(
const uint8_t,
const uint8_t,
volatile uint8_t * const
);
bool R_IO_PORT_ModifyControlAll(
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_ModifyControlRegisterAll(
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_ReadDataAll(
const uint8_t,
const uint8_t,
volatile uint8_t * const
);
bool R_IO_PORT_ReadDataRegisterAll(
const uint8_t,
volatile uint8_t * const
);
bool R_IO_PORT_WriteAll(
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_WriteRegisterAll(
const uint8_t,
const uint8_t
);
bool R_IO_PORT_CompareAll(
const uint8_t,
const uint8_t,
const uint8_t,
VoidCallBackFunc const
);
bool R_IO_PORT_CompareRegisterAll(
const uint8_t,
const uint8_t,
VoidCallBackFunc const
);
bool R_IO_PORT_ModifyDataAll(
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_ModifyDataRegisterAll(
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_WaitAll(
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_WaitRegisterAll(
const uint8_t,
const uint8_t
);
bool ReturnFalse(void);
/* Macro definitions */
/* R_IO_PORT_Set */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Set(a, b) \
( \
( ((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_E_7) ) ? \
R_IO_PORT_SetAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)~(a), (b) ) : \
ReturnFalse() \
)
/* R_IO_PORT_ReadControl */
/* Call the function if the port number is valid. */
#define R_IO_PORT_ReadControl(a, b, c) \
( \
( (((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_E_7)) ) ? \
R_IO_PORT_ReadControlAll( (uint8_t)((a) >> 8), (uint8_t)(a), (b), (c) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_E) ) ? \
R_IO_PORT_ReadControlRegisterAll( (uint8_t)(a), (b), (c) ) : \
ReturnFalse() \
)
/* R_IO_PORT_ModifyControl */
/* Call the function if the port number is valid (0 to E). */
#define R_IO_PORT_ModifyControl(a, b, c) \
( \
( (((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_E_7)) ) ? \
R_IO_PORT_ModifyControlAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)~(a), (b), (c) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_E) ) ? \
R_IO_PORT_ModifyControlRegisterAll( (uint8_t)(a), (b), (c) ) : \
ReturnFalse() \
)
/* R_IO_PORT_Read */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Read(a, b) \
( \
( (((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_E_7)) ) ? \
R_IO_PORT_ReadDataAll( (uint8_t)((a) >> 8), (uint8_t)(a), (b) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_E) ) ? \
R_IO_PORT_ReadDataRegisterAll( (uint8_t)(a), (b) ) : \
ReturnFalse() \
)
/* R_IO_PORT_Write */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Write(a, b) \
( \
( (((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_E_7)) ) ? \
R_IO_PORT_WriteAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)~(a), (b) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_E) ) ? \
R_IO_PORT_WriteRegisterAll( (uint8_t)(a), (b) ): \
ReturnFalse() \
)
/* R_IO_PORT_Compare */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Compare(a, b, c) \
( \
( (((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_E_7)) ) ? \
R_IO_PORT_CompareAll( (uint8_t)((a) >> 8), (uint8_t)(a), (b), (c) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_E) ) ? \
R_IO_PORT_CompareRegisterAll( (uint8_t)(a), (b), (c) ): \
ReturnFalse() \
)
/* R_IO_PORT_Modify */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Modify(a, b, c) \
( \
( (((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_E_7)) ) ? \
R_IO_PORT_ModifyDataAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)~(a), (b), (c) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_E) ) ? \
R_IO_PORT_ModifyDataRegisterAll( (uint8_t)(a), (b), (c) ): \
ReturnFalse() \
)
/* R_IO_PORT_Wait */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Wait(a, b) \
( \
( (((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_E_7)) && (b == 1u) ) ? \
R_IO_PORT_WaitAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)(a) ) : \
( (((a) >= PDL_IO_PORT_0_0) && ((a) <= PDL_IO_PORT_E_7)) && (b == 0u) ) ? \
R_IO_PORT_WaitAll( (uint8_t)((a) >> 8), (uint8_t)(a), 0u ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_E) ) ? \
R_IO_PORT_WaitRegisterAll( (uint8_t)(a), (b) ) : \
ReturnFalse() \
)
#endif
/* End of file */
+201
View File
@@ -0,0 +1,201 @@
/*""FILE COMMENT""*******************************************************
* System Name : I/O Port API for RX62N (100-pin LQFP)
* File Name : r_pdl_io_port_RX62NxFP.h
* Version : 1.02
* Contents : I/O Port 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_IO_PORT_RX62NxFP_H
#define R_PDL_IO_PORT_RX62NxFP_H
/* Library prototypes */
/* Library prototypes */
bool R_IO_PORT_SetAll(
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_ReadControlAll(
const uint8_t,
const uint8_t,
const uint8_t,
volatile uint8_t * const
);
bool R_IO_PORT_ReadControlRegisterAll(
const uint8_t,
const uint8_t,
volatile uint8_t * const
);
bool R_IO_PORT_ModifyControlAll(
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_ModifyControlRegisterAll(
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_ReadDataAll(
const uint8_t,
const uint8_t,
volatile uint8_t * const
);
bool R_IO_PORT_ReadDataRegisterAll(
const uint8_t,
volatile uint8_t * const
);
bool R_IO_PORT_WriteAll(
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_WriteRegisterAll(
const uint8_t,
const uint8_t
);
bool R_IO_PORT_CompareAll(
const uint8_t,
const uint8_t,
const uint8_t,
VoidCallBackFunc const
);
bool R_IO_PORT_CompareRegisterAll(
const uint8_t,
const uint8_t,
VoidCallBackFunc const
);
bool R_IO_PORT_ModifyDataAll(
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_ModifyDataRegisterAll(
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_WaitAll(
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_WaitRegisterAll(
const uint8_t,
const uint8_t
);
bool ReturnFalse(void);
/* Macro definitions */
/* R_IO_PORT_Set */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Set(a, b) \
( \
( ((a) >= PDL_IO_PORT_0_5) && ((a) <= PDL_IO_PORT_E_7) ) ? \
R_IO_PORT_SetAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)~(a), (b) ) : \
ReturnFalse() \
)
/* R_IO_PORT_ReadControl */
/* Call the function if the port number is valid. */
#define R_IO_PORT_ReadControl(a, b, c) \
( \
( (((a) >= PDL_IO_PORT_0_5) && ((a) <= PDL_IO_PORT_E_7)) ) ? \
R_IO_PORT_ReadControlAll( (uint8_t)((a) >> 8), (uint8_t)(a), (b), (c) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_E) ) ? \
R_IO_PORT_ReadControlRegisterAll( (uint8_t)(a), (b), (c) ) : \
ReturnFalse() \
)
/* R_IO_PORT_ModifyControl */
/* Call the function if the port number is valid. */
#define R_IO_PORT_ModifyControl(a, b, c) \
( \
( (((a) >= PDL_IO_PORT_0_5) && ((a) <= PDL_IO_PORT_E_7)) ) ? \
R_IO_PORT_ModifyControlAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)~(a), (b), (c) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_E) ) ? \
R_IO_PORT_ModifyControlRegisterAll( (uint8_t)(a), (b), (c) ) : \
ReturnFalse() \
)
/* R_IO_PORT_Read */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Read(a, b) \
( \
( (((a) >= PDL_IO_PORT_0_5) && ((a) <= PDL_IO_PORT_E_7)) ) ? \
R_IO_PORT_ReadDataAll( (uint8_t)((a) >> 8), (uint8_t)(a), (b) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_E) ) ? \
R_IO_PORT_ReadDataRegisterAll( (uint8_t)(a), (b) ) : \
ReturnFalse() \
)
/* R_IO_PORT_Write */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Write(a, b) \
( \
( (((a) >= PDL_IO_PORT_0_5) && ((a) <= PDL_IO_PORT_E_7)) ) ? \
R_IO_PORT_WriteAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)~(a), (b) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_E) ) ? \
R_IO_PORT_WriteRegisterAll( (uint8_t)(a), (b) ): \
ReturnFalse() \
)
/* R_IO_PORT_Compare */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Compare(a, b, c) \
( \
( (((a) >= PDL_IO_PORT_0_5) && ((a) <= PDL_IO_PORT_E_7)) ) ? \
R_IO_PORT_CompareAll( (uint8_t)((a) >> 8), (uint8_t)(a), (b), (c) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_E) ) ? \
R_IO_PORT_CompareRegisterAll( (uint8_t)(a), (b), (c) ): \
ReturnFalse() \
)
/* R_IO_PORT_Modify */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Modify(a, b, c) \
( \
( (((a) >= PDL_IO_PORT_0_5) && ((a) <= PDL_IO_PORT_E_7)) ) ? \
R_IO_PORT_ModifyDataAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)~(a), (b), (c) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_E) ) ? \
R_IO_PORT_ModifyDataRegisterAll( (uint8_t)(a), (b), (c) ): \
ReturnFalse() \
)
/* R_IO_PORT_Wait */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Wait(a, b) \
( \
( (((a) >= PDL_IO_PORT_0_5) && ((a) <= PDL_IO_PORT_E_7)) && (b == 1u) ) ? \
R_IO_PORT_WaitAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)(a) ) : \
( (((a) >= PDL_IO_PORT_0_5) && ((a) <= PDL_IO_PORT_E_7)) && (b == 0u) ) ? \
R_IO_PORT_WaitAll( (uint8_t)((a) >> 8), (uint8_t)(a), 0u ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_E) ) ? \
R_IO_PORT_WaitRegisterAll( (uint8_t)(a), (b) ) : \
ReturnFalse() \
)
#endif
/* End of file */
+201
View File
@@ -0,0 +1,201 @@
/*""FILE COMMENT""*******************************************************
* System Name : I/O Port API for RX62N (85-pin TFLGA)
* File Name : r_pdl_io_port_RX62NxLD.h
* Version : 1.02
* Contents : I/O Port 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_IO_PORT_RX62NxLD_H
#define R_PDL_IO_PORT_RX62NxLD_H
/* Library prototypes */
/* Library prototypes */
bool R_IO_PORT_SetAll(
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_ReadControlAll(
const uint8_t,
const uint8_t,
const uint8_t,
volatile uint8_t * const
);
bool R_IO_PORT_ReadControlRegisterAll(
const uint8_t,
const uint8_t,
volatile uint8_t * const
);
bool R_IO_PORT_ModifyControlAll(
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_ModifyControlRegisterAll(
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_ReadDataAll(
const uint8_t,
const uint8_t,
volatile uint8_t * const
);
bool R_IO_PORT_ReadDataRegisterAll(
const uint8_t,
volatile uint8_t * const
);
bool R_IO_PORT_WriteAll(
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_WriteRegisterAll(
const uint8_t,
const uint8_t
);
bool R_IO_PORT_CompareAll(
const uint8_t,
const uint8_t,
const uint8_t,
VoidCallBackFunc const
);
bool R_IO_PORT_CompareRegisterAll(
const uint8_t,
const uint8_t,
VoidCallBackFunc const
);
bool R_IO_PORT_ModifyDataAll(
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_ModifyDataRegisterAll(
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_WaitAll(
const uint8_t,
const uint8_t,
const uint8_t
);
bool R_IO_PORT_WaitRegisterAll(
const uint8_t,
const uint8_t
);
bool ReturnFalse(void);
/* Macro definitions */
/* R_IO_PORT_Set */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Set(a, b) \
( \
( ((a) >= PDL_IO_PORT_0_3) && ((a) <= PDL_IO_PORT_D_7) ) ? \
R_IO_PORT_SetAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)~(a), (b) ) : \
ReturnFalse() \
)
/* R_IO_PORT_ReadControl */
/* Call the function if the port number is valid. */
#define R_IO_PORT_ReadControl(a, b, c) \
( \
( (((a) >= PDL_IO_PORT_0_3) && ((a) <= PDL_IO_PORT_D_7)) ) ? \
R_IO_PORT_ReadControlAll( (uint8_t)((a) >> 8), (uint8_t)(a), (b), (c) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_D) ) ? \
R_IO_PORT_ReadControlRegisterAll( (uint8_t)(a), (b), (c) ) : \
ReturnFalse() \
)
/* R_IO_PORT_ModifyControl */
/* Call the function if the port number is valid. */
#define R_IO_PORT_ModifyControl(a, b, c) \
( \
( (((a) >= PDL_IO_PORT_0_3) && ((a) <= PDL_IO_PORT_D_7)) ) ? \
R_IO_PORT_ModifyControlAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)~(a), (b), (c) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_D) ) ? \
R_IO_PORT_ModifyControlRegisterAll( (uint8_t)(a), (b), (c) ) : \
ReturnFalse() \
)
/* R_IO_PORT_Read */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Read(a, b) \
( \
( (((a) >= PDL_IO_PORT_0_3) && ((a) <= PDL_IO_PORT_D_7)) ) ? \
R_IO_PORT_ReadDataAll( (uint8_t)((a) >> 8), (uint8_t)(a), (b) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_D) ) ? \
R_IO_PORT_ReadDataRegisterAll( (uint8_t)(a), (b) ) : \
ReturnFalse() \
)
/* R_IO_PORT_Write */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Write(a, b) \
( \
( (((a) >= PDL_IO_PORT_0_3) && ((a) <= PDL_IO_PORT_D_7)) ) ? \
R_IO_PORT_WriteAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)~(a), (b) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_D) ) ? \
R_IO_PORT_WriteRegisterAll( (uint8_t)(a), (b) ): \
ReturnFalse() \
)
/* R_IO_PORT_Compare */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Compare(a, b, c) \
( \
( (((a) >= PDL_IO_PORT_0_3) && ((a) <= PDL_IO_PORT_D_7)) ) ? \
R_IO_PORT_CompareAll( (uint8_t)((a) >> 8), (uint8_t)(a), (b), (c) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_D) ) ? \
R_IO_PORT_CompareRegisterAll( (uint8_t)(a), (b), (c) ): \
ReturnFalse() \
)
/* R_IO_PORT_Modify */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Modify(a, b, c) \
( \
( (((a) >= PDL_IO_PORT_0_3) && ((a) <= PDL_IO_PORT_D_7)) ) ? \
R_IO_PORT_ModifyDataAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)~(a), (b), (c) ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_D) ) ? \
R_IO_PORT_ModifyDataRegisterAll( (uint8_t)(a), (b), (c) ): \
ReturnFalse() \
)
/* R_IO_PORT_Wait */
/* Call the function if the port number is valid. */
#define R_IO_PORT_Wait(a, b) \
( \
( (((a) >= PDL_IO_PORT_0_3) && ((a) <= PDL_IO_PORT_D_7)) && (b == 1u) ) ? \
R_IO_PORT_WaitAll( (uint8_t)((a) >> 8), (uint8_t)(a), (uint8_t)(a) ) : \
( (((a) >= PDL_IO_PORT_0_3) && ((a) <= PDL_IO_PORT_D_7)) && (b == 0u) ) ? \
R_IO_PORT_WaitAll( (uint8_t)((a) >> 8), (uint8_t)(a), 0u ) : \
( ((a) >= PDL_IO_PORT_0) && ((a) <= PDL_IO_PORT_D) ) ? \
R_IO_PORT_WaitRegisterAll( (uint8_t)(a), (b) ) : \
ReturnFalse() \
)
#endif
/* End of file */

Some files were not shown because too many files have changed in this diff Show More