ft8xx_memory.h 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. /*
  2. * Copyright (c) 2020 Hubert Miś
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /**
  7. * @file
  8. * @brief FT8XX memory map
  9. */
  10. #ifndef ZEPHYR_DRIVERS_MISC_FT8XX_FT8XX_MEMORY_H_
  11. #define ZEPHYR_DRIVERS_MISC_FT8XX_FT8XX_MEMORY_H_
  12. #ifdef __cplusplus
  13. extern "C" {
  14. #endif
  15. /**
  16. * @brief FT8xx memory addresses
  17. * @defgroup ft8xx_memory FT8xx memory map
  18. * @ingroup ft8xx_interface
  19. * @{
  20. */
  21. /** Main parts of FT800 memory map */
  22. enum ft800_memory_map_t {
  23. FT800_RAM_G = 0x000000,
  24. FT800_ROM_CHIPID = 0x0C0000,
  25. FT800_ROM_FONT = 0x0BB23C,
  26. FT800_ROM_FONT_ADDR = 0x0FFFFC,
  27. FT800_RAM_DL = 0x100000,
  28. FT800_RAM_PAL = 0x102000,
  29. FT800_REG_ = 0x102400,
  30. FT800_RAM_CMD = 0x108000
  31. };
  32. /** Main parts of FT810 memory map */
  33. enum ft810_memory_map_t {
  34. FT810_RAM_G = 0x000000,
  35. FT810_RAM_DL = 0x300000,
  36. FT810_REG_ = 0x302000,
  37. FT810_RAM_CMD = 0x308000
  38. };
  39. /** FT800 register addresses */
  40. enum ft800_register_address_t {
  41. FT800_REG_ID = 0x102400,
  42. FT800_REG_FRAMES = 0x102404,
  43. FT800_REG_CLOCK = 0x102408,
  44. FT800_REG_FREQUENCY = 0x10240C,
  45. FT800_REG_RENDERMODE = 0x102410,
  46. FT800_REG_SNAPY = 0x102414,
  47. FT800_REG_SNAPSHOT = 0x102418,
  48. FT800_REG_CPURESET = 0x10241C,
  49. FT800_REG_TAP_CRC = 0x102420,
  50. FT800_REG_TAP_MASK = 0x102424,
  51. FT800_REG_HCYCLE = 0x102428,
  52. FT800_REG_HOFFSET = 0x10242C,
  53. FT800_REG_HSIZE = 0x102430,
  54. FT800_REG_HSYNC0 = 0x102434,
  55. FT800_REG_HSYNC1 = 0x102438,
  56. FT800_REG_VCYCLE = 0x10243C,
  57. FT800_REG_VOFFSET = 0x102440,
  58. FT800_REG_VSIZE = 0x102444,
  59. FT800_REG_VSYNC0 = 0x102448,
  60. FT800_REG_VSYNC1 = 0x10244C,
  61. FT800_REG_DLSWAP = 0x102450,
  62. FT800_REG_ROTATE = 0x102454,
  63. FT800_REG_OUTBITS = 0x102458,
  64. FT800_REG_DITHER = 0x10245C,
  65. FT800_REG_SWIZZLE = 0x102460,
  66. FT800_REG_CSPREAD = 0x102464,
  67. FT800_REG_PCLK_POL = 0x102468,
  68. FT800_REG_PCLK = 0x10246C,
  69. FT800_REG_TAG_X = 0x102470,
  70. FT800_REG_TAG_Y = 0x102474,
  71. FT800_REG_TAG = 0x102478,
  72. FT800_REG_VOL_PB = 0x10247C,
  73. FT800_REG_VOL_SOUND = 0x102480,
  74. FT800_REG_SOUND = 0x102484,
  75. FT800_REG_PLAY = 0x102488,
  76. FT800_REG_GPIO_DIR = 0x10248C,
  77. FT800_REG_GPIO = 0x102490,
  78. FT800_REG_INT_FLAGS = 0x102498,
  79. FT800_REG_INT_EN = 0x10249C,
  80. FT800_REG_INT_MASK = 0x1024A0,
  81. FT800_REG_PLAYBACK_START = 0x1024A4,
  82. FT800_REG_PLAYBACK_LENGTH = 0x1024A8,
  83. FT800_REG_PLAYBACK_READPTR = 0x1024AC,
  84. FT800_REG_PLAYBACK_FREQ = 0x1024B0,
  85. FT800_REG_PLAYBACK_FORMAT = 0x1024B4,
  86. FT800_REG_PLAYBACK_LOOP = 0x1024B8,
  87. FT800_REG_PLAYBACK_PLAY = 0x1024BC,
  88. FT800_REG_PWM_HZ = 0x1024C0,
  89. FT800_REG_PWM_DUTY = 0x1024C4,
  90. FT800_REG_MACRO_0 = 0x1024C8,
  91. FT800_REG_MACRO_1 = 0x1024CC,
  92. FT800_REG_CMD_READ = 0x1024E4,
  93. FT800_REG_CMD_WRITE = 0x1024E8,
  94. FT800_REG_CMD_DL = 0x1024EC,
  95. FT800_REG_TOUCH_MODE = 0x1024F0,
  96. FT800_REG_TOUCH_ADC_MODE = 0x1024F4,
  97. FT800_REG_TOUCH_CHARGE = 0x1024F8,
  98. FT800_REG_TOUCH_SETTLE = 0x1024FC,
  99. FT800_REG_TOUCH_OVERSAMPLE = 0x102500,
  100. FT800_REG_TOUCH_RZTHRESH = 0x102504,
  101. FT800_REG_TOUCH_RAW_XY = 0x102508,
  102. FT800_REG_TOUCH_RZ = 0x10250C,
  103. FT800_REG_TOUCH_SCREEN_XY = 0x102510,
  104. FT800_REG_TOUCH_TAG_XY = 0x102514,
  105. FT800_REG_TOUCH_TAG = 0x102518,
  106. FT800_REG_TOUCH_TRANSFORM_A = 0x10251C,
  107. FT800_REG_TOUCH_TRANSFORM_B = 0x102520,
  108. FT800_REG_TOUCH_TRANSFORM_C = 0x102524,
  109. FT800_REG_TOUCH_TRANSFORM_D = 0x102528,
  110. FT800_REG_TOUCH_TRANSFORM_E = 0x10252C,
  111. FT800_REG_TOUCH_TRANSFORM_F = 0x102530,
  112. FT800_REG_TOUCH_DIRECT_XY = 0x102574,
  113. FT800_REG_TOUCH_DIRECT_Z1Z2 = 0x102578,
  114. FT800_REG_TRACKER = 0x109000
  115. };
  116. /** FT810 register addresses */
  117. enum ft810_register_address_t {
  118. FT810_REG_TRIM = 0x10256C,
  119. FT810_REG_ID = 0x302000,
  120. FT810_REG_FRAMES = 0x302004,
  121. FT810_REG_CLOCK = 0x302008,
  122. FT810_REG_FREQUENCY = 0x30200C,
  123. FT810_REG_RENDERMODE = 0x302010,
  124. FT810_REG_SNAPY = 0x302014,
  125. FT810_REG_SNAPSHOT = 0x302018,
  126. FT810_REG_CPURESET = 0x302020,
  127. FT810_REG_TAP_CRC = 0x302020,
  128. FT810_REG_TAP_MASK = 0x302024,
  129. FT810_REG_HCYCLE = 0x30202C,
  130. FT810_REG_HOFFSET = 0x302030,
  131. FT810_REG_HSIZE = 0x302034,
  132. FT810_REG_HSYNC0 = 0x302038,
  133. FT810_REG_HSYNC1 = 0x30203C,
  134. FT810_REG_VCYCLE = 0x302040,
  135. FT810_REG_VOFFSET = 0x302044,
  136. FT810_REG_VSIZE = 0x302048,
  137. FT810_REG_VSYNC0 = 0x30204C,
  138. FT810_REG_VSYNC1 = 0x302050,
  139. FT810_REG_DLSWAP = 0x302054,
  140. FT810_REG_ROTATE = 0x302058,
  141. FT810_REG_OUTBITS = 0x30205C,
  142. FT810_REG_DITHER = 0x302060,
  143. FT810_REG_SWIZZLE = 0x302064,
  144. FT810_REG_CSPREAD = 0x302068,
  145. FT810_REG_PCLK_POL = 0x30206C,
  146. FT810_REG_PCLK = 0x302070,
  147. FT810_REG_TAG_X = 0x302074,
  148. FT810_REG_TAG_Y = 0x302078,
  149. FT810_REG_TAG = 0x30207C,
  150. FT810_REG_VOL_PB = 0x302080,
  151. FT810_REG_VOL_SOUND = 0x302084,
  152. FT810_REG_SOUND = 0x302088,
  153. FT810_REG_PLAY = 0x30208C,
  154. FT810_REG_GPIO_DIR = 0x302090,
  155. FT810_REG_GPIO = 0x302094,
  156. FT810_REG_GPIOX_DIR = 0x302098,
  157. FT810_REG_GPIOX = 0x30209C,
  158. FT810_REG_INT_FLAGS = 0x3020A8,
  159. FT810_REG_INT_EN = 0x3020AC,
  160. FT810_REG_INT_MASK = 0x3020B0,
  161. FT810_REG_PLAYBACK_START = 0x3020B4,
  162. FT810_REG_PLAYBACK_LENGTH = 0x3020B8,
  163. FT810_REG_PLAYBACK_READPTR = 0x3020BC,
  164. FT810_REG_PLAYBACK_FREQ = 0x3020C0,
  165. FT810_REG_PLAYBACK_FORMAT = 0x3020C4,
  166. FT810_REG_PLAYBACK_LOOP = 0x3020C8,
  167. FT810_REG_PLAYBACK_PLAY = 0x3020CC,
  168. FT810_REG_PWM_HZ = 0x3020D0,
  169. FT810_REG_PWM_DUTY = 0x3020D4,
  170. FT810_REG_CMD_READ = 0x3020F8,
  171. FT810_REG_CMD_WRITE = 0x3020FC,
  172. FT810_REG_CMD_DL = 0x302100,
  173. FT810_REG_TOUCH_MODE = 0x302104,
  174. FT810_REG_TOUCH_ADC_MODE = 0x302108,
  175. FT810_REG_TOUCH_CHARGE = 0x30210C,
  176. FT810_REG_TOUCH_SETTLE = 0x302110,
  177. FT810_REG_TOUCH_OVERSAMPLE = 0x302114,
  178. FT810_REG_TOUCH_RZTHRESH = 0x302118,
  179. FT810_REG_TOUCH_RAW_XY = 0x30211C,
  180. FT810_REG_TOUCH_RZ = 0x302120,
  181. FT810_REG_TOUCH_SCREEN_XY = 0x302124,
  182. FT810_REG_TOUCH_TAG_XY = 0x302128,
  183. FT810_REG_TOUCH_TAG = 0x30212C,
  184. FT810_REG_TOUCH_TRANSFORM_A = 0x302150,
  185. FT810_REG_TOUCH_TRANSFORM_B = 0x302154,
  186. FT810_REG_TOUCH_TRANSFORM_C = 0x302158,
  187. FT810_REG_TOUCH_TRANSFORM_D = 0x30215C,
  188. FT810_REG_TOUCH_TRANSFORM_E = 0x302160,
  189. FT810_REG_TOUCH_TRANSFORM_F = 0x302164,
  190. FT810_REG_TOUCH_CONFIG = 0x302168,
  191. FT810_REG_SPI_WIDTH = 0x302180,
  192. FT810_REG_TOUCH_DIRECT_XY = 0x30218C,
  193. FT810_REG_TOUCH_DIRECT_Z1Z2 = 0x302190,
  194. FT810_REG_CMDB_SPACE = 0x302574,
  195. FT810_REG_CMDB_WRITE = 0x302578,
  196. FT810_REG_TRACKER = 0x309000,
  197. FT810_REG_TRACKER1 = 0x309004,
  198. FT810_REG_TRACKER2 = 0x309008,
  199. FT810_REG_TRACKER3 = 0x30900C,
  200. FT810_REG_TRACKER4 = 0x309010,
  201. FT810_REG_MEDIAFIFO_READ = 0x309014,
  202. FT810_REG_MEDIAFIFO_WRITE = 0x309018,
  203. };
  204. /**
  205. * @}
  206. */
  207. #ifdef __cplusplus
  208. }
  209. #endif
  210. #endif /* ZEPHYR_DRIVERS_MISC_FT8XX_FT8XX_MEMORY_H_ */