summaryrefslogtreecommitdiff
path: root/bsp/rx/RPDL/Interrupt_RTC.c
blob: c195cd7992bc8b0d7dd6c688a76a0d2aeb972fe2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
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 */