r_pdl_intc_rx62nxx.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. /*""FILE COMMENT""*******************************************************
  2. * System Name : External interrupt API for RX62Nxx
  3. * File Name : r_pdl_intc_RX62Nxx.h
  4. * Version : 1.02
  5. * Contents : INTC API header
  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. #ifndef R_PDL_INTC_RX62Nxx_H
  23. #define R_PDL_INTC_RX62Nxx_H
  24. /* Callback function storage */
  25. extern VoidCallBackFunc rpdl_INTC_callback_func[];
  26. /* Library prototypes */
  27. bool R_INTC_CreateExtInterruptAll(
  28. const uint8_t,
  29. const uint32_t,
  30. VoidCallBackFunc const,
  31. const uint8_t
  32. );
  33. bool R_INTC_CreateSoftwareInterruptAll(
  34. const uint8_t,
  35. VoidCallBackFunc const,
  36. const uint8_t
  37. );
  38. bool R_INTC_CreateFastInterruptAll(
  39. const uint8_t
  40. );
  41. bool R_INTC_CreateExceptionHandlersAll(
  42. VoidCallBackFunc const,
  43. VoidCallBackFunc const,
  44. VoidCallBackFunc const
  45. );
  46. bool R_INTC_ControlExtInterruptAll(
  47. const uint8_t,
  48. const uint32_t
  49. );
  50. bool R_INTC_GetExtInterruptStatusAll(
  51. const uint8_t,
  52. volatile uint8_t * const
  53. );
  54. bool R_INTC_ReadAll(
  55. const uint16_t,
  56. volatile uint8_t * const
  57. );
  58. bool R_INTC_WriteAll(
  59. const uint16_t,
  60. const uint8_t
  61. );
  62. bool R_INTC_ModifyAll(
  63. const uint16_t,
  64. const uint8_t,
  65. const uint8_t
  66. );
  67. bool ReturnFalse(void);
  68. /* Macro definitions */
  69. #define R_INTC_CreateExtInterrupt(a, b, c, d) \
  70. ( \
  71. ( ( (a) <= PDL_INTC_NMI ) && ((d) <= IPL_MAX) ) ? \
  72. R_INTC_CreateExtInterruptAll( (a), (b), (c), (d) ) : \
  73. ReturnFalse() \
  74. )
  75. #define R_INTC_CreateSoftwareInterrupt(a, b, c) \
  76. ( \
  77. ( (c) <= IPL_MAX ) ? \
  78. R_INTC_CreateSoftwareInterruptAll( (a), (b), (c) ) : \
  79. ReturnFalse() \
  80. )
  81. #define R_INTC_ControlExtInterrupt(a, b) \
  82. ( \
  83. ( (a) <= PDL_INTC_NMI ) ? \
  84. R_INTC_ControlExtInterruptAll( (a), (b) ) : \
  85. ReturnFalse() \
  86. )
  87. #define R_INTC_GetExtInterruptStatus(a, b) \
  88. ( \
  89. ( (a) <= PDL_INTC_NMI ) ? \
  90. R_INTC_GetExtInterruptStatusAll( (a), (b) ) : \
  91. ReturnFalse() \
  92. )
  93. #define R_INTC_CreateFastInterrupt(a) \
  94. ( R_INTC_CreateFastInterruptAll( (a) ) )
  95. #define R_INTC_CreateExceptionHandlers(a, b, c) \
  96. ( R_INTC_CreateExceptionHandlersAll( (a), (b), (c) ) )
  97. #define R_INTC_Read(a, b) \
  98. ( R_INTC_ReadAll( (a), (b) ) )
  99. #define R_INTC_Write(a, b) \
  100. ( R_INTC_WriteAll( (a), (b) ) )
  101. #define R_INTC_Modify(a, b, c) \
  102. ( R_INTC_ModifyAll( (a), (b), (c) ) )
  103. #endif
  104. /* End of file */