ab32vg1.h 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346
  1. /*
  2. * Copyright (c) 2020-2020, BLUETRUM Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #ifndef AB32VG1_H__
  7. #define AB32VG1_H__
  8. #ifndef __ASSEMBLER__
  9. #include <stdint.h>
  10. #include "system_ab32vgx.h"
  11. /*!< Interrupt Number Definition */
  12. typedef enum
  13. {
  14. IRQ_SW_VECTOR = 2,
  15. IRQ_TMR0_VECTOR = 3,
  16. IRQ_TMR1_VECTOR = 4,
  17. IRQ_TMR2_4_5_VECTOR = 5, /*!< Timer 2, 4 and 5 Interrupt */
  18. IRQ_IRRX_VECTOR = 6, /*!< Timer 3 and IR receiver Interrupt */
  19. IRQ_USB_VECTOR = 7,
  20. IRQ_SD_VECTOR = 8,
  21. IRQ_AUBUF0_1_VECTOR = 9, /*!< Audio buffer 0 and 1 Interrupt */
  22. IRQ_SDADC_VECTOR = 10,
  23. IRQ_AUDEC_VECTOR = 11, /*!< Audio codec, SBC encode and AEC FFT Interrupt */
  24. IRQ_SRC_VECTOR = 12, /*!< SRC, PLC and CVSD Interrupt */
  25. IRQ_FM_SPDIF_VECTOR = 13, /*!< FM TX, RX and SPDIF RX Interrupt */
  26. IRQ_UART0_2_VECTOR = 14, /*!< UART 0 to 2 Interrupt */
  27. IRQ_HSUART_VECTOR = 15,
  28. IRQ_RTC_VECTOR = 16, /*!< RTC, LVD and WDT Interrupt */
  29. IRQ_I2S_VECTOR = 17,
  30. IRQ_GPIO_IRQ = 18,
  31. IRQ_TOTAL_NUM = 23,
  32. } irq_type;
  33. #endif // __ASSEMBLER__
  34. #ifndef __ASSEMBLER__
  35. #define SFR_RO *(volatile unsigned long const *)
  36. #define SFR_WO *(volatile unsigned long*)
  37. #define SFR_RW *(volatile unsigned long*)
  38. #define SWINT() asm(".long 0xb0030057")
  39. #define EEBREAKINT() asm(".long 0xb0040057")
  40. #else
  41. #define SFR_RO
  42. #define SFR_WO
  43. #define SFR_RW
  44. #define SWINT .long 0xb0030057
  45. #define EEBREAKINT .long 0xb0040057
  46. #endif
  47. #define SFR_BASE 0x00000000
  48. #define SFR0_BASE (0x00000000 + 0x000)
  49. #define SFR1_BASE (0x00000000 + 0x100)
  50. #define SFR2_BASE (0x00000000 + 0x200)
  51. #define SFR3_BASE (0x00000000 + 0x300)
  52. #define SFR4_BASE (0x00000000 + 0x400)
  53. #define SFR5_BASE (0x00000000 + 0x500)
  54. #define SFR6_BASE (0x00000000 + 0x600)
  55. #define SFR7_BASE (0x00000000 + 0x700)
  56. #define SFR8_BASE (0x00000000 + 0x800)
  57. #define SFR9_BASE (0x00000000 + 0x900)
  58. #define SFR10_BASE (0x00000000 + 0xa00)
  59. #define SFR11_BASE (0x00000000 + 0xb00)
  60. #define SFR12_BASE (0x00000000 + 0xc00)
  61. #define SFR13_BASE (0x00000000 + 0xd00)
  62. #define SFR14_BASE (0x00000000 + 0xe00)
  63. #define SFR15_BASE (0x00000000 + 0xf00)
  64. #define RTC_WR 0x200
  65. #define RTC_RD 0x100
  66. #define RTCCNT_CMD 0x01
  67. #define RTCALM_CMD 0x02
  68. #define RTCRAM_CMD 0x03
  69. #define RTCCON0_CMD 0x04
  70. #define RTCCON1_CMD 0x05
  71. #define RTCCON2_CMD 0x06
  72. #define RTCCON3_CMD 0x07
  73. #define RTCCON4_CMD 0x08
  74. #define RTCCON5_CMD 0x09
  75. #define RTCCON6_CMD 0x0a
  76. #define RTCCON7_CMD 0x0b
  77. #define RTCCON8_CMD 0x0c
  78. #define RTCCON9_CMD 0x0d
  79. #define RTCCON10_CMD 0x0e
  80. #define FUNCMCON0 SFR_RW (SFR0_BASE + 0x07*4)
  81. #define FUNCMCON1 SFR_RW (SFR0_BASE + 0x08*4)
  82. #define FUNCMCON2 SFR_RW (SFR0_BASE + 0x09*4)
  83. #define UART0CON SFR_RW (SFR0_BASE + 0x10*4)
  84. #define UART0CPND SFR_WO (SFR0_BASE + 0x11*4)
  85. #define UART0BAUD SFR_RW (SFR0_BASE + 0x12*4)
  86. #define UART0DATA SFR_RW (SFR0_BASE + 0x13*4)
  87. #define TMR0CON SFR_RW (SFR0_BASE + 0x14*4)
  88. #define TMR0CPND SFR_RW (SFR0_BASE + 0x15*4)
  89. #define TMR0CNT SFR_RW (SFR0_BASE + 0x16*4)
  90. #define TMR0PR SFR_RW (SFR0_BASE + 0x17*4)
  91. #define CLKCON0 SFR_RW (SFR0_BASE + 0x19*4)
  92. #define WDTCON SFR_RW (SFR0_BASE + 0x1a*4)
  93. #define RTCCON SFR_RW (SFR0_BASE + 0x1b*4)
  94. #define RTCDAT SFR_RW (SFR0_BASE + 0x1c*4)
  95. #define CLKCON1 SFR_RW (SFR0_BASE + 0x1d*4)
  96. #define RTCCPND SFR_WO (SFR0_BASE + 0x1e*4)
  97. #define SD0CON SFR_RW (SFR0_BASE + 0x20*4)
  98. #define SD0CPND SFR_WO (SFR0_BASE + 0x21*4)
  99. #define SD0BAUD SFR_RW (SFR0_BASE + 0x22*4)
  100. #define SD0CMD SFR_RW (SFR0_BASE + 0x23*4)
  101. #define SD0ARG3 SFR_RW (SFR0_BASE + 0x24*4)
  102. #define SD0ARG2 SFR_RW (SFR0_BASE + 0x25*4)
  103. #define SD0ARG1 SFR_RW (SFR0_BASE + 0x26*4)
  104. #define SD0ARG0 SFR_RW (SFR0_BASE + 0x27*4)
  105. #define SD0DMAADR SFR_RW (SFR0_BASE + 0x28*4)
  106. #define SD0DMACNT SFR_RW (SFR0_BASE + 0x29*4)
  107. #define SPI0CON SFR_RW (SFR0_BASE + 0x2a*4)
  108. #define SPI0BUF SFR_RW (SFR0_BASE + 0x2b*4)
  109. #define SPI0BAUD SFR_RW (SFR0_BASE + 0x2c*4)
  110. #define SPI0CPND SFR_RW (SFR0_BASE + 0x2d*4)
  111. #define SPI0DMACNT SFR_RW (SFR0_BASE + 0x2e*4)
  112. #define SPI0DMAADR SFR_RW (SFR0_BASE + 0x2f*4)
  113. #define UART1CON SFR_RW (SFR0_BASE + 0x30*4)
  114. #define UART1CPND SFR_WO (SFR0_BASE + 0x31*4)
  115. #define UART1BAUD SFR_RW (SFR0_BASE + 0x32*4)
  116. #define UART1DATA SFR_RW (SFR0_BASE + 0x33*4)
  117. #define TMR1CON SFR_RW (SFR0_BASE + 0x35*4)
  118. #define TMR1CPND SFR_RW (SFR0_BASE + 0x36*4)
  119. #define TMR1CNT SFR_RW (SFR0_BASE + 0x37*4)
  120. #define TMR1PR SFR_RW (SFR0_BASE + 0x38*4)
  121. #define TMR2CON SFR_RW (SFR0_BASE + 0x3a*4)
  122. #define TMR2CPND SFR_RW (SFR0_BASE + 0x3b*4)
  123. #define TMR2CNT SFR_RW (SFR0_BASE + 0x3c*4)
  124. #define TMR2PR SFR_RW (SFR0_BASE + 0x3d*4)
  125. //------------------------- SFR Group1 ---------------------------------------//
  126. #define AUBUFDATA SFR_RW (SFR1_BASE + 0x01*4)
  127. #define AUBUFCON SFR_RW (SFR1_BASE + 0x02*4)
  128. #define AUBUFSTARTADDR SFR_RW (SFR1_BASE + 0x03*4)
  129. #define AUBUFSIZE SFR_RW (SFR1_BASE + 0x04*4)
  130. #define AUBUFFIFOCNT SFR_RW (SFR1_BASE + 0x05*4)
  131. #define AUBUF1DATA SFR_RW (SFR1_BASE + 0x06*4)
  132. #define AUBUF1CON SFR_RW (SFR1_BASE + 0x07*4)
  133. #define AUBUF1STARTADDR SFR_RW (SFR1_BASE + 0x08*4)
  134. #define AUBUF1SIZE SFR_RW (SFR1_BASE + 0x09*4)
  135. #define AUBUF1FIFOCNT SFR_RW (SFR1_BASE + 0x0a*4)
  136. #define DACDIGCON0 SFR_RW (SFR1_BASE + 0x10*4)
  137. #define DACVOLCON SFR_RW (SFR1_BASE + 0x11*4)
  138. #define AU0LMIXCOEF SFR_RW (SFR1_BASE + 0x12*4)
  139. #define AU0RMIXCOEF SFR_RW (SFR1_BASE + 0x13*4)
  140. #define AU1LMIXCOEF SFR_RW (SFR1_BASE + 0x14*4)
  141. #define AU1RMIXCOEF SFR_RW (SFR1_BASE + 0x15*4)
  142. #define AUANGCON0 SFR_RW (SFR1_BASE + 0x3c*4)
  143. #define AUANGCON1 SFR_RW (SFR1_BASE + 0x3d*4)
  144. #define AUANGCON2 SFR_RW (SFR1_BASE + 0x3e*4)
  145. #define AUANGCON3 SFR_RW (SFR1_BASE + 0x3f*4)
  146. #define USBCON0 SFR_RW (SFR3_BASE + 0x00*4)
  147. #define USBCON1 SFR_RW (SFR3_BASE + 0x01*4)
  148. #define USBCON2 SFR_RW (SFR3_BASE + 0x02*4)
  149. #define PWRCON0 SFR_RW (SFR3_BASE + 0x1d*4)
  150. #define LVDCON SFR_RW (SFR3_BASE + 0x1e*4)
  151. #define CHAGCON SFR_RW (SFR3_BASE + 0x1f*4)
  152. #define PLL0DIV SFR_RW (SFR3_BASE + 0x23*4)
  153. #define PLL1DIV SFR_RW (SFR3_BASE + 0x24*4)
  154. #define PLL0CON SFR_RW (SFR3_BASE + 0x26*4)
  155. #define PLL1CON SFR_RW (SFR3_BASE + 0x27*4)
  156. #define PLL2CON SFR_RW (SFR3_BASE + 0x28*4)
  157. #define XO26MCON SFR_RW (SFR3_BASE + 0x29*4)
  158. #define CLKCON2 SFR_RW (SFR3_BASE + 0x2a*4)
  159. #define CLKGAT0 SFR_RW (SFR3_BASE + 0x2c*4)
  160. #define LPMCON SFR_RW (SFR3_BASE + 0x2d*4)
  161. #define MEMCON SFR_RW (SFR3_BASE + 0x2e*4)
  162. #define CLKCON3 SFR_RW (SFR3_BASE + 0x2f*4)
  163. #define CLKGAT1 SFR_RW (SFR3_BASE + 0x3f*4)
  164. #define PWMCON SFR_RW (SFR4_BASE + 0x20*4)
  165. #define PWMPRCON SFR_RW (SFR4_BASE + 0x21*4)
  166. #define PWM01DUTY SFR_RW (SFR4_BASE + 0x22*4)
  167. #define PWM23DUTY SFR_RW (SFR4_BASE + 0x23*4)
  168. #define PWMCYCNUM SFR_RW (SFR4_BASE + 0x24*4)
  169. #define PWMSTEP SFR_RW (SFR4_BASE + 0x25*4)
  170. //0x00~0x1f reserve for CPU
  171. #define PICCONCLR SFR_WO (SFR5_BASE + 0x0c*4)
  172. #define PICCONSET SFR_WO (SFR5_BASE + 0x0d*4)
  173. #define PICENCLR SFR_WO (SFR5_BASE + 0x0e*4)
  174. #define PICENSET SFR_WO (SFR5_BASE + 0x0f*4)
  175. #define PICCON SFR_RW (SFR5_BASE + 0x10*4)
  176. #define PICEN SFR_RW (SFR5_BASE + 0x11*4)
  177. #define PICPR SFR_RW (SFR5_BASE + 0x12*4)
  178. #define PICADR SFR_RW (SFR5_BASE + 0x13*4)
  179. #define PICPND SFR_RW (SFR5_BASE + 0x14*4)
  180. #define EPICCON SFR_RW (SFR5_BASE + 0x1e*4)
  181. #define EPC SFR_RW (SFR5_BASE + 0x1f*4)
  182. #define SADCDAT0 SFR_RO (SFR5_BASE + 0x20*4)
  183. #define SADCDAT1 SFR_RO (SFR5_BASE + 0x21*4)
  184. #define SADCDAT2 SFR_RO (SFR5_BASE + 0x22*4)
  185. #define SADCDAT3 SFR_RO (SFR5_BASE + 0x23*4)
  186. #define SADCDAT4 SFR_RO (SFR5_BASE + 0x24*4)
  187. #define SADCDAT5 SFR_RO (SFR5_BASE + 0x25*4)
  188. #define SADCDAT6 SFR_RO (SFR5_BASE + 0x26*4)
  189. #define SADCDAT7 SFR_RO (SFR5_BASE + 0x27*4)
  190. #define SADCDAT8 SFR_RO (SFR5_BASE + 0x28*4)
  191. #define SADCDAT9 SFR_RO (SFR5_BASE + 0x29*4)
  192. #define SADCDAT10 SFR_RO (SFR5_BASE + 0x2a*4)
  193. #define SADCDAT11 SFR_RO (SFR5_BASE + 0x2b*4)
  194. #define SADCDAT12 SFR_RO (SFR5_BASE + 0x2c*4)
  195. #define SADCDAT13 SFR_RO (SFR5_BASE + 0x2d*4)
  196. #define SADCDAT14 SFR_RO (SFR5_BASE + 0x2e*4)
  197. #define SADCDAT15 SFR_RO (SFR5_BASE + 0x2f*4)
  198. #define AUANGCON1 SFR_RW (SFR1_BASE + 0x3d*4)
  199. #define WKUPCON SFR_WO (SFR5_BASE + 0x39*4)
  200. #define WKUPEDG SFR_WO (SFR5_BASE + 0x3a*4)
  201. #define WKUPCPND SFR_WO (SFR5_BASE + 0x3b*4)
  202. //------------------------- SFR Group6 ---------------------------------------//
  203. #define GPIOASET SFR_RW (SFR6_BASE + 0x00*4)
  204. #define GPIOACLR SFR_RW (SFR6_BASE + 0x01*4)
  205. #define GPIOA SFR_RW (SFR6_BASE + 0x02*4)
  206. #define GPIOADIR SFR_RW (SFR6_BASE + 0x03*4)
  207. #define GPIOADE SFR_RW (SFR6_BASE + 0x04*4)
  208. #define GPIOAFEN SFR_RW (SFR6_BASE + 0x05*4)
  209. #define GPIOADRV SFR_RW (SFR6_BASE + 0x06*4)
  210. #define GPIOAPU SFR_RW (SFR6_BASE + 0x07*4)
  211. #define GPIOAPD SFR_RW (SFR6_BASE + 0x08*4)
  212. #define GPIOAPU200K SFR_RW (SFR6_BASE + 0x09*4)
  213. #define GPIOAPD200K SFR_RW (SFR6_BASE + 0x0a*4)
  214. #define GPIOAPU300 SFR_RW (SFR6_BASE + 0x0b*4)
  215. #define GPIOAPD300 SFR_RW (SFR6_BASE + 0x0c*4)
  216. #define GPIOBSET SFR_RW (SFR6_BASE + 0x10*4)
  217. #define GPIOBCLR SFR_RW (SFR6_BASE + 0x11*4)
  218. #define GPIOB SFR_RW (SFR6_BASE + 0x12*4)
  219. #define GPIOBDIR SFR_RW (SFR6_BASE + 0x13*4)
  220. #define GPIOBDE SFR_RW (SFR6_BASE + 0x14*4)
  221. #define GPIOBFEN SFR_RW (SFR6_BASE + 0x15*4)
  222. #define GPIOBDRV SFR_RW (SFR6_BASE + 0x16*4)
  223. #define GPIOBPU SFR_RW (SFR6_BASE + 0x17*4)
  224. #define GPIOBPD SFR_RW (SFR6_BASE + 0x18*4)
  225. #define GPIOBPU200K SFR_RW (SFR6_BASE + 0x19*4)
  226. #define GPIOBPD200K SFR_RW (SFR6_BASE + 0x1a*4)
  227. #define GPIOBPU300 SFR_RW (SFR6_BASE + 0x1b*4)
  228. #define GPIOBPD300 SFR_RW (SFR6_BASE + 0x1c*4)
  229. #define GPIOESET SFR_RW (SFR6_BASE + 0x20*4)
  230. #define GPIOECLR SFR_RW (SFR6_BASE + 0x21*4)
  231. #define GPIOE SFR_RW (SFR6_BASE + 0x22*4)
  232. #define GPIOEDIR SFR_RW (SFR6_BASE + 0x23*4)
  233. #define GPIOEDE SFR_RW (SFR6_BASE + 0x24*4)
  234. #define GPIOEFEN SFR_RW (SFR6_BASE + 0x25*4)
  235. #define GPIOEDRV SFR_RW (SFR6_BASE + 0x26*4)
  236. #define GPIOEPU SFR_RW (SFR6_BASE + 0x27*4)
  237. #define GPIOEPD SFR_RW (SFR6_BASE + 0x28*4)
  238. #define GPIOEPU200K SFR_RW (SFR6_BASE + 0x29*4)
  239. #define GPIOEPD200K SFR_RW (SFR6_BASE + 0x2a*4)
  240. #define GPIOEPU300 SFR_RW (SFR6_BASE + 0x2b*4)
  241. #define GPIOEPD300 SFR_RW (SFR6_BASE + 0x2c*4)
  242. #define GPIOFSET SFR_RW (SFR6_BASE + 0x30*4)
  243. #define GPIOFCLR SFR_RW (SFR6_BASE + 0x31*4)
  244. #define GPIOF SFR_RW (SFR6_BASE + 0x32*4)
  245. #define GPIOFDIR SFR_RW (SFR6_BASE + 0x33*4)
  246. #define GPIOFDE SFR_RW (SFR6_BASE + 0x34*4)
  247. #define GPIOFFEN SFR_RW (SFR6_BASE + 0x35*4)
  248. #define GPIOFDRV SFR_RW (SFR6_BASE + 0x36*4)
  249. #define GPIOFPU SFR_RW (SFR6_BASE + 0x37*4)
  250. #define GPIOFPD SFR_RW (SFR6_BASE + 0x38*4)
  251. #define GPIOFPU200K SFR_RW (SFR6_BASE + 0x39*4)
  252. #define GPIOFPD200K SFR_RW (SFR6_BASE + 0x3a*4)
  253. #define GPIOFPU300 SFR_RW (SFR6_BASE + 0x3b*4)
  254. #define GPIOFPD300 SFR_RW (SFR6_BASE + 0x3c*4)
  255. #define GPIOGSET SFR_RW (SFR7_BASE + 0x00*4)
  256. #define GPIOGCLR SFR_RW (SFR7_BASE + 0x01*4)
  257. #define GPIOG SFR_RW (SFR7_BASE + 0x02*4)
  258. #define GPIOGDIR SFR_RW (SFR7_BASE + 0x03*4)
  259. #define GPIOGDE SFR_RW (SFR7_BASE + 0x04*4)
  260. #define GPIOGFEN SFR_RW (SFR7_BASE + 0x05*4)
  261. #define GPIOGDRV SFR_RW (SFR7_BASE + 0x06*4)
  262. #define GPIOGPU SFR_RW (SFR7_BASE + 0x07*4)
  263. #define GPIOGPD SFR_RW (SFR7_BASE + 0x08*4)
  264. #define GPIOGPU200K SFR_RW (SFR7_BASE + 0x09*4)
  265. #define GPIOGPD200K SFR_RW (SFR7_BASE + 0x0a*4)
  266. #define GPIOGPU300 SFR_RW (SFR7_BASE + 0x0b*4)
  267. #define GPIOGPD300 SFR_RW (SFR7_BASE + 0x0c*4)
  268. #define IRRXCON SFR_RW (SFR8_BASE + 0x1b*4)
  269. #define IRRXDAT SFR_RW (SFR8_BASE + 0x1c*4)
  270. #define IRRXCPND SFR_WO (SFR8_BASE + 0x1d*4)
  271. #define IRRXERR0 SFR_WO (SFR8_BASE + 0x1e*4)
  272. #define IRRXERR1 SFR_WO (SFR8_BASE + 0x1f*4)
  273. #define USERKEY SFR_RW (SFR8_BASE + 0x20*4)
  274. #define PROTCON1 SFR_RW (SFR8_BASE + 0x21*4)
  275. #define FMAMFDTCON SFR_WO (SFR8_BASE + 0x29*4)
  276. #define TMR3CON SFR_RW (SFR9_BASE + 0x00*4)
  277. #define TMR3CPND SFR_WO (SFR9_BASE + 0x01*4)
  278. #define TMR3CNT SFR_RW (SFR9_BASE + 0x02*4)
  279. #define TMR3PR SFR_RW (SFR9_BASE + 0x03*4)
  280. #define TMR3CPT SFR_RO (SFR9_BASE + 0x04*4)
  281. #define TMR3DUTY0 SFR_WO (SFR9_BASE + 0x05*4)
  282. #define TMR3DUTY1 SFR_WO (SFR9_BASE + 0x06*4)
  283. #define TMR3DUTY2 SFR_WO (SFR9_BASE + 0x07*4)
  284. #define TMR4CON SFR_RW (SFR9_BASE + 0x08*4)
  285. #define TMR4CPND SFR_WO (SFR9_BASE + 0x09*4)
  286. #define TMR4CNT SFR_RW (SFR9_BASE + 0x0a*4)
  287. #define TMR4PR SFR_RW (SFR9_BASE + 0x0b*4)
  288. #define TMR4CPT SFR_RO (SFR9_BASE + 0x0c*4)
  289. #define TMR4DUTY0 SFR_WO (SFR9_BASE + 0x0d*4)
  290. #define TMR4DUTY1 SFR_WO (SFR9_BASE + 0x0e*4)
  291. #define TMR4DUTY2 SFR_WO (SFR9_BASE + 0x0f*4)
  292. #define TMR5CON SFR_RW (SFR9_BASE + 0x10*4)
  293. #define TMR5CPND SFR_WO (SFR9_BASE + 0x11*4)
  294. #define TMR5CNT SFR_RW (SFR9_BASE + 0x12*4)
  295. #define TMR5PR SFR_RW (SFR9_BASE + 0x13*4)
  296. #define TMR5CPT SFR_RO (SFR9_BASE + 0x14*4)
  297. #define TMR5DUTY0 SFR_WO (SFR9_BASE + 0x15*4)
  298. #define TMR5DUTY1 SFR_WO (SFR9_BASE + 0x16*4)
  299. #define TMR5DUTY2 SFR_WO (SFR9_BASE + 0x17*4)
  300. #define UART2CON SFR_RW (SFR9_BASE + 0x18*4)
  301. #define UART2CPND SFR_WO (SFR9_BASE + 0x19*4)
  302. #define UART2BAUD SFR_RW (SFR9_BASE + 0x1a*4)
  303. #define UART2DATA SFR_RW (SFR9_BASE + 0x1b*4)
  304. #define PORTINTEDG SFR_RW (SFR9_BASE + 0x1e*4)
  305. #define PORTINTEN SFR_RW (SFR9_BASE + 0x1f*4)
  306. #define SPI1CON SFR_RW (SFR9_BASE + 0x20*4)
  307. #define SPI1BUF SFR_RW (SFR9_BASE + 0x21*4)
  308. #define SPI1BAUD SFR_RW (SFR9_BASE + 0x22*4)
  309. #define SPI1CPND SFR_RW (SFR9_BASE + 0x23*4)
  310. #define SPI1DMACNT SFR_RW (SFR9_BASE + 0x24*4)
  311. #define SPI1DMAADR SFR_RW (SFR9_BASE + 0x25*4)
  312. #endif