gh_vo_dac.h 8.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. /*!
  2. *******************************************************************************
  3. **
  4. ** \file gh_vo_dac.h
  5. **
  6. ** \brief VDAC Registers.
  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_VO_DAC_H
  18. #define _GH_VO_DAC_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_VO_DAC_ENABLE_DEBUG_PRINT 0
  30. #ifdef __LINUX__
  31. #define GH_VO_DAC_DEBUG_PRINT_FUNCTION printk
  32. #else
  33. #define GH_VO_DAC_DEBUG_PRINT_FUNCTION printf
  34. #endif
  35. #ifndef __LINUX__
  36. #if GH_VO_DAC_ENABLE_DEBUG_PRINT
  37. #include <stdio.h>
  38. #endif
  39. #endif
  40. /*----------------------------------------------------------------------------*/
  41. /* registers */
  42. /*----------------------------------------------------------------------------*/
  43. #define REG_VO_DAC_EN_IDAC_X FIO_ADDRESS(VO_DAC,0x90022680) /* read/write */
  44. #define REG_VO_DAC_MODE_SD FIO_ADDRESS(VO_DAC,0x90022681) /* read/write */
  45. #define REG_VO_DAC_IDAC_IHALF_SD FIO_ADDRESS(VO_DAC,0x90022682) /* read/write */
  46. #define REG_VO_DAC_GCR_LEVEL FIO_ADDRESS(VO_DAC,0x90022684) /* read/write */
  47. #define REG_VO_DAC_IDA_IQUART_SD FIO_ADDRESS(VO_DAC,0x90022685) /* read/write */
  48. #define REG_VO_DAC_GCR_IDAC_GAINX FIO_ADDRESS(VO_DAC,0x90022686) /* read/write */
  49. /*----------------------------------------------------------------------------*/
  50. /* bit group structures */
  51. /*----------------------------------------------------------------------------*/
  52. typedef union { /* VO_DAC_EN_IDAC_X */
  53. U8 all;
  54. struct {
  55. U8 enable : 1;
  56. U8 : 7;
  57. } bitc;
  58. } GH_VO_DAC_EN_IDAC_X_S;
  59. typedef union { /* VO_DAC_MODE_SD */
  60. U8 all;
  61. struct {
  62. U8 mode : 1;
  63. U8 : 7;
  64. } bitc;
  65. } GH_VO_DAC_MODE_SD_S;
  66. typedef union { /* VO_DAC_IDAC_IHALF_SD */
  67. U8 all;
  68. struct {
  69. U8 half : 1;
  70. U8 : 7;
  71. } bitc;
  72. } GH_VO_DAC_IDAC_IHALF_SD_S;
  73. typedef union { /* VO_DAC_GCR_LEVEL */
  74. U8 all;
  75. struct {
  76. U8 level : 2;
  77. U8 : 6;
  78. } bitc;
  79. } GH_VO_DAC_GCR_LEVEL_S;
  80. typedef union { /* VO_DAC_IDA_IQUART_SD */
  81. U8 all;
  82. struct {
  83. U8 quart : 1;
  84. U8 : 7;
  85. } bitc;
  86. } GH_VO_DAC_IDA_IQUART_SD_S;
  87. typedef union { /* VO_DAC_GCR_IDAC_GAINX */
  88. U8 all;
  89. struct {
  90. U8 gain : 7;
  91. U8 : 1;
  92. } bitc;
  93. } GH_VO_DAC_GCR_IDAC_GAINX_S;
  94. /*----------------------------------------------------------------------------*/
  95. /* mirror variables */
  96. /*----------------------------------------------------------------------------*/
  97. #ifdef __cplusplus
  98. extern "C" {
  99. #endif
  100. /*----------------------------------------------------------------------------*/
  101. /* register VO_DAC_EN_IDAC_X (read/write) */
  102. /*----------------------------------------------------------------------------*/
  103. /*! \brief Writes the register 'VO_DAC_EN_IDAC_X'. */
  104. void GH_VO_DAC_set_EN_IDAC_X(U8 data);
  105. /*! \brief Reads the register 'VO_DAC_EN_IDAC_X'. */
  106. U8 GH_VO_DAC_get_EN_IDAC_X(void);
  107. /*! \brief Writes the bit group 'enable' of register 'VO_DAC_EN_IDAC_X'. */
  108. void GH_VO_DAC_set_EN_IDAC_X_enable(U8 data);
  109. /*! \brief Reads the bit group 'enable' of register 'VO_DAC_EN_IDAC_X'. */
  110. U8 GH_VO_DAC_get_EN_IDAC_X_enable(void);
  111. /*----------------------------------------------------------------------------*/
  112. /* register VO_DAC_MODE_SD (read/write) */
  113. /*----------------------------------------------------------------------------*/
  114. /*! \brief Writes the register 'VO_DAC_MODE_SD'. */
  115. void GH_VO_DAC_set_MODE_SD(U8 data);
  116. /*! \brief Reads the register 'VO_DAC_MODE_SD'. */
  117. U8 GH_VO_DAC_get_MODE_SD(void);
  118. /*! \brief Writes the bit group 'mode' of register 'VO_DAC_MODE_SD'. */
  119. void GH_VO_DAC_set_MODE_SD_mode(U8 data);
  120. /*! \brief Reads the bit group 'mode' of register 'VO_DAC_MODE_SD'. */
  121. U8 GH_VO_DAC_get_MODE_SD_mode(void);
  122. /*----------------------------------------------------------------------------*/
  123. /* register VO_DAC_IDAC_IHALF_SD (read/write) */
  124. /*----------------------------------------------------------------------------*/
  125. /*! \brief Writes the register 'VO_DAC_IDAC_IHALF_SD'. */
  126. void GH_VO_DAC_set_IDAC_IHALF_SD(U8 data);
  127. /*! \brief Reads the register 'VO_DAC_IDAC_IHALF_SD'. */
  128. U8 GH_VO_DAC_get_IDAC_IHALF_SD(void);
  129. /*! \brief Writes the bit group 'half' of register 'VO_DAC_IDAC_IHALF_SD'. */
  130. void GH_VO_DAC_set_IDAC_IHALF_SD_half(U8 data);
  131. /*! \brief Reads the bit group 'half' of register 'VO_DAC_IDAC_IHALF_SD'. */
  132. U8 GH_VO_DAC_get_IDAC_IHALF_SD_half(void);
  133. /*----------------------------------------------------------------------------*/
  134. /* register VO_DAC_GCR_LEVEL (read/write) */
  135. /*----------------------------------------------------------------------------*/
  136. /*! \brief Writes the register 'VO_DAC_GCR_LEVEL'. */
  137. void GH_VO_DAC_set_GCR_LEVEL(U8 data);
  138. /*! \brief Reads the register 'VO_DAC_GCR_LEVEL'. */
  139. U8 GH_VO_DAC_get_GCR_LEVEL(void);
  140. /*! \brief Writes the bit group 'level' of register 'VO_DAC_GCR_LEVEL'. */
  141. void GH_VO_DAC_set_GCR_LEVEL_level(U8 data);
  142. /*! \brief Reads the bit group 'level' of register 'VO_DAC_GCR_LEVEL'. */
  143. U8 GH_VO_DAC_get_GCR_LEVEL_level(void);
  144. /*----------------------------------------------------------------------------*/
  145. /* register VO_DAC_IDA_IQUART_SD (read/write) */
  146. /*----------------------------------------------------------------------------*/
  147. /*! \brief Writes the register 'VO_DAC_IDA_IQUART_SD'. */
  148. void GH_VO_DAC_set_IDA_IQUART_SD(U8 data);
  149. /*! \brief Reads the register 'VO_DAC_IDA_IQUART_SD'. */
  150. U8 GH_VO_DAC_get_IDA_IQUART_SD(void);
  151. /*! \brief Writes the bit group 'quart' of register 'VO_DAC_IDA_IQUART_SD'. */
  152. void GH_VO_DAC_set_IDA_IQUART_SD_quart(U8 data);
  153. /*! \brief Reads the bit group 'quart' of register 'VO_DAC_IDA_IQUART_SD'. */
  154. U8 GH_VO_DAC_get_IDA_IQUART_SD_quart(void);
  155. /*----------------------------------------------------------------------------*/
  156. /* register VO_DAC_GCR_IDAC_GAINX (read/write) */
  157. /*----------------------------------------------------------------------------*/
  158. /*! \brief Writes the register 'VO_DAC_GCR_IDAC_GAINX'. */
  159. void GH_VO_DAC_set_GCR_IDAC_GAINX(U8 data);
  160. /*! \brief Reads the register 'VO_DAC_GCR_IDAC_GAINX'. */
  161. U8 GH_VO_DAC_get_GCR_IDAC_GAINX(void);
  162. /*! \brief Writes the bit group 'gain' of register 'VO_DAC_GCR_IDAC_GAINX'. */
  163. void GH_VO_DAC_set_GCR_IDAC_GAINX_gain(U8 data);
  164. /*! \brief Reads the bit group 'gain' of register 'VO_DAC_GCR_IDAC_GAINX'. */
  165. U8 GH_VO_DAC_get_GCR_IDAC_GAINX_gain(void);
  166. /*----------------------------------------------------------------------------*/
  167. /* init function */
  168. /*----------------------------------------------------------------------------*/
  169. /*! \brief Initialises the registers and mirror variables. */
  170. void GH_VO_DAC_init(void);
  171. #ifdef SRC_INLINE
  172. #define SRC_INC 1
  173. #include "gh_vo_dac.c"
  174. #undef SRC_INC
  175. #endif
  176. #ifdef __cplusplus
  177. }
  178. #endif
  179. #endif /* _GH_VO_DAC_H */
  180. /*----------------------------------------------------------------------------*/
  181. /* end of file */
  182. /*----------------------------------------------------------------------------*/