gh_gdma.h 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. /*!
  2. *******************************************************************************
  3. **
  4. ** \file gh_gdma.h
  5. **
  6. ** \brief The Graphics DMA unit.
  7. **
  8. ** Copyright: 2012 - 2016 (C) GoKe Microelectronics
  9. **
  10. ** \attention THIS SAMPLE CODE IS PROVIDED AS IS. GOKE MICROELECTRONICS
  11. ** ACCEPTS NO RESPONSIBILITY OR LIABILITY FOR ANY ERRORS OR
  12. ** OMMISSIONS.
  13. **
  14. ** \note Do not modify this file as it is generated automatically.
  15. **
  16. ******************************************************************************/
  17. #ifndef _GH_GDMA_H
  18. #define _GH_GDMA_H
  19. #ifdef __LINUX__
  20. #include "reg4linux.h"
  21. #else
  22. #define FIO_ADDRESS(block,address) (address)
  23. #define FIO_MOFFSET(block,moffset) (moffset)
  24. #endif
  25. #ifndef __LINUX__
  26. #include "gtypes.h" /* global type definitions */
  27. #include "gh_lib_cfg.h" /* configuration */
  28. #endif
  29. #define GH_GDMA_ENABLE_DEBUG_PRINT 0
  30. #ifdef __LINUX__
  31. #define GH_GDMA_DEBUG_PRINT_FUNCTION printk
  32. #else
  33. #define GH_GDMA_DEBUG_PRINT_FUNCTION printf
  34. #endif
  35. #ifndef __LINUX__
  36. #if GH_GDMA_ENABLE_DEBUG_PRINT
  37. #include <stdio.h>
  38. #endif
  39. #endif
  40. /*----------------------------------------------------------------------------*/
  41. /* registers */
  42. /*----------------------------------------------------------------------------*/
  43. #define REG_GDMA_SOURCE1_BASE FIO_ADDRESS(GDMA,0x90015000) /* read/write */
  44. #define REG_GDMA_SOURCE1_PITCH FIO_ADDRESS(GDMA,0x90015004) /* read/write */
  45. #define REG_GDMA_SOURCE2_BASE FIO_ADDRESS(GDMA,0x90015008) /* read/write */
  46. #define REG_GDMA_SOURCE2_PITCH FIO_ADDRESS(GDMA,0x9001500C) /* read/write */
  47. #define REG_GDMA_DESTINATION_BASE FIO_ADDRESS(GDMA,0x90015010) /* read/write */
  48. #define REG_GDMA_DESTINATION_PITCH FIO_ADDRESS(GDMA,0x90015014) /* read/write */
  49. #define REG_GDMA_WIDTH FIO_ADDRESS(GDMA,0x90015018) /* read/write */
  50. #define REG_GDMA_HEIGHT FIO_ADDRESS(GDMA,0x9001501C) /* read/write */
  51. #define REG_GDMA_TRANSPARENT FIO_ADDRESS(GDMA,0x90015020) /* read/write */
  52. #define REG_GDMA_OPCODE FIO_ADDRESS(GDMA,0x90015024) /* read/write */
  53. #define REG_GDMA_NUM_PENDING_OPS FIO_ADDRESS(GDMA,0x90015028) /* read */
  54. /*----------------------------------------------------------------------------*/
  55. /* bit group structures */
  56. /*----------------------------------------------------------------------------*/
  57. /*----------------------------------------------------------------------------*/
  58. /* mirror variables */
  59. /*----------------------------------------------------------------------------*/
  60. #ifdef __cplusplus
  61. extern "C" {
  62. #endif
  63. /*----------------------------------------------------------------------------*/
  64. /* register GDMA_SOURCE1_BASE (read/write) */
  65. /*----------------------------------------------------------------------------*/
  66. /*! \brief Writes the register 'GDMA_SOURCE1_BASE'. */
  67. void GH_GDMA_set_SOURCE1_BASE(U32 data);
  68. /*! \brief Reads the register 'GDMA_SOURCE1_BASE'. */
  69. U32 GH_GDMA_get_SOURCE1_BASE(void);
  70. /*----------------------------------------------------------------------------*/
  71. /* register GDMA_SOURCE1_PITCH (read/write) */
  72. /*----------------------------------------------------------------------------*/
  73. /*! \brief Writes the register 'GDMA_SOURCE1_PITCH'. */
  74. void GH_GDMA_set_SOURCE1_PITCH(U32 data);
  75. /*! \brief Reads the register 'GDMA_SOURCE1_PITCH'. */
  76. U32 GH_GDMA_get_SOURCE1_PITCH(void);
  77. /*----------------------------------------------------------------------------*/
  78. /* register GDMA_SOURCE2_BASE (read/write) */
  79. /*----------------------------------------------------------------------------*/
  80. /*! \brief Writes the register 'GDMA_SOURCE2_BASE'. */
  81. void GH_GDMA_set_SOURCE2_BASE(U32 data);
  82. /*! \brief Reads the register 'GDMA_SOURCE2_BASE'. */
  83. U32 GH_GDMA_get_SOURCE2_BASE(void);
  84. /*----------------------------------------------------------------------------*/
  85. /* register GDMA_SOURCE2_PITCH (read/write) */
  86. /*----------------------------------------------------------------------------*/
  87. /*! \brief Writes the register 'GDMA_SOURCE2_PITCH'. */
  88. void GH_GDMA_set_SOURCE2_PITCH(U32 data);
  89. /*! \brief Reads the register 'GDMA_SOURCE2_PITCH'. */
  90. U32 GH_GDMA_get_SOURCE2_PITCH(void);
  91. /*----------------------------------------------------------------------------*/
  92. /* register GDMA_DESTINATION_BASE (read/write) */
  93. /*----------------------------------------------------------------------------*/
  94. /*! \brief Writes the register 'GDMA_DESTINATION_BASE'. */
  95. void GH_GDMA_set_DESTINATION_BASE(U32 data);
  96. /*! \brief Reads the register 'GDMA_DESTINATION_BASE'. */
  97. U32 GH_GDMA_get_DESTINATION_BASE(void);
  98. /*----------------------------------------------------------------------------*/
  99. /* register GDMA_DESTINATION_PITCH (read/write) */
  100. /*----------------------------------------------------------------------------*/
  101. /*! \brief Writes the register 'GDMA_DESTINATION_PITCH'. */
  102. void GH_GDMA_set_DESTINATION_PITCH(U32 data);
  103. /*! \brief Reads the register 'GDMA_DESTINATION_PITCH'. */
  104. U32 GH_GDMA_get_DESTINATION_PITCH(void);
  105. /*----------------------------------------------------------------------------*/
  106. /* register GDMA_WIDTH (read/write) */
  107. /*----------------------------------------------------------------------------*/
  108. /*! \brief Writes the register 'GDMA_WIDTH'. */
  109. void GH_GDMA_set_WIDTH(U32 data);
  110. /*! \brief Reads the register 'GDMA_WIDTH'. */
  111. U32 GH_GDMA_get_WIDTH(void);
  112. /*----------------------------------------------------------------------------*/
  113. /* register GDMA_HEIGHT (read/write) */
  114. /*----------------------------------------------------------------------------*/
  115. /*! \brief Writes the register 'GDMA_HEIGHT'. */
  116. void GH_GDMA_set_HEIGHT(U32 data);
  117. /*! \brief Reads the register 'GDMA_HEIGHT'. */
  118. U32 GH_GDMA_get_HEIGHT(void);
  119. /*----------------------------------------------------------------------------*/
  120. /* register GDMA_TRANSPARENT (read/write) */
  121. /*----------------------------------------------------------------------------*/
  122. /*! \brief Writes the register 'GDMA_TRANSPARENT'. */
  123. void GH_GDMA_set_TRANSPARENT(U32 data);
  124. /*! \brief Reads the register 'GDMA_TRANSPARENT'. */
  125. U32 GH_GDMA_get_TRANSPARENT(void);
  126. /*----------------------------------------------------------------------------*/
  127. /* register GDMA_OPCODE (read/write) */
  128. /*----------------------------------------------------------------------------*/
  129. /*! \brief Writes the register 'GDMA_OPCODE'. */
  130. void GH_GDMA_set_OPCODE(U32 data);
  131. /*! \brief Reads the register 'GDMA_OPCODE'. */
  132. U32 GH_GDMA_get_OPCODE(void);
  133. /*----------------------------------------------------------------------------*/
  134. /* register GDMA_NUM_PENDING_OPS (read) */
  135. /*----------------------------------------------------------------------------*/
  136. /*! \brief Reads the register 'GDMA_NUM_PENDING_OPS'. */
  137. U32 GH_GDMA_get_NUM_PENDING_OPS(void);
  138. /*----------------------------------------------------------------------------*/
  139. /* init function */
  140. /*----------------------------------------------------------------------------*/
  141. /*! \brief Initialises the registers and mirror variables. */
  142. void GH_GDMA_init(void);
  143. #ifdef SRC_INLINE
  144. #define SRC_INC 1
  145. #include "gh_gdma.c"
  146. #undef SRC_INC
  147. #endif
  148. #ifdef __cplusplus
  149. }
  150. #endif
  151. #endif /* _GH_GDMA_H */
  152. /*----------------------------------------------------------------------------*/
  153. /* end of file */
  154. /*----------------------------------------------------------------------------*/