SPCE061A.h
上传用户:sdjqgc
上传日期:2022-08-06
资源大小:2404k
文件大小:18k
开发平台:

Asm

  1. // ========================================================================= //
  2. // File Name   : SPCE061A.h  //
  3. // Description : SPCE061A register definitions  //
  4. // Processor   : SPCE061A  //
  5. // Revision    : v1.00, 2005-10-19  //
  6. // ========================================================================= //
  7. //***************************************************************************//
  8. // Register definitions  //
  9. //***************************************************************************//
  10. // IO port control registers
  11. #define P_IOA_Data (volatile unsigned int *)0x7000
  12. #define P_IOA_Buffer (volatile unsigned int *)0x7001
  13. #define P_IOA_Dir (volatile unsigned int *)0x7002
  14. #define P_IOA_Attrib (volatile unsigned int *)0x7003
  15. #define P_IOA_Latch (volatile unsigned int *)0x7004
  16. #define P_IOB_Data (volatile unsigned int *)0x7005
  17. #define P_IOB_Buffer (volatile unsigned int *)0x7006
  18. #define P_IOB_Dir (volatile unsigned int *)0x7007
  19. #define P_IOB_Attrib (volatile unsigned int *)0x7008
  20. // Timer control registers
  21. #define P_TimerA_Data (volatile unsigned int *)0x700A
  22. #define P_TimerA_Ctrl (volatile unsigned int *)0x700B
  23. #define P_TimerB_Data (volatile unsigned int *)0x700C
  24. #define P_TimerB_Ctrl (volatile unsigned int *)0x700D
  25. // Timebase control registers
  26. #define P_TimeBase_Setup (volatile unsigned int *)0x700E
  27. #define P_Timebase_Setup (volatile unsigned int *)0x700E // Same as P_TimeBase_Setup
  28. #define P_TimeBase_Clear (volatile unsigned int *)0x700F
  29. #define P_Timebase_Clear (volatile unsigned int *)0x700F // Same as P_TimeBase_Clear
  30. // Interrupt control registers
  31. #define P_INT_Ctrl (volatile unsigned int *)0x7010
  32. #define P_INT_Clear (volatile unsigned int *)0x7011
  33. #define P_INT_Mask (volatile unsigned int *)0x702D
  34. #define P_INT_Ctrl_New (volatile unsigned int *)0x702D // Same as P_INT_Mask
  35. // Analog functions control registers
  36. #define P_ADC (volatile unsigned int *)0x7014
  37. #define P_ADC_Ctrl (volatile unsigned int *)0x7015
  38. #define P_ADC_MUX_Ctrl (volatile unsigned int *)0x702B
  39. #define P_ADC_MUX_Data (volatile unsigned int *)0x702C
  40. #define P_ADC_LINEIN_Data (volatile unsigned int *)0x702C // Same as P_ADC_MUX_Data
  41. #define P_ADC_LineIn_Data (volatile unsigned int *)0x702C // Same as P_ADC_MUX_Data
  42. #define P_DAC_Ctrl (volatile unsigned int *)0x702A
  43. #define P_DAC1 (volatile unsigned int *)0x7017
  44. #define P_DAC2 (volatile unsigned int *)0x7016
  45. // Serial functions control registers
  46. #define P_SIO_Data (volatile unsigned int *)0x701A
  47. #define P_SIO_Addr_Low (volatile unsigned int *)0x701B
  48. #define P_SIO_Addr_Mid (volatile unsigned int *)0x701C
  49. #define P_SIO_Addr_High (volatile unsigned int *)0x701D
  50. #define P_SIO_Ctrl (volatile unsigned int *)0x701E
  51. #define P_SIO_Start (volatile unsigned int *)0x701F
  52. #define P_SIO_Stop (volatile unsigned int *)0x7020
  53. #define P_UART_Command1 (volatile unsigned int *)0x7021
  54. #define P_UART_Command2 (volatile unsigned int *)0x7022
  55. #define P_UART_Data (volatile unsigned int *)0x7023
  56. #define P_UART_BaudScalarLow (volatile unsigned int *)0x7024
  57. #define P_UART_BaudScalarHigh (volatile unsigned int *)0x7025
  58. // Other control registers
  59. #define P_Feedback (volatile unsigned int *)0x7009
  60. #define P_SystemClock (volatile unsigned int *)0x7013
  61. #define P_Watchdog_Clear (volatile unsigned int *)0x7012
  62. #define P_LVD_Ctrl (volatile unsigned int *)0x7019
  63. #define P_Flash_Ctrl (volatile unsigned int *)0x7555
  64. //***************************************************************************//
  65. // Constant definitions  //
  66. //***************************************************************************//
  67. // Constants for interrupt
  68. #define C_FIQ_PWM 0x8000 // P_INT_Ctrl
  69. #define C_FIQ_TMA 0x2000 // P_INT_Ctrl
  70. #define C_FIQ_TMB 0x0800 // P_INT_Ctrl
  71. #define C_IRQ0_PWM 0x4000 // P_INT_Ctrl
  72. #define C_IRQ1_TMA 0x1000 // P_INT_Ctrl
  73. #define C_IRQ2_TMB 0x0400 // P_INT_Ctrl
  74. #define C_IRQ3_KEY 0x0080 // P_INT_Ctrl
  75. #define C_IRQ3_EXT1 0x0100 // P_INT_Ctrl
  76. #define C_IRQ3_EXT2 0x0200 // P_INT_Ctrl
  77. #define C_IRQ4_1KHz 0x0010 // P_INT_Ctrl
  78. #define C_IRQ4_2KHz 0x0020 // P_INT_Ctrl
  79. #define C_IRQ4_4KHz 0x0040 // P_INT_Ctrl
  80. #define C_IRQ5_2Hz 0x0004 // P_INT_Ctrl
  81. #define C_IRQ5_4Hz 0x0008 // P_INT_Ctrl
  82. #define C_IRQ6_TMB1 0x0002 // P_INT_Ctrl
  83. #define C_IRQ6_TMB2 0x0001 // P_INT_Ctrl
  84. // Constants for TimerA & TimerB
  85. #define C_TMA1_FOSC_2 0x0000 // P_TimerA_Ctrl
  86. #define C_TMA1_FOSC_256 0x0001 // P_TimerA_Ctrl
  87. #define C_TMA1_32KHz 0x0002 // P_TimerA_Ctrl
  88. #define C_TMA1_8KHz 0x0003 // P_TimerA_Ctrl
  89. #define C_TMA1_4KHz 0x0004 // P_TimerA_Ctrl
  90. #define C_TMA1_1 0x0005 // P_TimerA_Ctrl
  91. #define C_TMA1_0 0x0006 // P_TimerA_Ctrl
  92. #define C_TMA1_EXT1 0x0007 // P_TimerA_Ctrl
  93. #define C_TMA2_2KHz 0x0000 // P_TimerA_Ctrl
  94. #define C_TMA2_1KHz 0x0008 // P_TimerA_Ctrl
  95. #define C_TMA2_256Hz 0x0010 // P_TimerA_Ctrl
  96. #define C_TMA2_TMB1 0x0018 // P_TimerA_Ctrl
  97. #define C_TMA2_4Hz 0x0020 // P_TimerA_Ctrl
  98. #define C_TMA2_2Hz 0x0028 // P_TimerA_Ctrl
  99. #define C_TMA2_1 0x0030 // P_TimerA_Ctrl
  100. #define C_TMA2_EXT2 0x0038 // P_TimerA_Ctrl
  101. #define C_TMA_PWM_OFF 0x0000 // P_TimerA_Ctrl
  102. #define C_TMA_PWM_D1 0x0040 // P_TimerA_Ctrl
  103. #define C_TMA_PWM_D2 0x0080 // P_TimerA_Ctrl
  104. #define C_TMA_PWM_D3 0x00C0 // P_TimerA_Ctrl
  105. #define C_TMA_PWM_D4 0x0100 // P_TimerA_Ctrl
  106. #define C_TMA_PWM_D5 0x0140 // P_TimerA_Ctrl
  107. #define C_TMA_PWM_D6 0x0180 // P_TimerA_Ctrl
  108. #define C_TMA_PWM_D7 0x01C0 // P_TimerA_Ctrl
  109. #define C_TMA_PWM_D8 0x0200 // P_TimerA_Ctrl
  110. #define C_TMA_PWM_D9 0x0240 // P_TimerA_Ctrl
  111. #define C_TMA_PWM_D10 0x0280 // P_TimerA_Ctrl
  112. #define C_TMA_PWM_D11 0x02C0 // P_TimerA_Ctrl
  113. #define C_TMA_PWM_D12 0x0300 // P_TimerA_Ctrl
  114. #define C_TMA_PWM_D13 0x0340 // P_TimerA_Ctrl
  115. #define C_TMA_PWM_D14 0x0380 // P_TimerA_Ctrl
  116. #define C_TMA_PWM_TA 0x03C0 // P_TimerA_Ctrl
  117.     
  118. #define C_TMB_FOSC_2 0x0000 // P_TimerB_Ctrl
  119. #define C_TMB_FOSC_256 0x0001 // P_TimerB_Ctrl
  120. #define C_TMB_32KHz 0x0002 // P_TimerB_Ctrl
  121. #define C_TMB_8KHz 0x0003 // P_TimerB_Ctrl
  122. #define C_TMB_4KHz 0x0004 // P_TimerB_Ctrl
  123. #define C_TMB_1 0x0005 // P_TimerB_Ctrl
  124. #define C_TMB_0 0x0006 // P_TimerB_Ctrl
  125. #define C_TMB_EXT1 0x0007 // P_TimerB_Ctrl
  126. #define C_TMB_PWM_OFF 0x0000 // P_TimerB_Ctrl
  127. #define C_TMB_PWM_D1 0x0040 // P_TimerB_Ctrl
  128. #define C_TMB_PWM_D2 0x0080 // P_TimerB_Ctrl
  129. #define C_TMB_PWM_D3 0x00C0 // P_TimerB_Ctrl
  130. #define C_TMB_PWM_D4 0x0100 // P_TimerB_Ctrl
  131. #define C_TMB_PWM_D5 0x0140 // P_TimerB_Ctrl
  132. #define C_TMB_PWM_D6 0x0180 // P_TimerB_Ctrl
  133. #define C_TMB_PWM_D7 0x01C0 // P_TimerB_Ctrl
  134. #define C_TMB_PWM_D8 0x0200 // P_TimerB_Ctrl
  135. #define C_TMB_PWM_D9 0x0240 // P_TimerB_Ctrl
  136. #define C_TMB_PWM_D10 0x0280 // P_TimerB_Ctrl
  137. #define C_TMB_PWM_D11 0x02C0 // P_TimerB_Ctrl
  138. #define C_TMB_PWM_D12 0x0300 // P_TimerB_Ctrl
  139. #define C_TMB_PWM_D13 0x0340 // P_TimerB_Ctrl
  140. #define C_TMB_PWM_D14 0x0380 // P_TimerB_Ctrl
  141. #define C_TMB_PWM_TB 0x03C0 // P_TimerB_Ctrl
  142. // Constants for TimeBase
  143. #define C_TMB1_8Hz 0x0000 // P_Timebase_Setup
  144. #define C_TMB1_16Hz 0x0001 // P_Timebase_Setup
  145. #define C_TMB1_32Hz 0x0002 // P_Timebase_Setup
  146. #define C_TMB1_64Hz 0x0003 // P_Timebase_Setup
  147. #define C_TMB2_128Hz 0x0000 // P_Timebase_Setup
  148. #define C_TMB2_256Hz 0x0004 // P_Timebase_Setup
  149. #define C_TMB2_512Hz 0x0008 // P_Timebase_Setup
  150. #define C_TMB2_1024Hz 0x000c // P_Timebase_Setup
  151. // Constants for system clock
  152. #define C_Fosc_49M 0x0080 // P_SystemClock
  153. #define C_Fosc_40M 0x0060 // P_SystemClock
  154. #define C_Fosc_32M 0x0040 // P_SystemClock
  155. #define C_Fosc_24M 0x0000 // P_SystemClock
  156. #define C_Fosc_20M 0x0020 // P_SystemClock
  157.     
  158. #define C_Fosc 0x0000 // P_SystemClock
  159. #define C_Fosc_Div_2 0x0001 // P_SystemClock
  160. #define C_Fosc_Div_4 0x0002 // P_SystemClock
  161. #define C_Fosc_Div_8 0x0003 // P_SystemClock
  162. #define C_Fosc_Div_16 0x0004 // P_SystemClock
  163. #define C_Fosc_Div_32 0x0005 // P_SystemClock
  164. #define C_Fosc_Div_64 0x0006 // P_SystemClock
  165. #define C_Sleep 0x0007 // P_SystemClock
  166. #define C_StrongMode 0x0008 // P_SystemClock
  167. #define C_AutoMode 0x0000 // P_SystemClock
  168. #define C_32K_Work 0x0010 // P_SystemClock
  169. #define C_32K_Off 0x0000 // P_SystemClock
  170. // Constants for ADC & DAC
  171. #define C_ADC_EN 0x0001 // P_ADC_Ctrl
  172. #define C_ADC_DIS 0x0000 // P_ADC_Ctrl
  173. #define C_MIC_RDY 0x8000 // P_ADC_Ctrl
  174. #define C_MIC_EN 0x0000 // P_ADC_Ctrl
  175. #define C_MIC_DIS 0x0002 // P_ADC_Ctrl
  176. #define C_MIC_AGC_EN 0x0000 // P_ADC_Ctrl
  177. #define C_MIC_AGC_DIS 0x0000 // P_ADC_Ctrl
  178. #define C_VEXTREF_EN 0x0080 // P_ADC_Ctrl
  179. #define C_VEXTREF_DIS 0x0000 // P_ADC_Ctrl
  180. #define C_2V_EN 0x0100 // P_ADC_Ctrl
  181. #define C_2V_DIS 0x0000 // P_ADC_Ctrl
  182. #define C_DAC_3mA 0x0040 // P_ADC_Ctrl
  183. #define C_DAC_2mA 0x0000 // P_ADC_Ctrl
  184. #define C_ADC_MUX_MIC 0x0000 // P_ADC_MUX_Ctrl
  185. #define C_ADC_MUX_IOA0 0x0001 // P_ADC_MUX_Ctrl
  186. #define C_ADC_MUX_IOA1 0x0002 // P_ADC_MUX_Ctrl
  187. #define C_ADC_MUX_IOA2 0x0003 // P_ADC_MUX_Ctrl
  188. #define C_ADC_MUX_IOA3 0x0004 // P_ADC_MUX_Ctrl
  189. #define C_ADC_MUX_IOA4 0x0005 // P_ADC_MUX_Ctrl
  190. #define C_ADC_MUX_IOA5 0x0006 // P_ADC_MUX_Ctrl
  191. #define C_ADC_MUX_IOA6 0x0007 // P_ADC_MUX_Ctrl
  192. #define C_LINEIN_FAIL 0x4000 // P_ADC_MUX_Ctrl
  193. #define C_LINEIN_RDY 0x8000 // P_ADC_MUX_Ctrl
  194. #define C_DAC1_DIRECT 0x0000 // P_DAC_Ctrl
  195. #define C_DAC1_LATCH_A 0x0080 // P_DAC_Ctrl
  196. #define C_DAC1_LATCH_B 0x0100 // P_DAC_Ctrl
  197. #define C_DAC1_LATCH_AB 0x0180 // P_DAC_Ctrl
  198. #define C_DAC2_DIRECT 0x0000 // P_DAC_Ctrl
  199. #define C_DAC2_LATCH_A 0x0020 // P_DAC_Ctrl
  200. #define C_DAC2_LATCH_B 0x0040 // P_DAC_Ctrl
  201. #define C_DAC2_LATCH_AB 0x0060 // P_DAC_Ctrl
  202. #define C_MIC_DIRECT 0x0000 // P_DAC_Ctrl
  203. #define C_MIC_LATCH_A 0x0008 // P_DAC_Ctrl
  204. #define C_MIC_LATCH_B 0x0010 // P_DAC_Ctrl
  205. #define C_MIC_LATCH_AB 0x0018 // P_DAC_Ctrl
  206. #define C_DAC_DIS 0x0002 // P_DAC_Ctrl
  207. // Constants for SIO
  208. #define C_SIO_CONFIG 0x0080 // P_SIO_Ctrl
  209. #define C_SIO_READ 0x0000 // P_SIO_Ctrl
  210. #define C_SIO_WRITE 0x0040 // P_SIO_Ctrl
  211. #define C_SIO_CLOCK_32 0x0018 // P_SIO_Ctrl
  212. #define C_SIO_CLOCK_16 0x0000 // P_SIO_Ctrl
  213. #define C_SIO_CLOCK_8 0x0010 // P_SIO_Ctrl
  214. #define C_SIO_ADDR_24 0x0003 // P_SIO_Ctrl
  215. #define C_SIO_ADDR_16 0x0000 // P_SIO_Ctrl
  216. #define C_SIO_ADDR_8 0x0002 // P_SIO_Ctrl
  217. #define C_SIO_ADDR_NO 0x0001 // P_SIO_Ctrl
  218. #define C_SIO_BUSY 0x0080 // P_SIO_Start
  219. // Constants for UART
  220. #define C_UART_RX_INT 0x0080 // P_UART_Command1
  221. #define C_UART_TX_INT 0x0040 // P_UART_Command1
  222. #define C_UART_RESET 0x0020 // P_UART_Command1
  223. #define C_UART_PARITY_EVEN 0x0008 // P_UART_Command1
  224. #define C_UART_PARITY_ODD 0x0000 // P_UART_Command1
  225. #define C_UART_PARITY_EN 0x0004 // P_UART_Command1
  226. #define C_UART_PARITY_DIS 0x0000 // P_UART_Command1
  227. #define C_UART_RX_RDY 0x0080 // P_UART_Command2
  228. #define C_UART_TX_RDY 0x0040 // P_UART_Command2
  229. #define C_UART_RX_EN 0x0080 // P_UART_Command2
  230. #define C_UART_TX_EN 0x0040 // P_UART_Command2
  231. #define C_UART_PE 0x0008 // P_UART_Command2
  232. #define C_UART_OE 0x0010 // P_UART_Command2
  233. #define C_UART_FE 0x0020 // P_UART_Command2
  234. // Constants for Feedback
  235. #define C_FEEDBACK1_EN 0x0004 // P_Feedback
  236. #define C_FEEDBACK2_EN 0x0008 // P_Feedback
  237. #define C_IRTX_EN 0x0001 // P_Feedback
  238. // Constants for LVD
  239. #define C_LVD33V 0x0002 // P_LVD_Ctrl
  240. #define C_LVD29V 0x0001 // P_LVD_Ctrl
  241. // Other Constants
  242. #define C_WDTCLR 0x0001 // P_Watchdog_Clear
  243. ///////////////////////////////////////////////////////////////////
  244. // Old definitions for LVD @'SPCE061V004.h'
  245. #define C_LVD24V 0x0000 // P_LVD_Ctrl
  246. #define C_LVD28V 0x0001 // P_LVD_Ctrl
  247. #define C_LVD32V 0x0002 // P_LVD_Ctrl
  248. #define C_LVD36V 0x0003 // P_LVD_Ctrl
  249. // Old definitions for TimerA & TimerB @'SPCE061V004.h'
  250. #define C_TimerADefault 0x0036 // P_TimerA_Ctrl
  251. #define C_SourceA_Fosc2 0x0000 // P_TimerA_Ctrl
  252. #define C_SourceA_Fosc256     0x0001 // P_TimerA_Ctrl
  253. #define C_SourceA_32768Hz 0x0002 // P_TimerA_Ctrl
  254. #define C_SourceA_8192Hz 0x0003 // P_TimerA_Ctrl
  255. #define C_SourceA_4096Hz 0x0004 // P_TimerA_Ctrl
  256. #define C_SourceA_1 0x0005 // P_TimerA_Ctrl
  257. #define  C_SourceA_0 0x0006 // P_TimerA_Ctrl
  258. #define  C_SourceA_Ext1 0x0007 // P_TimerA_Ctrl
  259. #define C_SourceB_2048Hz 0x0000  // P_TimerA_Ctrl
  260. #define C_SourceB_1024Hz 0x0008  // P_TimerA_Ctrl
  261. #define C_SourceB_256Hz 0x0010  // P_TimerA_Ctrl
  262. #define C_SourceB_TMB1 0x0018  // P_TimerA_Ctrl
  263. #define C_SourceB_4Hz 0x0020  // P_TimerA_Ctrl
  264. #define C_SourceB_2Hz 0x0028  // P_TimerA_Ctrl
  265. #define C_SourceB_1 0x0030  // P_TimerA_Ctrl
  266. #define C_SourceB_Ext2 0x0038  // P_TimerA_Ctrl
  267.    
  268. #define C_TimerBDefault 0x0006 // P_TimerB_Ctrl
  269. #define C_SourceC_Fosc2 0x0000  // P_TimerB_Ctrl
  270. #define C_SourceC_Fosc256 0x0001  // P_TimerB_Ctrl
  271. #define C_SourceC_32768Hz 0x0002  // P_TimerB_Ctrl
  272. #define C_SourceC_8192Hz 0x0003  // P_TimerB_Ctrl
  273. #define C_SourceC_4096Hz 0x0004  // P_TimerB_Ctrl
  274. #define C_SourceC_1 0x0005  // P_TimerB_Ctrl
  275. #define  C_SourceC_0 0x0006  // P_TimerB_Ctrl
  276. #define  C_SourceC_Ext1 0x0007  // P_TimerB_Ctrl
  277.    
  278. #define C_DutyOff 0x0000  // P_TimerA_Ctrl, P_TimerB_Ctrl
  279. #define  C_Duty1 0x0040  // P_TimerA_Ctrl, P_TimerB_Ctrl
  280. #define  C_Duty2 0x0080  // P_TimerA_Ctrl, P_TimerB_Ctrl
  281. #define  C_Duty3 0x00C0  // P_TimerA_Ctrl, P_TimerB_Ctrl
  282. #define  C_Duty4 0x0100  // P_TimerA_Ctrl, P_TimerB_Ctrl
  283. #define  C_Duty5 0x0140  // P_TimerA_Ctrl, P_TimerB_Ctrl
  284. #define  C_Duty6 0x0180  // P_TimerA_Ctrl, P_TimerB_Ctrl
  285. #define  C_Duty7 0x01C0  // P_TimerA_Ctrl, P_TimerB_Ctrl
  286. #define  C_Duty8 0x0200  // P_TimerA_Ctrl, P_TimerB_Ctrl
  287. #define  C_Duty9 0x0240  // P_TimerA_Ctrl, P_TimerB_Ctrl
  288. #define  C_Duty10 0x0280  // P_TimerA_Ctrl, P_TimerB_Ctrl
  289. #define  C_Duty11 0x02C0  // P_TimerA_Ctrl, P_TimerB_Ctrl
  290. #define  C_Duty12 0x0300  // P_TimerA_Ctrl, P_TimerB_Ctrl
  291. #define  C_Duty13 0x0340  // P_TimerA_Ctrl, P_TimerB_Ctrl
  292. #define  C_Duty14 0x0380  // P_TimerA_Ctrl, P_TimerB_Ctrl
  293. #define  C_Duty_Div_2 0x03C0  // P_TimerA_Ctrl, P_TimerB_Ctrl
  294. // Old definitions for ADC & DAC @'SPCE061V004.h'
  295. #define C_ADCE 0x0001  // P_ADC_Ctrl
  296. #define C_ADCN 0x0000 // P_ADC_Ctrl
  297. #define  C_MIC_DIS 0x0002  // P_ADC_Ctrl
  298. #define  C_MIC_ENB 0x0000  // P_ADC_Ctrl
  299. #define  C_AGCE 0x0004  // P_ADC_Ctrl
  300. #define  C_AGCN 0x0000  // P_ADC_Ctrl
  301. #define  C_DAC_OUT2mA 0x0040  // P_ADC_Ctrl
  302. #define  C_DAC_OUT3mA 0x0000  // P_ADC_Ctrl
  303. #define  C_VEXTREF_ENB 0x0080  // P_ADC_Ctrl
  304. #define  C_VEXTREF_DIS 0x0000  // P_ADC_Ctrl
  305. #define  C_V2VREFB_DIS 0x0100  // P_ADC_Ctrl
  306. #define  C_V2VREFB_ENB 0x0000  // P_ADC_Ctrl
  307.  
  308. #define C_DA1_Direct 0x0000  // P_DAC_Ctrl
  309. #define C_DA1_LatchA 0x0080  // P_DAC_Ctrl
  310. #define C_DA1_LatchB 0x0100  // P_DAC_Ctrl
  311. #define C_DA1_LatchAB 0x0180  // P_DAC_Ctrl
  312. #define C_DA2_Direct 0x0000  // P_DAC_Ctrl
  313. #define C_DA2_LatchA 0x0020  // P_DAC_Ctrl
  314. #define C_DA2_LatchB 0x0040  // P_DAC_Ctrl
  315. #define C_DA2_LatchAB 0x0060  // P_DAC_Ctrl
  316. #define C_AD_Direct 0x0000  // P_DAC_Ctrl
  317. #define C_AD_LatchA 0x0008  // P_DAC_Ctrl
  318. #define C_AD_LatchB 0x0010  // P_DAC_Ctrl
  319. #define C_AD_LatchAB 0x0018  // P_DAC_Ctrl
  320. #define C_ADC_CH_MICin 0x0000  // P_ADC_MUX_Ctrl
  321. #define C_ADC_CH1 0x0001  // P_ADC_MUX_Ctrl
  322. #define C_ADC_CH2 0x0002  // P_ADC_MUX_Ctrl
  323. #define C_ADC_CH3 0x0003  // P_ADC_MUX_Ctrl
  324. #define C_ADC_CH4 0x0004  // P_ADC_MUX_Ctrl
  325. #define C_ADC_CH5 0x0005  // P_ADC_MUX_Ctrl
  326. #define C_ADC_CH6 0x0006  // P_ADC_MUX_Ctrl
  327. #define C_ADC_CH7 0x0007  // P_ADC_MUX_Ctrl
  328.   
  329. // Old definitions for SIO @'SPCE061V004.h'   
  330. #define  C_SIO_Addr8 0x0002  // P_SIO_Ctrl
  331. #define  C_SIO_Addr16 0x0000  // P_SIO_Ctrl
  332. #define  C_SIO_Addr24 0x0003  // P_SIO_Ctrl
  333. #define  C_SIO_Clk_Div_16 0x0000  // P_SIO_Ctrl
  334. #define  C_SIO_Clk_Div_4 0x0008  // P_SIO_Ctrl
  335. #define  C_SIO_Clk_Div_8 0x0010  // P_SIO_Ctrl
  336. #define  C_SIO_Clk_Div_32 0x0018 // P_SIO_Ctrl
  337. #define C_SIO_RW_Dis 0x0020 // P_SIO_Ctrl
  338. #define C_SIO_RW_ENB 0x0000 // P_SIO_Ctrl
  339. #define C_SIO_RD 0x0000 // P_SIO_Ctrl
  340. #define C_SIO_WR 0x0040 // P_SIO_Ctrl
  341. #define C_SIO_ENB 0x0080 // P_SIO_Ctrl
  342. #define C_SIO_Dis 0x0000 // P_SIO_Ctrl
  343. #define C_SIOSTARTCMD 0x5555 // P_SIO_Start
  344. #define C_SIOSTOPCMD 0x5555 // P_SIO_Stop
  345. // Old definitions for UART @'SPCE061V004.h'
  346. #define C_UART_Parity_ENB 0x0004 // P_UART_Command1 
  347. #define C_UART_Parity_Odd 0x0000 // P_UART_Command1
  348. #define C_UART_Parity_Even 0x0008 // P_UART_Command1
  349. #define C_UART_Reset 0x0020 // P_UART_Command1
  350. #define C_UART_Tx_IRQ_ENB 0x0040 // P_UART_Command1
  351. #define C_UART_Rx_IRQ_ENB 0x0080 // P_UART_Command1
  352. #define C_UART_Tx_Pin_ENB 0x0040 // P_UART_Command2
  353. #define C_UART_Rx_Pin_ENB 0x0080 // P_UART_Command2
  354. #define C_UART_Parity_Error 0x0008 // P_UART_Command2
  355. #define C_UART_OverRun_Error 0x0010 // P_UART_Command2
  356. #define C_UART_Frame_Error 0x0020 // P_UART_Command2
  357. #define C_UART_Tx_RDY 0x0040 // P_UART_Command2
  358. #define C_UART_Rx_RDY 0x0080 // P_UART_Command2
  359. //========================================================================================
  360. // End of SPCE061A.h
  361. //========================================================================================