r_pdl_dmac_rx62nxx.h 2.2 KB

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