t_bt_3ds.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. #ifndef __T_BT_3DS_H_
  2. #define __T_BT_3DS_H_
  3. //#include "..\..\includes\types.h"
  4. #include "include.h"
  5. #include "gpio.h"
  6. #include "t_types.h"
  7. #define BASE_BT_3DS_PTR \
  8. ((HW_BT_3DS*)0x00f00800)
  9. typedef union HW_3DS_PWMU{
  10. uint32 d[3];
  11. struct{
  12. uint32 _3dg_start:22;
  13. uint32 :10;
  14. uint32 _3dg_mid:22;
  15. uint32 :10;
  16. uint32 _3dg_end:22;
  17. uint32 :10;
  18. };
  19. }HW_3DS_PWMU;
  20. typedef struct HW_BT_3DS{
  21. union{
  22. uint32 REG_0x0;
  23. struct{
  24. uint32 bt_3dd_en:1;
  25. // 3D displayer (Tx) synchronizer enable
  26. uint32 bt_3dg_en:1;
  27. // 3D glass (Rx) PWM function enable
  28. uint32 :1;
  29. uint32 tsync_acc_cal:1;
  30. //Frame Tsync accumulating calculation enable
  31. uint32 frame_cap_int_ena:1;
  32. // 3DD frame sync captured interrupt enable
  33. uint32 frame_acc_int_ena:1;
  34. // 3DD frame sync period accumated interrupt enable
  35. uint32 tsync_cin_int_ena:1;
  36. // 3DG frame period fraction carry-in interrupt enable
  37. uint32 frame_pwm_int_ena:1;
  38. //Reserved
  39. uint32 pwm0_en:1;
  40. //PWM0 enable
  41. uint32 pwm1_en:1;
  42. //PWM1 enable
  43. uint32 pwm2_en:1;
  44. //PWM2 enable
  45. uint32 pwm3_en:1;
  46. //PWM3 enable
  47. uint32 pwm0_start_set:1;
  48. //PWM0 wave start level set. 0=Low level. 1=High level.
  49. uint32 pwm1_start_set:1;
  50. //PWM1 wave start level set. 0=Low level. 1=High level.
  51. uint32 pwm2_start_set:1;
  52. //PWM2 wave start level set. 0=Low level. 1=High level.
  53. uint32 pwm3_start_set:1;
  54. //PWM3 wave start level set. 0=Low level. 1=High level.
  55. uint32 :16;
  56. };
  57. };
  58. union{
  59. uint32 REG_0x1;
  60. struct{
  61. uint32 frame_cap_int:1;
  62. //Frame Sync Capture Interrupt Status. Write 1 to clear.
  63. uint32 frame_acc_int:1;
  64. //Frame Accumulation Interrupt Status. Write 1 to clear.
  65. uint32 tsync_cin_int:1;
  66. //Tsync Carry-In Interrupt Status. Write 1 to clear.
  67. uint32 frame_pwm_int:1;
  68. //Frame PWM Tsync Arriving Interrupt Status. Write 1 to clear.
  69. uint32 :28;
  70. };
  71. };
  72. union{
  73. uint32 REG_0x2;
  74. struct{
  75. uint32 frame_sync_btclk:4;
  76. //No description
  77. uint32 :28;
  78. };
  79. };
  80. union{
  81. uint32 REG_0x3;
  82. struct{
  83. uint32 frame_sync_phase:16;
  84. //No description
  85. uint32 :16;
  86. };
  87. };
  88. union{
  89. uint32 REG_0x4;
  90. struct{
  91. uint32 frame_sync_neg:22;
  92. //No description
  93. uint32 :10;
  94. };
  95. };
  96. union{
  97. uint32 REG_0x5;
  98. struct{
  99. uint32 frame_tsync_acc:27;
  100. //No description
  101. uint32 :5;
  102. };
  103. };
  104. union{
  105. uint32 REG_0x6;
  106. struct{
  107. uint32 frame_tsync_tx:22;
  108. //No description
  109. uint32 :10;
  110. };
  111. };
  112. uint32 REG_0x7;
  113. uint32 REG_0x8;
  114. uint32 REG_0x9;
  115. uint32 REG_0xA;
  116. uint32 REG_0xB;
  117. uint32 REG_0xC;
  118. uint32 REG_0xD;
  119. uint32 REG_0xE;
  120. uint32 REG_0xF;
  121. union{
  122. uint32 REG_0x10;
  123. struct{
  124. uint32 reg_3dg_frame_btclk:28;
  125. //No description
  126. uint32 :4;
  127. };
  128. };
  129. union{
  130. uint32 REG_0x11;
  131. struct{
  132. uint32 reg_3dg_frame_phase:16;
  133. //No description
  134. uint32 :16;
  135. };
  136. };
  137. union{
  138. uint32 REG_0x12;
  139. struct{
  140. uint32 reg_3dg_frame_tsync:16;
  141. //No description
  142. uint32 :16;
  143. };
  144. };
  145. union{
  146. uint32 REG_0x13;
  147. struct{
  148. uint32 reg_3dg_frame_frac:8;
  149. //No description
  150. uint32 :24;
  151. };
  152. };
  153. HW_3DS_PWMU pwms[4];
  154. }HW_BT_3DS;
  155. #endif