1
0

Interrupt_RTC.c 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  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. #include "r_pdl_rtc.h"
  23. #include "r_pdl_definitions.h"
  24. #include "r_pdl_user_definitions.h"
  25. /*""FUNC COMMENT""***************************************************
  26. * Module outline: RTC periodic interrupt processing
  27. *-------------------------------------------------------------------
  28. * Declaration : void Interrupt_RTC_PRD(void)
  29. *-------------------------------------------------------------------
  30. * Function : Interrupt processing function for RTC
  31. *-------------------------------------------------------------------
  32. * Argument : Nothing
  33. *-------------------------------------------------------------------
  34. * Return value : Nothing
  35. *-------------------------------------------------------------------
  36. * Input :
  37. * Output :
  38. *-------------------------------------------------------------------
  39. * Use function : rpdl_RTC_Periodic_callback_func()
  40. *-------------------------------------------------------------------
  41. * Notes :
  42. *-------------------------------------------------------------------
  43. * History : 2011.04.08
  44. * : Ver 1.02
  45. * : CS-5 release.
  46. *""FUNC COMMENT END""**********************************************/
  47. #if FAST_INTC_VECTOR == VECT_RTC_PRD
  48. __fast_interrupt void Interrupt_RTC_PRD(void)
  49. #else
  50. #pragma vector = VECT_RTC_PRD
  51. __interrupt void Interrupt_RTC_PRD(void)
  52. #endif
  53. {
  54. /* Call the user function */
  55. if (rpdl_RTC_Periodic_callback_func != PDL_NO_FUNC)
  56. {
  57. rpdl_RTC_Periodic_callback_func();
  58. }
  59. }
  60. /*""FUNC COMMENT""***************************************************
  61. * Module outline: RTC alarm interrupt processing
  62. *-------------------------------------------------------------------
  63. * Declaration : void Interrupt_RTC_ALM(void)
  64. *-------------------------------------------------------------------
  65. * Function : Interrupt processing function for RTC
  66. *-------------------------------------------------------------------
  67. * Argument : Nothing
  68. *-------------------------------------------------------------------
  69. * Return value : Nothing
  70. *-------------------------------------------------------------------
  71. * Input :
  72. * Output :
  73. *-------------------------------------------------------------------
  74. * Use function : rpdl_RTC_Alarm_callback_func()
  75. *-------------------------------------------------------------------
  76. * Notes :
  77. *-------------------------------------------------------------------
  78. * History : 2011.04.08
  79. * : Ver 1.02
  80. * : CS-5 release.
  81. *""FUNC COMMENT END""**********************************************/
  82. #if FAST_INTC_VECTOR == VECT_RTC_ALM
  83. __fast_interrupt void Interrupt_RTC_ALM(void)
  84. #else
  85. #pragma vector = VECT_RTC_ALM
  86. __interrupt void Interrupt_RTC_ALM(void)
  87. #endif
  88. {
  89. /* Call the user function */
  90. if (rpdl_RTC_Alarm_callback_func != PDL_NO_FUNC)
  91. {
  92. rpdl_RTC_Alarm_callback_func();
  93. }
  94. }
  95. /*""FUNC COMMENT""***************************************************
  96. * Module outline: RTC Carry interrupt processing
  97. *-------------------------------------------------------------------
  98. * Declaration : void Interrupt_RTC_CUP(void)
  99. *-------------------------------------------------------------------
  100. * Function : Interrupt processing function for RTC
  101. *-------------------------------------------------------------------
  102. * Argument : Nothing
  103. *-------------------------------------------------------------------
  104. * Return value : Nothing
  105. *-------------------------------------------------------------------
  106. * Input :
  107. * Output :
  108. *-------------------------------------------------------------------
  109. * Use function :
  110. *-------------------------------------------------------------------
  111. * Notes : This interrupt is not used.
  112. *-------------------------------------------------------------------
  113. * History : 2011.04.08
  114. * : Ver 1.02
  115. * : CS-5 release.
  116. *""FUNC COMMENT END""**********************************************/
  117. #if FAST_INTC_VECTOR == VECT_RTC_CUP
  118. __fast_interrupt void Interrupt_RTC_CUP(void)
  119. #else
  120. #pragma vector = VECT_RTC_CUP
  121. __interrupt void Interrupt_RTC_CUP(void)
  122. #endif
  123. {
  124. /* Disable further requests */
  125. ICU.IER[IER_RTC_CUP].BIT.IEN_RTC_CUP = 0;
  126. }
  127. /* End of file */