r_pdl_exdmac.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. /*""FILE COMMENT""*******************************************************
  2. * System Name : EXDMAC API for RX62Nxx
  3. * File Name : r_pdl_exdmac.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_H
  23. #define R_PDL_EXDMAC_H
  24. #include "r_pdl_common_defs_RX62Nxx.h"
  25. /* Function prototypes */
  26. bool R_EXDMAC_Create(
  27. uint8_t,
  28. uint32_t,
  29. uint16_t,
  30. uint8_t,
  31. void *,
  32. void *,
  33. uint16_t,
  34. uint16_t,
  35. int32_t,
  36. uint32_t,
  37. uint32_t,
  38. void *,
  39. uint8_t
  40. );
  41. bool R_EXDMAC_Destroy(
  42. uint8_t
  43. );
  44. bool R_EXDMAC_Control(
  45. uint8_t,
  46. uint16_t,
  47. void *,
  48. void *,
  49. uint16_t,
  50. uint16_t,
  51. int32_t,
  52. uint32_t,
  53. uint32_t
  54. );
  55. bool R_EXDMAC_GetStatus(
  56. uint8_t,
  57. uint8_t *,
  58. uint32_t *,
  59. uint32_t *,
  60. uint16_t *,
  61. uint16_t *
  62. );
  63. /* Transfer mode selection */
  64. #define PDL_EXDMAC_NORMAL 0x00000001ul
  65. #define PDL_EXDMAC_REPEAT 0x00000002ul
  66. #define PDL_EXDMAC_BLOCK 0x00000004ul
  67. #define PDL_EXDMAC_CLUSTER 0x00000008ul
  68. #define PDL_EXDMAC_SOURCE 0x00000010ul
  69. #define PDL_EXDMAC_DESTINATION 0x00000020ul
  70. /* Address addition direction selection */
  71. #define PDL_EXDMAC_SOURCE_ADDRESS_FIXED 0x00000040ul
  72. #define PDL_EXDMAC_SOURCE_ADDRESS_PLUS 0x00000080ul
  73. #define PDL_EXDMAC_SOURCE_ADDRESS_MINUS 0x00000100ul
  74. #define PDL_EXDMAC_SOURCE_ADDRESS_OFFSET 0x00000200ul
  75. #define PDL_EXDMAC_DESTINATION_ADDRESS_FIXED 0x00000400ul
  76. #define PDL_EXDMAC_DESTINATION_ADDRESS_PLUS 0x00000800ul
  77. #define PDL_EXDMAC_DESTINATION_ADDRESS_MINUS 0x00001000ul
  78. #define PDL_EXDMAC_DESTINATION_ADDRESS_OFFSET 0x00002000ul
  79. /* Address mode selection */
  80. #define PDL_EXDMAC_ADDRESS_MODE_READ 0x00004000ul
  81. #define PDL_EXDMAC_ADDRESS_MODE_WRITE 0x00008000ul
  82. #define PDL_EXDMAC_ADDRESS_MODE_DUAL 0x00010000ul
  83. /* Transfer data size */
  84. #define PDL_EXDMAC_SIZE_8 0x00020000ul
  85. #define PDL_EXDMAC_SIZE_16 0x00040000ul
  86. #define PDL_EXDMAC_SIZE_32 0x00080000ul
  87. /* Pin selection */
  88. #define PDL_EXDMAC_PIN_A 0x0001u
  89. #define PDL_EXDMAC_PIN_B 0x0002u
  90. #define PDL_EXDMAC_PIN_C 0x0004u
  91. /* EDACKn pin output control */
  92. #define PDL_EXDMAC_EDACK_DISABLE 0x0008u
  93. #define PDL_EXDMAC_EDACK_LOW 0x0010u
  94. #define PDL_EXDMAC_EDACK_HIGH 0x0020u
  95. #define PDL_EXDMAC_EDACK_SYNC 0x0040u
  96. #define PDL_EXDMAC_EDACK_WAIT 0x0080u
  97. /* Trigger selection */
  98. #define PDL_EXDMAC_TRIGGER_SW 0x0100u
  99. #define PDL_EXDMAC_TRIGGER_RISING 0x0200u
  100. #define PDL_EXDMAC_TRIGGER_FALLING 0x0400u
  101. #define PDL_EXDMAC_TRIGGER_LOW 0x0800u
  102. #define PDL_EXDMAC_TRIGGER_MTU1 0x1000u
  103. /* Interrupt generation */
  104. #define PDL_EXDMAC_IRQ_END 0x01u
  105. #define PDL_EXDMAC_IRQ_ESCAPE_END 0x02u
  106. #define PDL_EXDMAC_IRQ_REPEAT_SIZE_END 0x04u
  107. #define PDL_EXDMAC_IRQ_EXT_SOURCE 0x08u
  108. #define PDL_EXDMAC_IRQ_EXT_DESTINATION 0x10u
  109. /* DTC trigger control */
  110. #define PDL_EXDMAC_DTC_TRIGGER_DISABLE 0x20u
  111. #define PDL_EXDMAC_DTC_TRIGGER_ENABLE 0x40u
  112. /* Enable / suspend control */
  113. #define PDL_EXDMAC_ENABLE 0x0001u
  114. #define PDL_EXDMAC_SUSPEND 0x0002u
  115. /* Software trigger control */
  116. #define PDL_EXDMAC_START 0x0004u
  117. #define PDL_EXDMAC_START_RUN 0x0008u
  118. #define PDL_EXDMAC_STOP 0x0010u
  119. /* Transfer end interrupt flag control */
  120. #define PDL_EXDMAC_CLEAR_DTIF 0x0020u
  121. #define PDL_EXDMAC_CLEAR_ESIF 0x0040u
  122. /* Modify registers selection */
  123. #define PDL_EXDMAC_UPDATE_SOURCE 0x0080u
  124. #define PDL_EXDMAC_UPDATE_DESTINATION 0x0100u
  125. #define PDL_EXDMAC_UPDATE_COUNT 0x0200u
  126. #define PDL_EXDMAC_UPDATE_SIZE 0x0400u
  127. #define PDL_EXDMAC_UPDATE_OFFSET 0x0800u
  128. #define PDL_EXDMAC_UPDATE_REPEAT_SOURCE 0x1000u
  129. #define PDL_EXDMAC_UPDATE_REPEAT_DESTINATION 0x2000u
  130. #endif
  131. /* End of file */