r_pdl_exdmac_rx62nxx.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. /*""FILE COMMENT""*******************************************************
  2. * System Name : EXDMAC API for RX62Nxx
  3. * File Name : r_pdl_exdmac_RX62Nxx.h
  4. * Version : 1.02
  5. * Contents : EXDMAC 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_EXDMAC_RX62Nxx_H
  23. #define R_PDL_EXDMAC_RX62Nxx_H
  24. #define EXDMAC_CHANNELS 2
  25. /* Callback function storage */
  26. extern VoidCallBackFunc rpdl_EXDMAC_callback_func[];
  27. /* Library prototypes */
  28. bool R_EXDMAC_CreateAll(
  29. const uint8_t,
  30. const uint32_t,
  31. const uint16_t,
  32. const uint8_t,
  33. volatile const void * const,
  34. volatile const void * const,
  35. const uint16_t,
  36. const uint16_t,
  37. const int32_t,
  38. const uint32_t,
  39. const uint32_t,
  40. VoidCallBackFunc const,
  41. const uint8_t
  42. );
  43. bool R_EXDMAC_DestroyAll(
  44. const uint8_t
  45. );
  46. bool R_EXDMAC_ControlAll(
  47. const uint8_t,
  48. const uint16_t,
  49. volatile const void * const,
  50. volatile const void * const,
  51. const uint16_t,
  52. const uint16_t,
  53. const int32_t,
  54. const uint32_t,
  55. const uint32_t
  56. );
  57. bool R_EXDMAC_GetStatusAll(
  58. const uint8_t,
  59. volatile uint8_t * const,
  60. volatile uint32_t * const,
  61. volatile uint32_t * const,
  62. volatile uint16_t * const,
  63. volatile uint16_t * const
  64. );
  65. bool ReturnFalse(void);
  66. /* Macro definitions */
  67. #define R_EXDMAC_Create(a, b, c, d, e, f, g, h, i, j, k, l, m) \
  68. ( \
  69. ( ( ((a) < EXDMAC_CHANNELS ) && ((m) <= IPL_MAX) ) ) ? \
  70. R_EXDMAC_CreateAll( (a), (b), (c), (d), (e), (f), (g), (h), (i), (j), (k), (l), (m) ) : \
  71. ReturnFalse() \
  72. )
  73. #define R_EXDMAC_Control(a, b, c, d, e, f, g, h, i) \
  74. ( \
  75. ( ((a) < EXDMAC_CHANNELS) ) ? \
  76. R_EXDMAC_ControlAll( (a), (b), (c), (d), (e), (f), (g), (h), (i) ) : \
  77. ReturnFalse() \
  78. )
  79. #define R_EXDMAC_GetStatus(a, b, c, d, e, f) \
  80. ( \
  81. ( ((a) < EXDMAC_CHANNELS) ) ? \
  82. R_EXDMAC_GetStatusAll( (a), (b), (c), (d), (e), (f) ) : \
  83. ReturnFalse() \
  84. )
  85. #define R_EXDMAC_Destroy(a) \
  86. ( \
  87. ( ((a) < EXDMAC_CHANNELS) ) ? \
  88. R_EXDMAC_DestroyAll( (a) ) : \
  89. ReturnFalse() \
  90. )
  91. #endif
  92. /* End of file */