1 /*""FILE COMMENT""*******************************************************
2 * System Name : RTC Interrupt program for RX62Nxx
3 * File Name : Interrupt_RTC.c
4 * Version : 1.02
5 * Contents : Interrupt handler for RTC
6 * Customer :
7 * Model :
8 * Order :
9 * CPU : RX
10 * Compiler : RXC
11 * OS : Nothing
12 * Programmer :
13 * Note :
14 ************************************************************************
15 * Copyright, 2011. Renesas Electronics Corporation
16 * and Renesas Solutions Corporation
17 ************************************************************************
18 * History : 2011.04.08
19 * : Ver 1.02
20 * : CS-5 release.
21 *""FILE COMMENT END""**************************************************/
22
23 #include "r_pdl_rtc.h"
24 #include "r_pdl_definitions.h"
25 #include "r_pdl_user_definitions.h"
26
27 /*""FUNC COMMENT""***************************************************
28 * Module outline: RTC periodic interrupt processing
29 *-------------------------------------------------------------------
30 * Declaration : void Interrupt_RTC_PRD(void)
31 *-------------------------------------------------------------------
32 * Function : Interrupt processing function for RTC
33 *-------------------------------------------------------------------
34 * Argument : Nothing
35 *-------------------------------------------------------------------
36 * Return value : Nothing
37 *-------------------------------------------------------------------
38 * Input :
39 * Output :
40 *-------------------------------------------------------------------
41 * Use function : rpdl_RTC_Periodic_callback_func()
42 *-------------------------------------------------------------------
43 * Notes :
44 *-------------------------------------------------------------------
45 * History : 2011.04.08
46 * : Ver 1.02
47 * : CS-5 release.
48 *""FUNC COMMENT END""**********************************************/
49 #if FAST_INTC_VECTOR == VECT_RTC_PRD
Interrupt_RTC_PRD(void)50 __fast_interrupt void Interrupt_RTC_PRD(void)
51 #else
52 #pragma vector = VECT_RTC_PRD
53 __interrupt void Interrupt_RTC_PRD(void)
54 #endif
55 {
56 /* Call the user function */
57 if (rpdl_RTC_Periodic_callback_func != PDL_NO_FUNC)
58 {
59 rpdl_RTC_Periodic_callback_func();
60 }
61 }
62
63 /*""FUNC COMMENT""***************************************************
64 * Module outline: RTC alarm interrupt processing
65 *-------------------------------------------------------------------
66 * Declaration : void Interrupt_RTC_ALM(void)
67 *-------------------------------------------------------------------
68 * Function : Interrupt processing function for RTC
69 *-------------------------------------------------------------------
70 * Argument : Nothing
71 *-------------------------------------------------------------------
72 * Return value : Nothing
73 *-------------------------------------------------------------------
74 * Input :
75 * Output :
76 *-------------------------------------------------------------------
77 * Use function : rpdl_RTC_Alarm_callback_func()
78 *-------------------------------------------------------------------
79 * Notes :
80 *-------------------------------------------------------------------
81 * History : 2011.04.08
82 * : Ver 1.02
83 * : CS-5 release.
84 *""FUNC COMMENT END""**********************************************/
85 #if FAST_INTC_VECTOR == VECT_RTC_ALM
Interrupt_RTC_ALM(void)86 __fast_interrupt void Interrupt_RTC_ALM(void)
87 #else
88 #pragma vector = VECT_RTC_ALM
89 __interrupt void Interrupt_RTC_ALM(void)
90 #endif
91 {
92 /* Call the user function */
93 if (rpdl_RTC_Alarm_callback_func != PDL_NO_FUNC)
94 {
95 rpdl_RTC_Alarm_callback_func();
96 }
97 }
98
99 /*""FUNC COMMENT""***************************************************
100 * Module outline: RTC Carry interrupt processing
101 *-------------------------------------------------------------------
102 * Declaration : void Interrupt_RTC_CUP(void)
103 *-------------------------------------------------------------------
104 * Function : Interrupt processing function for RTC
105 *-------------------------------------------------------------------
106 * Argument : Nothing
107 *-------------------------------------------------------------------
108 * Return value : Nothing
109 *-------------------------------------------------------------------
110 * Input :
111 * Output :
112 *-------------------------------------------------------------------
113 * Use function :
114 *-------------------------------------------------------------------
115 * Notes : This interrupt is not used.
116 *-------------------------------------------------------------------
117 * History : 2011.04.08
118 * : Ver 1.02
119 * : CS-5 release.
120 *""FUNC COMMENT END""**********************************************/
121 #if FAST_INTC_VECTOR == VECT_RTC_CUP
Interrupt_RTC_CUP(void)122 __fast_interrupt void Interrupt_RTC_CUP(void)
123 #else
124 #pragma vector = VECT_RTC_CUP
125 __interrupt void Interrupt_RTC_CUP(void)
126 #endif
127 {
128 /* Disable further requests */
129 ICU.IER[IER_RTC_CUP].BIT.IEN_RTC_CUP = 0;
130 }
131
132 /* End of file */
133