hw_adc.h 65 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159
  1. //*****************************************************************************
  2. //
  3. // hw_adc.h - Macros used when accessing the ADC hardware.
  4. //
  5. // Copyright (c) 2005-2009 Luminary Micro, Inc. All rights reserved.
  6. // Software License Agreement
  7. //
  8. // Luminary Micro, Inc. (LMI) is supplying this software for use solely and
  9. // exclusively on LMI's microcontroller products.
  10. //
  11. // The software is owned by LMI and/or its suppliers, and is protected under
  12. // applicable copyright laws. All rights are reserved. You may not combine
  13. // this software with "viral" open-source software in order to form a larger
  14. // program. Any use in violation of the foregoing restrictions may subject
  15. // the user to criminal sanctions under applicable laws, as well as to civil
  16. // liability for the breach of the terms and conditions of this license.
  17. //
  18. // THIS SOFTWARE IS PROVIDED "AS IS". NO WARRANTIES, WHETHER EXPRESS, IMPLIED
  19. // OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, IMPLIED WARRANTIES OF
  20. // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE.
  21. // LMI SHALL NOT, IN ANY CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR
  22. // CONSEQUENTIAL DAMAGES, FOR ANY REASON WHATSOEVER.
  23. //
  24. // This is part of revision 4694 of the Stellaris Firmware Development Package.
  25. //
  26. //*****************************************************************************
  27. #ifndef __HW_ADC_H__
  28. #define __HW_ADC_H__
  29. //*****************************************************************************
  30. //
  31. // The following are defines for the ADC register offsets.
  32. //
  33. //*****************************************************************************
  34. #define ADC_O_ACTSS 0x00000000 // Active sample register
  35. #define ADC_O_RIS 0x00000004 // Raw interrupt status register
  36. #define ADC_O_IM 0x00000008 // Interrupt mask register
  37. #define ADC_O_ISC 0x0000000C // Interrupt status/clear register
  38. #define ADC_O_OSTAT 0x00000010 // Overflow status register
  39. #define ADC_O_EMUX 0x00000014 // Event multiplexer select reg.
  40. #define ADC_O_USTAT 0x00000018 // Underflow status register
  41. #define ADC_O_SSPRI 0x00000020 // Channel priority register
  42. #define ADC_O_PSSI 0x00000028 // Processor sample initiate reg.
  43. #define ADC_O_SAC 0x00000030 // Sample Averaging Control reg.
  44. #define ADC_O_DCISC 0x00000034 // ADC Digital Comparator Interrupt
  45. // Status and Clear
  46. #define ADC_O_CTL 0x00000038 // ADC Control
  47. #define ADC_O_SSMUX0 0x00000040 // Multiplexer select 0 register
  48. #define ADC_O_SSCTL0 0x00000044 // Sample sequence control 0 reg.
  49. #define ADC_O_SSFIFO0 0x00000048 // Result FIFO 0 register
  50. #define ADC_O_SSFSTAT0 0x0000004C // FIFO 0 status register
  51. #define ADC_O_SSOP0 0x00000050 // ADC Sample Sequence 0 Operation
  52. #define ADC_O_SSDC0 0x00000054 // ADC Sample Sequence 0 Digital
  53. // Comparator Select
  54. #define ADC_O_SSMUX1 0x00000060 // Multiplexer select 1 register
  55. #define ADC_O_SSCTL1 0x00000064 // Sample sequence control 1 reg.
  56. #define ADC_O_SSFIFO1 0x00000068 // Result FIFO 1 register
  57. #define ADC_O_SSFSTAT1 0x0000006C // FIFO 1 status register
  58. #define ADC_O_SSOP1 0x00000070 // ADC Sample Sequence 1 Operation
  59. #define ADC_O_SSDC1 0x00000074 // ADC Sample Sequence 1 Digital
  60. // Comparator Select
  61. #define ADC_O_SSMUX2 0x00000080 // Multiplexer select 2 register
  62. #define ADC_O_SSCTL2 0x00000084 // Sample sequence control 2 reg.
  63. #define ADC_O_SSFIFO2 0x00000088 // Result FIFO 2 register
  64. #define ADC_O_SSFSTAT2 0x0000008C // FIFO 2 status register
  65. #define ADC_O_SSOP2 0x00000090 // ADC Sample Sequence 2 Operation
  66. #define ADC_O_SSDC2 0x00000094 // ADC Sample Sequence 2 Digital
  67. // Comparator Select
  68. #define ADC_O_SSMUX3 0x000000A0 // Multiplexer select 3 register
  69. #define ADC_O_SSCTL3 0x000000A4 // Sample sequence control 3 reg.
  70. #define ADC_O_SSFIFO3 0x000000A8 // Result FIFO 3 register
  71. #define ADC_O_SSFSTAT3 0x000000AC // FIFO 3 status register
  72. #define ADC_O_SSOP3 0x000000B0 // ADC Sample Sequence 3 Operation
  73. #define ADC_O_SSDC3 0x000000B4 // ADC Sample Sequence 3 Digital
  74. // Comparator Select
  75. #define ADC_O_TMLB 0x00000100 // Test mode loopback register
  76. #define ADC_O_DCRIC 0x00000D00 // ADC Digital Comparator Reset
  77. // Initial Conditions
  78. #define ADC_O_DCCTL0 0x00000E00 // ADC Digital Comparator Control 0
  79. #define ADC_O_DCCTL1 0x00000E04 // ADC Digital Comparator Control 1
  80. #define ADC_O_DCCTL2 0x00000E08 // ADC Digital Comparator Control 2
  81. #define ADC_O_DCCTL3 0x00000E0C // ADC Digital Comparator Control 3
  82. #define ADC_O_DCCTL4 0x00000E10 // ADC Digital Comparator Control 4
  83. #define ADC_O_DCCTL5 0x00000E14 // ADC Digital Comparator Control 5
  84. #define ADC_O_DCCTL6 0x00000E18 // ADC Digital Comparator Control 6
  85. #define ADC_O_DCCTL7 0x00000E1C // ADC Digital Comparator Control 7
  86. #define ADC_O_DCCMP0 0x00000E40 // ADC Digital Comparator Range 0
  87. #define ADC_O_DCCMP1 0x00000E44 // ADC Digital Comparator Range 1
  88. #define ADC_O_DCCMP2 0x00000E48 // ADC Digital Comparator Range 2
  89. #define ADC_O_DCCMP3 0x00000E4C // ADC Digital Comparator Range 3
  90. #define ADC_O_DCCMP4 0x00000E50 // ADC Digital Comparator Range 4
  91. #define ADC_O_DCCMP5 0x00000E54 // ADC Digital Comparator Range 5
  92. #define ADC_O_DCCMP6 0x00000E58 // ADC Digital Comparator Range 6
  93. #define ADC_O_DCCMP7 0x00000E5C // ADC Digital Comparator Range 7
  94. //*****************************************************************************
  95. //
  96. // The following are defines for the bit fields in the ADC_ACTSS register.
  97. //
  98. //*****************************************************************************
  99. #define ADC_ACTSS_ASEN3 0x00000008 // Sample sequence 3 enable
  100. #define ADC_ACTSS_ASEN2 0x00000004 // Sample sequence 2 enable
  101. #define ADC_ACTSS_ASEN1 0x00000002 // Sample sequence 1 enable
  102. #define ADC_ACTSS_ASEN0 0x00000001 // Sample sequence 0 enable
  103. //*****************************************************************************
  104. //
  105. // The following are defines for the bit fields in the ADC_RIS register.
  106. //
  107. //*****************************************************************************
  108. #define ADC_RIS_INRDC 0x00010000 // Digital Comparator Raw Interrupt
  109. // Status.
  110. #define ADC_RIS_INR3 0x00000008 // Sample sequence 3 interrupt
  111. #define ADC_RIS_INR2 0x00000004 // Sample sequence 2 interrupt
  112. #define ADC_RIS_INR1 0x00000002 // Sample sequence 1 interrupt
  113. #define ADC_RIS_INR0 0x00000001 // Sample sequence 0 interrupt
  114. //*****************************************************************************
  115. //
  116. // The following are defines for the bit fields in the ADC_IM register.
  117. //
  118. //*****************************************************************************
  119. #define ADC_IM_DCONSS3 0x00080000 // Digital Comparator Interrupt on
  120. // SS3.
  121. #define ADC_IM_DCONSS2 0x00040000 // Digital Comparator Interrupt on
  122. // SS2.
  123. #define ADC_IM_DCONSS1 0x00020000 // Digital Comparator Interrupt on
  124. // SS1.
  125. #define ADC_IM_DCONSS0 0x00010000 // Digital Comparator Interrupt on
  126. // SS0.
  127. #define ADC_IM_MASK3 0x00000008 // Sample sequence 3 mask
  128. #define ADC_IM_MASK2 0x00000004 // Sample sequence 2 mask
  129. #define ADC_IM_MASK1 0x00000002 // Sample sequence 1 mask
  130. #define ADC_IM_MASK0 0x00000001 // Sample sequence 0 mask
  131. //*****************************************************************************
  132. //
  133. // The following are defines for the bit fields in the ADC_ISC register.
  134. //
  135. //*****************************************************************************
  136. #define ADC_ISC_DCINSS3 0x00080000 // Digital Comparator Interrupt
  137. // Status on SS3.
  138. #define ADC_ISC_DCINSS2 0x00040000 // Digital Comparator Interrupt
  139. // Status on SS2.
  140. #define ADC_ISC_DCINSS1 0x00020000 // Digital Comparator Interrupt
  141. // Status on SS1.
  142. #define ADC_ISC_DCINSS0 0x00010000 // Digital Comparator Interrupt
  143. // Status on SS0.
  144. #define ADC_ISC_IN3 0x00000008 // Sample sequence 3 interrupt
  145. #define ADC_ISC_IN2 0x00000004 // Sample sequence 2 interrupt
  146. #define ADC_ISC_IN1 0x00000002 // Sample sequence 1 interrupt
  147. #define ADC_ISC_IN0 0x00000001 // Sample sequence 0 interrupt
  148. //*****************************************************************************
  149. //
  150. // The following are defines for the bit fields in the ADC_OSTAT register.
  151. //
  152. //*****************************************************************************
  153. #define ADC_OSTAT_OV3 0x00000008 // Sample sequence 3 overflow
  154. #define ADC_OSTAT_OV2 0x00000004 // Sample sequence 2 overflow
  155. #define ADC_OSTAT_OV1 0x00000002 // Sample sequence 1 overflow
  156. #define ADC_OSTAT_OV0 0x00000001 // Sample sequence 0 overflow
  157. //*****************************************************************************
  158. //
  159. // The following are defines for the bit fields in the ADC_EMUX register.
  160. //
  161. //*****************************************************************************
  162. #define ADC_EMUX_EM3_M 0x0000F000 // Event mux 3 mask
  163. #define ADC_EMUX_EM3_PROCESSOR 0x00000000 // Processor event
  164. #define ADC_EMUX_EM3_COMP0 0x00001000 // Analog comparator 0 event
  165. #define ADC_EMUX_EM3_COMP1 0x00002000 // Analog comparator 1 event
  166. #define ADC_EMUX_EM3_COMP2 0x00003000 // Analog comparator 2 event
  167. #define ADC_EMUX_EM3_EXTERNAL 0x00004000 // External event
  168. #define ADC_EMUX_EM3_TIMER 0x00005000 // Timer event
  169. #define ADC_EMUX_EM3_PWM0 0x00006000 // PWM0 event
  170. #define ADC_EMUX_EM3_PWM1 0x00007000 // PWM1 event
  171. #define ADC_EMUX_EM3_PWM2 0x00008000 // PWM2 event
  172. #define ADC_EMUX_EM3_PWM3 0x00009000 // PWM3
  173. #define ADC_EMUX_EM3_ALWAYS 0x0000F000 // Always event
  174. #define ADC_EMUX_EM2_M 0x00000F00 // Event mux 2 mask
  175. #define ADC_EMUX_EM2_PROCESSOR 0x00000000 // Processor event
  176. #define ADC_EMUX_EM2_COMP0 0x00000100 // Analog comparator 0 event
  177. #define ADC_EMUX_EM2_COMP1 0x00000200 // Analog comparator 1 event
  178. #define ADC_EMUX_EM2_COMP2 0x00000300 // Analog comparator 2 event
  179. #define ADC_EMUX_EM2_EXTERNAL 0x00000400 // External event
  180. #define ADC_EMUX_EM2_TIMER 0x00000500 // Timer event
  181. #define ADC_EMUX_EM2_PWM0 0x00000600 // PWM0 event
  182. #define ADC_EMUX_EM2_PWM1 0x00000700 // PWM1 event
  183. #define ADC_EMUX_EM2_PWM2 0x00000800 // PWM2 event
  184. #define ADC_EMUX_EM2_PWM3 0x00000900 // PWM3
  185. #define ADC_EMUX_EM2_ALWAYS 0x00000F00 // Always event
  186. #define ADC_EMUX_EM1_M 0x000000F0 // Event mux 1 mask
  187. #define ADC_EMUX_EM1_PROCESSOR 0x00000000 // Processor event
  188. #define ADC_EMUX_EM1_COMP0 0x00000010 // Analog comparator 0 event
  189. #define ADC_EMUX_EM1_COMP1 0x00000020 // Analog comparator 1 event
  190. #define ADC_EMUX_EM1_COMP2 0x00000030 // Analog comparator 2 event
  191. #define ADC_EMUX_EM1_EXTERNAL 0x00000040 // External event
  192. #define ADC_EMUX_EM1_TIMER 0x00000050 // Timer event
  193. #define ADC_EMUX_EM1_PWM0 0x00000060 // PWM0 event
  194. #define ADC_EMUX_EM1_PWM1 0x00000070 // PWM1 event
  195. #define ADC_EMUX_EM1_PWM2 0x00000080 // PWM2 event
  196. #define ADC_EMUX_EM1_PWM3 0x00000090 // PWM3
  197. #define ADC_EMUX_EM1_ALWAYS 0x000000F0 // Always event
  198. #define ADC_EMUX_EM0_M 0x0000000F // Event mux 0 mask
  199. #define ADC_EMUX_EM0_PROCESSOR 0x00000000 // Processor event
  200. #define ADC_EMUX_EM0_COMP0 0x00000001 // Analog comparator 0 event
  201. #define ADC_EMUX_EM0_COMP1 0x00000002 // Analog comparator 1 event
  202. #define ADC_EMUX_EM0_COMP2 0x00000003 // Analog comparator 2 event
  203. #define ADC_EMUX_EM0_EXTERNAL 0x00000004 // External event
  204. #define ADC_EMUX_EM0_TIMER 0x00000005 // Timer event
  205. #define ADC_EMUX_EM0_PWM0 0x00000006 // PWM0 event
  206. #define ADC_EMUX_EM0_PWM1 0x00000007 // PWM1 event
  207. #define ADC_EMUX_EM0_PWM2 0x00000008 // PWM2 event
  208. #define ADC_EMUX_EM0_PWM3 0x00000009 // PWM3
  209. #define ADC_EMUX_EM0_ALWAYS 0x0000000F // Always event
  210. //*****************************************************************************
  211. //
  212. // The following are defines for the bit fields in the ADC_USTAT register.
  213. //
  214. //*****************************************************************************
  215. #define ADC_USTAT_UV3 0x00000008 // Sample sequence 3 underflow
  216. #define ADC_USTAT_UV2 0x00000004 // Sample sequence 2 underflow
  217. #define ADC_USTAT_UV1 0x00000002 // Sample sequence 1 underflow
  218. #define ADC_USTAT_UV0 0x00000001 // Sample sequence 0 underflow
  219. //*****************************************************************************
  220. //
  221. // The following are defines for the bit fields in the ADC_SSPRI register.
  222. //
  223. //*****************************************************************************
  224. #define ADC_SSPRI_SS3_M 0x00003000 // Sequencer 3 priority mask
  225. #define ADC_SSPRI_SS3_1ST 0x00000000 // First priority
  226. #define ADC_SSPRI_SS3_2ND 0x00001000 // Second priority
  227. #define ADC_SSPRI_SS3_3RD 0x00002000 // Third priority
  228. #define ADC_SSPRI_SS3_4TH 0x00003000 // Fourth priority
  229. #define ADC_SSPRI_SS2_M 0x00000300 // Sequencer 2 priority mask
  230. #define ADC_SSPRI_SS2_1ST 0x00000000 // First priority
  231. #define ADC_SSPRI_SS2_2ND 0x00000100 // Second priority
  232. #define ADC_SSPRI_SS2_3RD 0x00000200 // Third priority
  233. #define ADC_SSPRI_SS2_4TH 0x00000300 // Fourth priority
  234. #define ADC_SSPRI_SS1_M 0x00000030 // Sequencer 1 priority mask
  235. #define ADC_SSPRI_SS1_1ST 0x00000000 // First priority
  236. #define ADC_SSPRI_SS1_2ND 0x00000010 // Second priority
  237. #define ADC_SSPRI_SS1_3RD 0x00000020 // Third priority
  238. #define ADC_SSPRI_SS1_4TH 0x00000030 // Fourth priority
  239. #define ADC_SSPRI_SS0_M 0x00000003 // Sequencer 0 priority mask
  240. #define ADC_SSPRI_SS0_1ST 0x00000000 // First priority
  241. #define ADC_SSPRI_SS0_2ND 0x00000001 // Second priority
  242. #define ADC_SSPRI_SS0_3RD 0x00000002 // Third priority
  243. #define ADC_SSPRI_SS0_4TH 0x00000003 // Fourth priority
  244. //*****************************************************************************
  245. //
  246. // The following are defines for the bit fields in the ADC_PSSI register.
  247. //
  248. //*****************************************************************************
  249. #define ADC_PSSI_GSYNC 0x80000000 // Global Synchronize.
  250. #define ADC_PSSI_SYNCWAIT 0x08000000 // Synchronize Wait.
  251. #define ADC_PSSI_SS3 0x00000008 // Trigger sample sequencer 3
  252. #define ADC_PSSI_SS2 0x00000004 // Trigger sample sequencer 2
  253. #define ADC_PSSI_SS1 0x00000002 // Trigger sample sequencer 1
  254. #define ADC_PSSI_SS0 0x00000001 // Trigger sample sequencer 0
  255. //*****************************************************************************
  256. //
  257. // The following are defines for the bit fields in the ADC_SAC register.
  258. //
  259. //*****************************************************************************
  260. #define ADC_SAC_AVG_M 0x00000007 // Hardware Averaging Control.
  261. #define ADC_SAC_AVG_64X 0x00000006 // 64x hardware oversampling
  262. #define ADC_SAC_AVG_32X 0x00000005 // 32x hardware oversampling
  263. #define ADC_SAC_AVG_16X 0x00000004 // 16x hardware oversampling
  264. #define ADC_SAC_AVG_8X 0x00000003 // 8x hardware oversampling
  265. #define ADC_SAC_AVG_4X 0x00000002 // 4x hardware oversampling
  266. #define ADC_SAC_AVG_2X 0x00000001 // 2x hardware oversampling
  267. #define ADC_SAC_AVG_OFF 0x00000000 // No hardware oversampling
  268. //*****************************************************************************
  269. //
  270. // The following are defines for the the interpretation of the data in the
  271. // SSFIFOx when the ADC TMLB is enabled.
  272. //
  273. //*****************************************************************************
  274. #define ADC_SSFIFO_TMLB_CNT_M 0x000003C0 // Continuous Sample Counter.
  275. #define ADC_SSFIFO_TMLB_CONT 0x00000020 // Continuation Sample Indicator.
  276. #define ADC_SSFIFO_TMLB_DIFF 0x00000010 // Differential Sample Indicator.
  277. #define ADC_SSFIFO_TMLB_TS 0x00000008 // Temp Sensor Sample Indicator.
  278. #define ADC_SSFIFO_TMLB_MUX_M 0x00000007 // Analog Input Indicator.
  279. #define ADC_SSFIFO_TMLB_CNT_S 6 // Sample counter shift
  280. #define ADC_SSFIFO_TMLB_MUX_S 0 // Input channel number shift
  281. //*****************************************************************************
  282. //
  283. // The following are defines for the bit fields in the ADC_TMLB register.
  284. //
  285. //*****************************************************************************
  286. #define ADC_TMLB_LB 0x00000001 // Loopback control signals
  287. //*****************************************************************************
  288. //
  289. // The following are defines for the bit fields in the ADC_O_SSMUX0 register.
  290. //
  291. //*****************************************************************************
  292. #define ADC_SSMUX0_MUX7_M 0xF0000000 // 8th Sample Input Select.
  293. #define ADC_SSMUX0_MUX6_M 0x0F000000 // 7th Sample Input Select.
  294. #define ADC_SSMUX0_MUX5_M 0x00F00000 // 6th Sample Input Select.
  295. #define ADC_SSMUX0_MUX4_M 0x000F0000 // 5th Sample Input Select.
  296. #define ADC_SSMUX0_MUX3_M 0x0000F000 // 4th Sample Input Select.
  297. #define ADC_SSMUX0_MUX2_M 0x00000F00 // 3rd Sample Input Select.
  298. #define ADC_SSMUX0_MUX1_M 0x000000F0 // 2nd Sample Input Select.
  299. #define ADC_SSMUX0_MUX0_M 0x0000000F // 1st Sample Input Select.
  300. #define ADC_SSMUX0_MUX7_S 28
  301. #define ADC_SSMUX0_MUX6_S 24
  302. #define ADC_SSMUX0_MUX5_S 20
  303. #define ADC_SSMUX0_MUX4_S 16
  304. #define ADC_SSMUX0_MUX3_S 12
  305. #define ADC_SSMUX0_MUX2_S 8
  306. #define ADC_SSMUX0_MUX1_S 4
  307. #define ADC_SSMUX0_MUX0_S 0
  308. //*****************************************************************************
  309. //
  310. // The following are defines for the bit fields in the ADC_O_SSCTL0 register.
  311. //
  312. //*****************************************************************************
  313. #define ADC_SSCTL0_TS7 0x80000000 // 8th Sample Temp Sensor Select.
  314. #define ADC_SSCTL0_IE7 0x40000000 // 8th Sample Interrupt Enable.
  315. #define ADC_SSCTL0_END7 0x20000000 // 8th Sample is End of Sequence.
  316. #define ADC_SSCTL0_D7 0x10000000 // 8th Sample Diff Input Select.
  317. #define ADC_SSCTL0_TS6 0x08000000 // 7th Sample Temp Sensor Select.
  318. #define ADC_SSCTL0_IE6 0x04000000 // 7th Sample Interrupt Enable.
  319. #define ADC_SSCTL0_END6 0x02000000 // 7th Sample is End of Sequence.
  320. #define ADC_SSCTL0_D6 0x01000000 // 7th Sample Diff Input Select.
  321. #define ADC_SSCTL0_TS5 0x00800000 // 6th Sample Temp Sensor Select.
  322. #define ADC_SSCTL0_IE5 0x00400000 // 6th Sample Interrupt Enable.
  323. #define ADC_SSCTL0_END5 0x00200000 // 6th Sample is End of Sequence.
  324. #define ADC_SSCTL0_D5 0x00100000 // 6th Sample Diff Input Select.
  325. #define ADC_SSCTL0_TS4 0x00080000 // 5th Sample Temp Sensor Select.
  326. #define ADC_SSCTL0_IE4 0x00040000 // 5th Sample Interrupt Enable.
  327. #define ADC_SSCTL0_END4 0x00020000 // 5th Sample is End of Sequence.
  328. #define ADC_SSCTL0_D4 0x00010000 // 5th Sample Diff Input Select.
  329. #define ADC_SSCTL0_TS3 0x00008000 // 4th Sample Temp Sensor Select.
  330. #define ADC_SSCTL0_IE3 0x00004000 // 4th Sample Interrupt Enable.
  331. #define ADC_SSCTL0_END3 0x00002000 // 4th Sample is End of Sequence.
  332. #define ADC_SSCTL0_D3 0x00001000 // 4th Sample Diff Input Select.
  333. #define ADC_SSCTL0_TS2 0x00000800 // 3rd Sample Temp Sensor Select.
  334. #define ADC_SSCTL0_IE2 0x00000400 // 3rd Sample Interrupt Enable.
  335. #define ADC_SSCTL0_END2 0x00000200 // 3rd Sample is End of Sequence.
  336. #define ADC_SSCTL0_D2 0x00000100 // 3rd Sample Diff Input Select.
  337. #define ADC_SSCTL0_TS1 0x00000080 // 2nd Sample Temp Sensor Select.
  338. #define ADC_SSCTL0_IE1 0x00000040 // 2nd Sample Interrupt Enable.
  339. #define ADC_SSCTL0_END1 0x00000020 // 2nd Sample is End of Sequence.
  340. #define ADC_SSCTL0_D1 0x00000010 // 2nd Sample Diff Input Select.
  341. #define ADC_SSCTL0_TS0 0x00000008 // 1st Sample Temp Sensor Select.
  342. #define ADC_SSCTL0_IE0 0x00000004 // 1st Sample Interrupt Enable.
  343. #define ADC_SSCTL0_END0 0x00000002 // 1st Sample is End of Sequence.
  344. #define ADC_SSCTL0_D0 0x00000001 // 1st Sample Diff Input Select.
  345. //*****************************************************************************
  346. //
  347. // The following are defines for the bit fields in the ADC_O_SSFIFO0 register.
  348. //
  349. //*****************************************************************************
  350. #define ADC_SSFIFO0_DATA_M 0x000003FF // Conversion Result Data.
  351. #define ADC_SSFIFO0_DATA_S 0
  352. //*****************************************************************************
  353. //
  354. // The following are defines for the bit fields in the ADC_O_SSFSTAT0 register.
  355. //
  356. //*****************************************************************************
  357. #define ADC_SSFSTAT0_FULL 0x00001000 // FIFO Full.
  358. #define ADC_SSFSTAT0_EMPTY 0x00000100 // FIFO Empty.
  359. #define ADC_SSFSTAT0_HPTR_M 0x000000F0 // FIFO Head Pointer.
  360. #define ADC_SSFSTAT0_TPTR_M 0x0000000F // FIFO Tail Pointer.
  361. #define ADC_SSFSTAT0_HPTR_S 4
  362. #define ADC_SSFSTAT0_TPTR_S 0
  363. //*****************************************************************************
  364. //
  365. // The following are defines for the bit fields in the ADC_O_SSMUX1 register.
  366. //
  367. //*****************************************************************************
  368. #define ADC_SSMUX1_MUX3_M 0x0000F000 // 4th Sample Input Select.
  369. #define ADC_SSMUX1_MUX2_M 0x00000F00 // 3rd Sample Input Select.
  370. #define ADC_SSMUX1_MUX1_M 0x000000F0 // 2nd Sample Input Select.
  371. #define ADC_SSMUX1_MUX0_M 0x0000000F // 1st Sample Input Select.
  372. #define ADC_SSMUX1_MUX3_S 12
  373. #define ADC_SSMUX1_MUX2_S 8
  374. #define ADC_SSMUX1_MUX1_S 4
  375. #define ADC_SSMUX1_MUX0_S 0
  376. //*****************************************************************************
  377. //
  378. // The following are defines for the bit fields in the ADC_O_SSCTL1 register.
  379. //
  380. //*****************************************************************************
  381. #define ADC_SSCTL1_TS3 0x00008000 // 4th Sample Temp Sensor Select.
  382. #define ADC_SSCTL1_IE3 0x00004000 // 4th Sample Interrupt Enable.
  383. #define ADC_SSCTL1_END3 0x00002000 // 4th Sample is End of Sequence.
  384. #define ADC_SSCTL1_D3 0x00001000 // 4th Sample Diff Input Select.
  385. #define ADC_SSCTL1_TS2 0x00000800 // 3rd Sample Temp Sensor Select.
  386. #define ADC_SSCTL1_IE2 0x00000400 // 3rd Sample Interrupt Enable.
  387. #define ADC_SSCTL1_END2 0x00000200 // 3rd Sample is End of Sequence.
  388. #define ADC_SSCTL1_D2 0x00000100 // 3rd Sample Diff Input Select.
  389. #define ADC_SSCTL1_TS1 0x00000080 // 2nd Sample Temp Sensor Select.
  390. #define ADC_SSCTL1_IE1 0x00000040 // 2nd Sample Interrupt Enable.
  391. #define ADC_SSCTL1_END1 0x00000020 // 2nd Sample is End of Sequence.
  392. #define ADC_SSCTL1_D1 0x00000010 // 2nd Sample Diff Input Select.
  393. #define ADC_SSCTL1_TS0 0x00000008 // 1st Sample Temp Sensor Select.
  394. #define ADC_SSCTL1_IE0 0x00000004 // 1st Sample Interrupt Enable.
  395. #define ADC_SSCTL1_END0 0x00000002 // 1st Sample is End of Sequence.
  396. #define ADC_SSCTL1_D0 0x00000001 // 1st Sample Diff Input Select.
  397. //*****************************************************************************
  398. //
  399. // The following are defines for the bit fields in the ADC_O_SSFIFO1 register.
  400. //
  401. //*****************************************************************************
  402. #define ADC_SSFIFO1_DATA_M 0x000003FF // Conversion Result Data.
  403. #define ADC_SSFIFO1_DATA_S 0
  404. //*****************************************************************************
  405. //
  406. // The following are defines for the bit fields in the ADC_O_SSFSTAT1 register.
  407. //
  408. //*****************************************************************************
  409. #define ADC_SSFSTAT1_FULL 0x00001000 // FIFO Full.
  410. #define ADC_SSFSTAT1_EMPTY 0x00000100 // FIFO Empty.
  411. #define ADC_SSFSTAT1_HPTR_M 0x000000F0 // FIFO Head Pointer.
  412. #define ADC_SSFSTAT1_TPTR_M 0x0000000F // FIFO Tail Pointer.
  413. #define ADC_SSFSTAT1_HPTR_S 4
  414. #define ADC_SSFSTAT1_TPTR_S 0
  415. //*****************************************************************************
  416. //
  417. // The following are defines for the bit fields in the ADC_O_SSMUX2 register.
  418. //
  419. //*****************************************************************************
  420. #define ADC_SSMUX2_MUX3_M 0x0000F000 // 4th Sample Input Select.
  421. #define ADC_SSMUX2_MUX2_M 0x00000F00 // 3rd Sample Input Select.
  422. #define ADC_SSMUX2_MUX1_M 0x000000F0 // 2nd Sample Input Select.
  423. #define ADC_SSMUX2_MUX0_M 0x0000000F // 1st Sample Input Select.
  424. #define ADC_SSMUX2_MUX3_S 12
  425. #define ADC_SSMUX2_MUX2_S 8
  426. #define ADC_SSMUX2_MUX1_S 4
  427. #define ADC_SSMUX2_MUX0_S 0
  428. //*****************************************************************************
  429. //
  430. // The following are defines for the bit fields in the ADC_O_SSCTL2 register.
  431. //
  432. //*****************************************************************************
  433. #define ADC_SSCTL2_TS3 0x00008000 // 4th Sample Temp Sensor Select.
  434. #define ADC_SSCTL2_IE3 0x00004000 // 4th Sample Interrupt Enable.
  435. #define ADC_SSCTL2_END3 0x00002000 // 4th Sample is End of Sequence.
  436. #define ADC_SSCTL2_D3 0x00001000 // 4th Sample Diff Input Select.
  437. #define ADC_SSCTL2_TS2 0x00000800 // 3rd Sample Temp Sensor Select.
  438. #define ADC_SSCTL2_IE2 0x00000400 // 3rd Sample Interrupt Enable.
  439. #define ADC_SSCTL2_END2 0x00000200 // 3rd Sample is End of Sequence.
  440. #define ADC_SSCTL2_D2 0x00000100 // 3rd Sample Diff Input Select.
  441. #define ADC_SSCTL2_TS1 0x00000080 // 2nd Sample Temp Sensor Select.
  442. #define ADC_SSCTL2_IE1 0x00000040 // 2nd Sample Interrupt Enable.
  443. #define ADC_SSCTL2_END1 0x00000020 // 2nd Sample is End of Sequence.
  444. #define ADC_SSCTL2_D1 0x00000010 // 2nd Sample Diff Input Select.
  445. #define ADC_SSCTL2_TS0 0x00000008 // 1st Sample Temp Sensor Select.
  446. #define ADC_SSCTL2_IE0 0x00000004 // 1st Sample Interrupt Enable.
  447. #define ADC_SSCTL2_END0 0x00000002 // 1st Sample is End of Sequence.
  448. #define ADC_SSCTL2_D0 0x00000001 // 1st Sample Diff Input Select.
  449. //*****************************************************************************
  450. //
  451. // The following are defines for the bit fields in the ADC_O_SSFIFO2 register.
  452. //
  453. //*****************************************************************************
  454. #define ADC_SSFIFO2_DATA_M 0x000003FF // Conversion Result Data.
  455. #define ADC_SSFIFO2_DATA_S 0
  456. //*****************************************************************************
  457. //
  458. // The following are defines for the bit fields in the ADC_O_SSFSTAT2 register.
  459. //
  460. //*****************************************************************************
  461. #define ADC_SSFSTAT2_FULL 0x00001000 // FIFO Full.
  462. #define ADC_SSFSTAT2_EMPTY 0x00000100 // FIFO Empty.
  463. #define ADC_SSFSTAT2_HPTR_M 0x000000F0 // FIFO Head Pointer.
  464. #define ADC_SSFSTAT2_TPTR_M 0x0000000F // FIFO Tail Pointer.
  465. #define ADC_SSFSTAT2_HPTR_S 4
  466. #define ADC_SSFSTAT2_TPTR_S 0
  467. //*****************************************************************************
  468. //
  469. // The following are defines for the bit fields in the ADC_O_SSMUX3 register.
  470. //
  471. //*****************************************************************************
  472. #define ADC_SSMUX3_MUX0_M 0x0000000F // 1st Sample Input Select.
  473. #define ADC_SSMUX3_MUX0_S 0
  474. //*****************************************************************************
  475. //
  476. // The following are defines for the bit fields in the ADC_O_SSCTL3 register.
  477. //
  478. //*****************************************************************************
  479. #define ADC_SSCTL3_TS0 0x00000008 // 1st Sample Temp Sensor Select.
  480. #define ADC_SSCTL3_IE0 0x00000004 // 1st Sample Interrupt Enable.
  481. #define ADC_SSCTL3_END0 0x00000002 // 1st Sample is End of Sequence.
  482. #define ADC_SSCTL3_D0 0x00000001 // 1st Sample Diff Input Select.
  483. //*****************************************************************************
  484. //
  485. // The following are defines for the bit fields in the ADC_O_SSFIFO3 register.
  486. //
  487. //*****************************************************************************
  488. #define ADC_SSFIFO3_DATA_M 0x000003FF // Conversion Result Data.
  489. #define ADC_SSFIFO3_DATA_S 0
  490. //*****************************************************************************
  491. //
  492. // The following are defines for the bit fields in the ADC_O_SSFSTAT3 register.
  493. //
  494. //*****************************************************************************
  495. #define ADC_SSFSTAT3_FULL 0x00001000 // FIFO Full.
  496. #define ADC_SSFSTAT3_EMPTY 0x00000100 // FIFO Empty.
  497. #define ADC_SSFSTAT3_HPTR_M 0x000000F0 // FIFO Head Pointer.
  498. #define ADC_SSFSTAT3_TPTR_M 0x0000000F // FIFO Tail Pointer.
  499. #define ADC_SSFSTAT3_HPTR_S 4
  500. #define ADC_SSFSTAT3_TPTR_S 0
  501. //*****************************************************************************
  502. //
  503. // The following are defines for the bit fields in the ADC_O_SSDC0 register.
  504. //
  505. //*****************************************************************************
  506. #define ADC_SSDC0_S7DCSEL_M 0xF0000000 // Sample 7 Digital Comparator
  507. // Select.
  508. #define ADC_SSDC0_S6DCSEL_M 0x0F000000 // Sample 6 Digital Comparator
  509. // Select.
  510. #define ADC_SSDC0_S5DCSEL_M 0x00F00000 // Sample 5 Digital Comparator
  511. // Select.
  512. #define ADC_SSDC0_S4DCSEL_M 0x000F0000 // Sample 4 Digital Comparator
  513. // Select.
  514. #define ADC_SSDC0_S3DCSEL_M 0x0000F000 // Sample 3 Digital Comparator
  515. // Select.
  516. #define ADC_SSDC0_S2DCSEL_M 0x00000F00 // Sample 2 Digital Comparator
  517. // Select.
  518. #define ADC_SSDC0_S1DCSEL_M 0x000000F0 // Sample 1 Digital Comparator
  519. // Select.
  520. #define ADC_SSDC0_S0DCSEL_M 0x0000000F // Sample 0 Digital Comparator
  521. // Select.
  522. #define ADC_SSDC0_S6DCSEL_S 24
  523. #define ADC_SSDC0_S5DCSEL_S 20
  524. #define ADC_SSDC0_S4DCSEL_S 16
  525. #define ADC_SSDC0_S3DCSEL_S 12
  526. #define ADC_SSDC0_S2DCSEL_S 8
  527. #define ADC_SSDC0_S1DCSEL_S 4
  528. #define ADC_SSDC0_S0DCSEL_S 0
  529. //*****************************************************************************
  530. //
  531. // The following are defines for the bit fields in the ADC_O_SSDC1 register.
  532. //
  533. //*****************************************************************************
  534. #define ADC_SSDC1_S3DCSEL_M 0x0000F000 // Sample 3 Digital Comparator
  535. // Select.
  536. #define ADC_SSDC1_S2DCSEL_M 0x00000F00 // Sample 2 Digital Comparator
  537. // Select.
  538. #define ADC_SSDC1_S1DCSEL_M 0x000000F0 // Sample 1 Digital Comparator
  539. // Select.
  540. #define ADC_SSDC1_S0DCSEL_M 0x0000000F // Sample 0 Digital Comparator
  541. // Select.
  542. #define ADC_SSDC1_S2DCSEL_S 8
  543. #define ADC_SSDC1_S1DCSEL_S 4
  544. #define ADC_SSDC1_S0DCSEL_S 0
  545. //*****************************************************************************
  546. //
  547. // The following are defines for the bit fields in the ADC_O_SSDC2 register.
  548. //
  549. //*****************************************************************************
  550. #define ADC_SSDC2_S3DCSEL_M 0x0000F000 // Sample 3 Digital Comparator
  551. // Select.
  552. #define ADC_SSDC2_S2DCSEL_M 0x00000F00 // Sample 2 Digital Comparator
  553. // Select.
  554. #define ADC_SSDC2_S1DCSEL_M 0x000000F0 // Sample 1 Digital Comparator
  555. // Select.
  556. #define ADC_SSDC2_S0DCSEL_M 0x0000000F // Sample 0 Digital Comparator
  557. // Select.
  558. #define ADC_SSDC2_S2DCSEL_S 8
  559. #define ADC_SSDC2_S1DCSEL_S 4
  560. #define ADC_SSDC2_S0DCSEL_S 0
  561. //*****************************************************************************
  562. //
  563. // The following are defines for the bit fields in the ADC_O_SSDC3 register.
  564. //
  565. //*****************************************************************************
  566. #define ADC_SSDC3_S0DCSEL_M 0x0000000F // Sample 0 Digital Comparator
  567. // Select.
  568. //*****************************************************************************
  569. //
  570. // The following are defines for the bit fields in the ADC_O_DCISC register.
  571. //
  572. //*****************************************************************************
  573. #define ADC_DCISC_DCINT7 0x00000080 // Digital Comparator 7 Interrupt
  574. // Status and Clear.
  575. #define ADC_DCISC_DCINT6 0x00000040 // Digital Comparator 6 Interrupt
  576. // Status and Clear.
  577. #define ADC_DCISC_DCINT5 0x00000020 // Digital Comparator 5 Interrupt
  578. // Status and Clear.
  579. #define ADC_DCISC_DCINT4 0x00000010 // Digital Comparator 4 Interrupt
  580. // Status and Clear.
  581. #define ADC_DCISC_DCINT3 0x00000008 // Digital Comparator 3 Interrupt
  582. // Status and Clear.
  583. #define ADC_DCISC_DCINT2 0x00000004 // Digital Comparator 2 Interrupt
  584. // Status and Clear.
  585. #define ADC_DCISC_DCINT1 0x00000002 // Digital Comparator 1 Interrupt
  586. // Status and Clear.
  587. #define ADC_DCISC_DCINT0 0x00000001 // Digital Comparator 0 Interrupt
  588. // Status and Clear.
  589. //*****************************************************************************
  590. //
  591. // The following are defines for the bit fields in the ADC_O_SSOP0 register.
  592. //
  593. //*****************************************************************************
  594. #define ADC_SSOP0_S7DCOP 0x10000000 // Sample 7 Digital Comparator
  595. // Operation.
  596. #define ADC_SSOP0_S6DCOP 0x01000000 // Sample 6 Digital Comparator
  597. // Operation.
  598. #define ADC_SSOP0_S5DCOP 0x00100000 // Sample 5 Digital Comparator
  599. // Operation.
  600. #define ADC_SSOP0_S4DCOP 0x00010000 // Sample 4 Digital Comparator
  601. // Operation.
  602. #define ADC_SSOP0_S3DCOP 0x00001000 // Sample 3 Digital Comparator
  603. // Operation.
  604. #define ADC_SSOP0_S2DCOP 0x00000100 // Sample 2 Digital Comparator
  605. // Operation.
  606. #define ADC_SSOP0_S1DCOP 0x00000010 // Sample 1 Digital Comparator
  607. // Operation.
  608. #define ADC_SSOP0_S0DCOP 0x00000001 // Sample 0 Digital Comparator
  609. // Operation.
  610. //*****************************************************************************
  611. //
  612. // The following are defines for the bit fields in the ADC_O_SSOP1 register.
  613. //
  614. //*****************************************************************************
  615. #define ADC_SSOP1_S3DCOP 0x00001000 // Sample 7 Digital Comparator
  616. // Operation.
  617. #define ADC_SSOP1_S2DCOP 0x00000100 // Sample 2 Digital Comparator
  618. // Operation.
  619. #define ADC_SSOP1_S1DCOP 0x00000010 // Sample 1 Digital Comparator
  620. // Operation.
  621. #define ADC_SSOP1_S0DCOP 0x00000001 // Sample 0 Digital Comparator
  622. // Operation.
  623. //*****************************************************************************
  624. //
  625. // The following are defines for the bit fields in the ADC_O_SSOP2 register.
  626. //
  627. //*****************************************************************************
  628. #define ADC_SSOP2_S3DCOP 0x00001000 // Sample 7 Digital Comparator
  629. // Operation.
  630. #define ADC_SSOP2_S2DCOP 0x00000100 // Sample 2 Digital Comparator
  631. // Operation.
  632. #define ADC_SSOP2_S1DCOP 0x00000010 // Sample 1 Digital Comparator
  633. // Operation.
  634. #define ADC_SSOP2_S0DCOP 0x00000001 // Sample 0 Digital Comparator
  635. // Operation.
  636. //*****************************************************************************
  637. //
  638. // The following are defines for the bit fields in the ADC_O_SSOP3 register.
  639. //
  640. //*****************************************************************************
  641. #define ADC_SSOP3_S0DCOP 0x00000001 // Sample 7 Digital Comparator
  642. // Operation.
  643. //*****************************************************************************
  644. //
  645. // The following are defines for the bit fields in the ADC_O_DCRIC register.
  646. //
  647. //*****************************************************************************
  648. #define ADC_DCRIC_DCTRIG7 0x00800000 // Digital Comparator Trigger 7.
  649. #define ADC_DCRIC_DCTRIG6 0x00400000 // Digital Comparator Trigger 6.
  650. #define ADC_DCRIC_DCTRIG5 0x00200000 // Digital Comparator Trigger 5.
  651. #define ADC_DCRIC_DCTRIG4 0x00100000 // Digital Comparator Trigger 4.
  652. #define ADC_DCRIC_DCTRIG3 0x00080000 // Digital Comparator Trigger 3.
  653. #define ADC_DCRIC_DCTRIG2 0x00040000 // Digital Comparator Trigger 2.
  654. #define ADC_DCRIC_DCTRIG1 0x00020000 // Digital Comparator Trigger 1.
  655. #define ADC_DCRIC_DCTRIG0 0x00010000 // Digital Comparator Trigger 0.
  656. #define ADC_DCRIC_DCINT7 0x00000080 // Digital Comparator Interrupt 7.
  657. #define ADC_DCRIC_DCINT6 0x00000040 // Digital Comparator Interrupt 6.
  658. #define ADC_DCRIC_DCINT5 0x00000020 // Digital Comparator Interrupt 5.
  659. #define ADC_DCRIC_DCINT4 0x00000010 // Digital Comparator Interrupt 4.
  660. #define ADC_DCRIC_DCINT3 0x00000008 // Digital Comparator Interrupt 3.
  661. #define ADC_DCRIC_DCINT2 0x00000004 // Digital Comparator Interrupt 2.
  662. #define ADC_DCRIC_DCINT1 0x00000002 // Digital Comparator Interrupt 1.
  663. #define ADC_DCRIC_DCINT0 0x00000001 // Digital Comparator Interrupt 0.
  664. //*****************************************************************************
  665. //
  666. // The following are defines for the bit fields in the ADC_O_DCCTL0 register.
  667. //
  668. //*****************************************************************************
  669. #define ADC_DCCTL0_CTE 0x00001000 // Comparison Trigger Enable.
  670. #define ADC_DCCTL0_CTC_M 0x00000C00 // Comparison Trigger Condition.
  671. #define ADC_DCCTL0_CTC_LOW 0x00000000 // CV < COMP0 and < COMP1
  672. #define ADC_DCCTL0_CTC_MID 0x00000400 // COMP0 >= CV < COMP1
  673. #define ADC_DCCTL0_CTC_HIGH 0x00000C00 // CV <= COMP0 and <= COMP1
  674. #define ADC_DCCTL0_CTM_M 0x00000300 // Comparison Trigger Mode.
  675. #define ADC_DCCTL0_CTM_ALWAYS 0x00000000 // Always
  676. #define ADC_DCCTL0_CTM_ONCE 0x00000100 // Once
  677. #define ADC_DCCTL0_CTM_HALWAYS 0x00000200 // Hysteresis always
  678. #define ADC_DCCTL0_CTM_HONCE 0x00000300 // Hysteresis once
  679. #define ADC_DCCTL0_CIE 0x00000010 // Comparison Interrupt Enable.
  680. #define ADC_DCCTL0_CIC_M 0x0000000C // Comparison Interrupt Condition.
  681. #define ADC_DCCTL0_CIC_LOW 0x00000000 // CV < COMP0 and < COMP1
  682. #define ADC_DCCTL0_CIC_MID 0x00000004 // COMP0 >= CV < COMP1
  683. #define ADC_DCCTL0_CIC_HIGH 0x0000000C // CV <= COMP0 and <= COMP1
  684. #define ADC_DCCTL0_CIM_M 0x00000003 // Comparison Interrupt Mode.
  685. #define ADC_DCCTL0_CIM_ALWAYS 0x00000000 // Always
  686. #define ADC_DCCTL0_CIM_ONCE 0x00000001 // Once
  687. #define ADC_DCCTL0_CIM_HALWAYS 0x00000002 // Hysteresis always
  688. #define ADC_DCCTL0_CIM_HONCE 0x00000003 // Hysteresis once
  689. //*****************************************************************************
  690. //
  691. // The following are defines for the bit fields in the ADC_O_DCCTL1 register.
  692. //
  693. //*****************************************************************************
  694. #define ADC_DCCTL1_CTE 0x00001000 // Comparison Trigger Enable.
  695. #define ADC_DCCTL1_CTC_M 0x00000C00 // Comparison Trigger Condition.
  696. #define ADC_DCCTL1_CTC_LOW 0x00000000 // CV < COMP0 and < COMP1
  697. #define ADC_DCCTL1_CTC_MID 0x00000400 // COMP0 >= CV < COMP1
  698. #define ADC_DCCTL1_CTC_HIGH 0x00000C00 // CV <= COMP0 and <= COMP1
  699. #define ADC_DCCTL1_CTM_M 0x00000300 // Comparison Trigger Mode.
  700. #define ADC_DCCTL1_CTM_ALWAYS 0x00000000 // Always
  701. #define ADC_DCCTL1_CTM_ONCE 0x00000100 // Once
  702. #define ADC_DCCTL1_CTM_HALWAYS 0x00000200 // Hysteresis always
  703. #define ADC_DCCTL1_CTM_HONCE 0x00000300 // Hysteresis once
  704. #define ADC_DCCTL1_CIE 0x00000010 // Comparison Interrupt Enable.
  705. #define ADC_DCCTL1_CIC_M 0x0000000C // Comparison Interrupt Condition.
  706. #define ADC_DCCTL1_CIC_LOW 0x00000000 // CV < COMP0 and < COMP1
  707. #define ADC_DCCTL1_CIC_MID 0x00000004 // COMP0 >= CV < COMP1
  708. #define ADC_DCCTL1_CIC_HIGH 0x0000000C // CV <= COMP0 and <= COMP1
  709. #define ADC_DCCTL1_CIM_M 0x00000003 // Comparison Interrupt Mode.
  710. #define ADC_DCCTL1_CIM_ALWAYS 0x00000000 // Always
  711. #define ADC_DCCTL1_CIM_ONCE 0x00000001 // Once
  712. #define ADC_DCCTL1_CIM_HALWAYS 0x00000002 // Hysteresis always
  713. #define ADC_DCCTL1_CIM_HONCE 0x00000003 // Hysteresis once
  714. //*****************************************************************************
  715. //
  716. // The following are defines for the bit fields in the ADC_O_DCCTL2 register.
  717. //
  718. //*****************************************************************************
  719. #define ADC_DCCTL2_CTE 0x00001000 // Comparison Trigger Enable.
  720. #define ADC_DCCTL2_CTC_M 0x00000C00 // Comparison Trigger Condition.
  721. #define ADC_DCCTL2_CTC_LOW 0x00000000 // CV < COMP0 and < COMP1
  722. #define ADC_DCCTL2_CTC_MID 0x00000400 // COMP0 >= CV < COMP1
  723. #define ADC_DCCTL2_CTC_HIGH 0x00000C00 // CV <= COMP0 and <= COMP1
  724. #define ADC_DCCTL2_CTM_M 0x00000300 // Comparison Trigger Mode.
  725. #define ADC_DCCTL2_CTM_ALWAYS 0x00000000 // Always
  726. #define ADC_DCCTL2_CTM_ONCE 0x00000100 // Once
  727. #define ADC_DCCTL2_CTM_HALWAYS 0x00000200 // Hysteresis always
  728. #define ADC_DCCTL2_CTM_HONCE 0x00000300 // Hysteresis once
  729. #define ADC_DCCTL2_CIE 0x00000010 // Comparison Interrupt Enable.
  730. #define ADC_DCCTL2_CIC_M 0x0000000C // Comparison Interrupt Condition.
  731. #define ADC_DCCTL2_CIC_LOW 0x00000000 // CV < COMP0 and < COMP1
  732. #define ADC_DCCTL2_CIC_MID 0x00000004 // COMP0 >= CV < COMP1
  733. #define ADC_DCCTL2_CIC_HIGH 0x0000000C // CV <= COMP0 and <= COMP1
  734. #define ADC_DCCTL2_CIM_M 0x00000003 // Comparison Interrupt Mode.
  735. #define ADC_DCCTL2_CIM_ALWAYS 0x00000000 // Always
  736. #define ADC_DCCTL2_CIM_ONCE 0x00000001 // Once
  737. #define ADC_DCCTL2_CIM_HALWAYS 0x00000002 // Hysteresis always
  738. #define ADC_DCCTL2_CIM_HONCE 0x00000003 // Hysteresis once
  739. //*****************************************************************************
  740. //
  741. // The following are defines for the bit fields in the ADC_O_DCCTL3 register.
  742. //
  743. //*****************************************************************************
  744. #define ADC_DCCTL3_CTE 0x00001000 // Comparison Trigger Enable.
  745. #define ADC_DCCTL3_CTC_M 0x00000C00 // Comparison Trigger Condition.
  746. #define ADC_DCCTL3_CTC_LOW 0x00000000 // CV < COMP0 and < COMP1
  747. #define ADC_DCCTL3_CTC_MID 0x00000400 // COMP0 >= CV < COMP1
  748. #define ADC_DCCTL3_CTC_HIGH 0x00000C00 // CV <= COMP0 and <= COMP1
  749. #define ADC_DCCTL3_CTM_M 0x00000300 // Comparison Trigger Mode.
  750. #define ADC_DCCTL3_CTM_ALWAYS 0x00000000 // Always
  751. #define ADC_DCCTL3_CTM_ONCE 0x00000100 // Once
  752. #define ADC_DCCTL3_CTM_HALWAYS 0x00000200 // Hysteresis always
  753. #define ADC_DCCTL3_CTM_HONCE 0x00000300 // Hysteresis once
  754. #define ADC_DCCTL3_CIE 0x00000010 // Comparison Interrupt Enable.
  755. #define ADC_DCCTL3_CIC_M 0x0000000C // Comparison Interrupt Condition.
  756. #define ADC_DCCTL3_CIC_LOW 0x00000000 // CV < COMP0 and < COMP1
  757. #define ADC_DCCTL3_CIC_MID 0x00000004 // COMP0 >= CV < COMP1
  758. #define ADC_DCCTL3_CIC_HIGH 0x0000000C // CV <= COMP0 and <= COMP1
  759. #define ADC_DCCTL3_CIM_M 0x00000003 // Comparison Interrupt Mode.
  760. #define ADC_DCCTL3_CIM_ALWAYS 0x00000000 // Always
  761. #define ADC_DCCTL3_CIM_ONCE 0x00000001 // Once
  762. #define ADC_DCCTL3_CIM_HALWAYS 0x00000002 // Hysteresis always
  763. #define ADC_DCCTL3_CIM_HONCE 0x00000003 // Hysteresis once
  764. //*****************************************************************************
  765. //
  766. // The following are defines for the bit fields in the ADC_O_DCCTL4 register.
  767. //
  768. //*****************************************************************************
  769. #define ADC_DCCTL4_CTE 0x00001000 // Comparison Trigger Enable.
  770. #define ADC_DCCTL4_CTC_M 0x00000C00 // Comparison Trigger Condition.
  771. #define ADC_DCCTL4_CTC_LOW 0x00000000 // CV < COMP0 and < COMP1
  772. #define ADC_DCCTL4_CTC_MID 0x00000400 // COMP0 >= CV < COMP1
  773. #define ADC_DCCTL4_CTC_HIGH 0x00000C00 // CV <= COMP0 and <= COMP1
  774. #define ADC_DCCTL4_CTM_M 0x00000300 // Comparison Trigger Mode.
  775. #define ADC_DCCTL4_CTM_ALWAYS 0x00000000 // Always
  776. #define ADC_DCCTL4_CTM_ONCE 0x00000100 // Once
  777. #define ADC_DCCTL4_CTM_HALWAYS 0x00000200 // Hysteresis always
  778. #define ADC_DCCTL4_CTM_HONCE 0x00000300 // Hysteresis once
  779. #define ADC_DCCTL4_CIE 0x00000010 // Comparison Interrupt Enable.
  780. #define ADC_DCCTL4_CIC_M 0x0000000C // Comparison Interrupt Condition.
  781. #define ADC_DCCTL4_CIC_LOW 0x00000000 // CV < COMP0 and < COMP1
  782. #define ADC_DCCTL4_CIC_MID 0x00000004 // COMP0 >= CV < COMP1
  783. #define ADC_DCCTL4_CIC_HIGH 0x0000000C // CV <= COMP0 and <= COMP1
  784. #define ADC_DCCTL4_CIM_M 0x00000003 // Comparison Interrupt Mode.
  785. #define ADC_DCCTL4_CIM_ALWAYS 0x00000000 // Always
  786. #define ADC_DCCTL4_CIM_ONCE 0x00000001 // Once
  787. #define ADC_DCCTL4_CIM_HALWAYS 0x00000002 // Hysteresis always
  788. #define ADC_DCCTL4_CIM_HONCE 0x00000003 // Hysteresis once
  789. //*****************************************************************************
  790. //
  791. // The following are defines for the bit fields in the ADC_O_DCCTL5 register.
  792. //
  793. //*****************************************************************************
  794. #define ADC_DCCTL5_CTE 0x00001000 // Comparison Trigger Enable.
  795. #define ADC_DCCTL5_CTC_M 0x00000C00 // Comparison Trigger Condition.
  796. #define ADC_DCCTL5_CTC_LOW 0x00000000 // CV < COMP0 and < COMP1
  797. #define ADC_DCCTL5_CTC_MID 0x00000400 // COMP0 >= CV < COMP1
  798. #define ADC_DCCTL5_CTC_HIGH 0x00000C00 // CV <= COMP0 and <= COMP1
  799. #define ADC_DCCTL5_CTM_M 0x00000300 // Comparison Trigger Mode.
  800. #define ADC_DCCTL5_CTM_ALWAYS 0x00000000 // Always
  801. #define ADC_DCCTL5_CTM_ONCE 0x00000100 // Once
  802. #define ADC_DCCTL5_CTM_HALWAYS 0x00000200 // Hysteresis always
  803. #define ADC_DCCTL5_CTM_HONCE 0x00000300 // Hysteresis once
  804. #define ADC_DCCTL5_CIE 0x00000010 // Comparison Interrupt Enable.
  805. #define ADC_DCCTL5_CIC_M 0x0000000C // Comparison Interrupt Condition.
  806. #define ADC_DCCTL5_CIC_LOW 0x00000000 // CV < COMP0 and < COMP1
  807. #define ADC_DCCTL5_CIC_MID 0x00000004 // COMP0 >= CV < COMP1
  808. #define ADC_DCCTL5_CIC_HIGH 0x0000000C // CV <= COMP0 and <= COMP1
  809. #define ADC_DCCTL5_CIM_M 0x00000003 // Comparison Interrupt Mode.
  810. #define ADC_DCCTL5_CIM_ALWAYS 0x00000000 // Always
  811. #define ADC_DCCTL5_CIM_ONCE 0x00000001 // Once
  812. #define ADC_DCCTL5_CIM_HALWAYS 0x00000002 // Hysteresis always
  813. #define ADC_DCCTL5_CIM_HONCE 0x00000003 // Hysteresis once
  814. //*****************************************************************************
  815. //
  816. // The following are defines for the bit fields in the ADC_O_DCCTL6 register.
  817. //
  818. //*****************************************************************************
  819. #define ADC_DCCTL6_CTE 0x00001000 // Comparison Trigger Enable.
  820. #define ADC_DCCTL6_CTC_M 0x00000C00 // Comparison Trigger Condition.
  821. #define ADC_DCCTL6_CTC_LOW 0x00000000 // CV < COMP0 and < COMP1
  822. #define ADC_DCCTL6_CTC_MID 0x00000400 // COMP0 >= CV < COMP1
  823. #define ADC_DCCTL6_CTC_HIGH 0x00000C00 // CV <= COMP0 and <= COMP1
  824. #define ADC_DCCTL6_CTM_M 0x00000300 // Comparison Trigger Mode.
  825. #define ADC_DCCTL6_CTM_ALWAYS 0x00000000 // Always
  826. #define ADC_DCCTL6_CTM_ONCE 0x00000100 // Once
  827. #define ADC_DCCTL6_CTM_HALWAYS 0x00000200 // Hysteresis always
  828. #define ADC_DCCTL6_CTM_HONCE 0x00000300 // Hysteresis once
  829. #define ADC_DCCTL6_CIE 0x00000010 // Comparison Interrupt Enable.
  830. #define ADC_DCCTL6_CIC_M 0x0000000C // Comparison Interrupt Condition.
  831. #define ADC_DCCTL6_CIC_LOW 0x00000000 // CV < COMP0 and < COMP1
  832. #define ADC_DCCTL6_CIC_MID 0x00000004 // COMP0 >= CV < COMP1
  833. #define ADC_DCCTL6_CIC_HIGH 0x0000000C // CV <= COMP0 and <= COMP1
  834. #define ADC_DCCTL6_CIM_M 0x00000003 // Comparison Interrupt Mode.
  835. #define ADC_DCCTL6_CIM_ALWAYS 0x00000000 // Always
  836. #define ADC_DCCTL6_CIM_ONCE 0x00000001 // Once
  837. #define ADC_DCCTL6_CIM_HALWAYS 0x00000002 // Hysteresis always
  838. #define ADC_DCCTL6_CIM_HONCE 0x00000003 // Hysteresis once
  839. //*****************************************************************************
  840. //
  841. // The following are defines for the bit fields in the ADC_O_DCCTL7 register.
  842. //
  843. //*****************************************************************************
  844. #define ADC_DCCTL7_CTE 0x00001000 // Comparison Trigger Enable.
  845. #define ADC_DCCTL7_CTC_M 0x00000C00 // Comparison Trigger Condition.
  846. #define ADC_DCCTL7_CTC_LOW 0x00000000 // CV < COMP0 and < COMP1
  847. #define ADC_DCCTL7_CTC_MID 0x00000400 // COMP0 >= CV < COMP1
  848. #define ADC_DCCTL7_CTC_HIGH 0x00000C00 // CV <= COMP0 and <= COMP1
  849. #define ADC_DCCTL7_CTM_M 0x00000300 // Comparison Trigger Mode.
  850. #define ADC_DCCTL7_CTM_ALWAYS 0x00000000 // Always
  851. #define ADC_DCCTL7_CTM_ONCE 0x00000100 // Once
  852. #define ADC_DCCTL7_CTM_HALWAYS 0x00000200 // Hysteresis always
  853. #define ADC_DCCTL7_CTM_HONCE 0x00000300 // Hysteresis once
  854. #define ADC_DCCTL7_CIE 0x00000010 // Comparison Interrupt Enable.
  855. #define ADC_DCCTL7_CIC_M 0x0000000C // Comparison Interrupt Condition.
  856. #define ADC_DCCTL7_CIC_LOW 0x00000000 // CV < COMP0 and < COMP1
  857. #define ADC_DCCTL7_CIC_MID 0x00000004 // COMP0 >= CV < COMP1
  858. #define ADC_DCCTL7_CIC_HIGH 0x0000000C // CV <= COMP0 and <= COMP1
  859. #define ADC_DCCTL7_CIM_M 0x00000003 // Comparison Interrupt Mode.
  860. #define ADC_DCCTL7_CIM_ALWAYS 0x00000000 // Always
  861. #define ADC_DCCTL7_CIM_ONCE 0x00000001 // Once
  862. #define ADC_DCCTL7_CIM_HALWAYS 0x00000002 // Hysteresis always
  863. #define ADC_DCCTL7_CIM_HONCE 0x00000003 // Hysteresis once
  864. //*****************************************************************************
  865. //
  866. // The following are defines for the bit fields in the ADC_O_DCCMP0 register.
  867. //
  868. //*****************************************************************************
  869. #define ADC_DCCMP0_COMP1_M 0x03FF0000 // Compare 1.
  870. #define ADC_DCCMP0_COMP0_M 0x000003FF // Compare 0.
  871. #define ADC_DCCMP0_COMP1_S 16
  872. #define ADC_DCCMP0_COMP0_S 0
  873. //*****************************************************************************
  874. //
  875. // The following are defines for the bit fields in the ADC_O_DCCMP1 register.
  876. //
  877. //*****************************************************************************
  878. #define ADC_DCCMP1_COMP1_M 0x03FF0000 // Compare 1.
  879. #define ADC_DCCMP1_COMP0_M 0x000003FF // Compare 0.
  880. #define ADC_DCCMP1_COMP1_S 16
  881. #define ADC_DCCMP1_COMP0_S 0
  882. //*****************************************************************************
  883. //
  884. // The following are defines for the bit fields in the ADC_O_DCCMP2 register.
  885. //
  886. //*****************************************************************************
  887. #define ADC_DCCMP2_COMP1_M 0x03FF0000 // Compare 1.
  888. #define ADC_DCCMP2_COMP0_M 0x000003FF // Compare 0.
  889. #define ADC_DCCMP2_COMP1_S 16
  890. #define ADC_DCCMP2_COMP0_S 0
  891. //*****************************************************************************
  892. //
  893. // The following are defines for the bit fields in the ADC_O_DCCMP3 register.
  894. //
  895. //*****************************************************************************
  896. #define ADC_DCCMP3_COMP1_M 0x03FF0000 // Compare 1.
  897. #define ADC_DCCMP3_COMP0_M 0x000003FF // Compare 0.
  898. #define ADC_DCCMP3_COMP1_S 16
  899. #define ADC_DCCMP3_COMP0_S 0
  900. //*****************************************************************************
  901. //
  902. // The following are defines for the bit fields in the ADC_O_DCCMP4 register.
  903. //
  904. //*****************************************************************************
  905. #define ADC_DCCMP4_COMP1_M 0x03FF0000 // Compare 1.
  906. #define ADC_DCCMP4_COMP0_M 0x000003FF // Compare 0.
  907. #define ADC_DCCMP4_COMP1_S 16
  908. #define ADC_DCCMP4_COMP0_S 0
  909. //*****************************************************************************
  910. //
  911. // The following are defines for the bit fields in the ADC_O_DCCMP5 register.
  912. //
  913. //*****************************************************************************
  914. #define ADC_DCCMP5_COMP1_M 0x03FF0000 // Compare 1.
  915. #define ADC_DCCMP5_COMP0_M 0x000003FF // Compare 0.
  916. #define ADC_DCCMP5_COMP1_S 16
  917. #define ADC_DCCMP5_COMP0_S 0
  918. //*****************************************************************************
  919. //
  920. // The following are defines for the bit fields in the ADC_O_DCCMP6 register.
  921. //
  922. //*****************************************************************************
  923. #define ADC_DCCMP6_COMP1_M 0x03FF0000 // Compare 1.
  924. #define ADC_DCCMP6_COMP0_M 0x000003FF // Compare 0.
  925. #define ADC_DCCMP6_COMP1_S 16
  926. #define ADC_DCCMP6_COMP0_S 0
  927. //*****************************************************************************
  928. //
  929. // The following are defines for the bit fields in the ADC_O_DCCMP7 register.
  930. //
  931. //*****************************************************************************
  932. #define ADC_DCCMP7_COMP1_M 0x03FF0000 // Compare 1.
  933. #define ADC_DCCMP7_COMP0_M 0x000003FF // Compare 0.
  934. #define ADC_DCCMP7_COMP1_S 16
  935. #define ADC_DCCMP7_COMP0_S 0
  936. //*****************************************************************************
  937. //
  938. // The following are defines for the bit fields in the ADC_O_CTL register.
  939. //
  940. //*****************************************************************************
  941. #define ADC_CTL_VREF 0x00000001 // Voltage Reference Select.
  942. //*****************************************************************************
  943. //
  944. // The following definitions are deprecated.
  945. //
  946. //*****************************************************************************
  947. #ifndef DEPRECATED
  948. //*****************************************************************************
  949. //
  950. // The following are deprecated defines for the ADC sequence register offsets.
  951. //
  952. //*****************************************************************************
  953. #define ADC_O_SEQ 0x00000040 // Offset to the first sequence
  954. #define ADC_O_SEQ_STEP 0x00000020 // Increment to the next sequence
  955. #define ADC_O_X_SSFSTAT 0x0000000C // FIFO status register
  956. #define ADC_O_X_SSFIFO 0x00000008 // Result FIFO register
  957. #define ADC_O_X_SSCTL 0x00000004 // Sample sequence control register
  958. #define ADC_O_X_SSMUX 0x00000000 // Multiplexer select register
  959. //*****************************************************************************
  960. //
  961. // The following are deprecated defines for the bit fields in the ADC_EMUX
  962. // register.
  963. //
  964. //*****************************************************************************
  965. #define ADC_EMUX_EM3_MASK 0x0000F000 // Event mux 3 mask
  966. #define ADC_EMUX_EM2_MASK 0x00000F00 // Event mux 2 mask
  967. #define ADC_EMUX_EM1_MASK 0x000000F0 // Event mux 1 mask
  968. #define ADC_EMUX_EM0_MASK 0x0000000F // Event mux 0 mask
  969. #define ADC_EMUX_EM3_SHIFT 12 // The shift for the fourth event
  970. #define ADC_EMUX_EM2_SHIFT 8 // The shift for the third event
  971. #define ADC_EMUX_EM1_SHIFT 4 // The shift for the second event
  972. #define ADC_EMUX_EM0_SHIFT 0 // The shift for the first event
  973. //*****************************************************************************
  974. //
  975. // The following are deprecated defines for the bit fields in the ADC_SSPRI
  976. // register.
  977. //
  978. //*****************************************************************************
  979. #define ADC_SSPRI_SS3_MASK 0x00003000 // Sequencer 3 priority mask
  980. #define ADC_SSPRI_SS2_MASK 0x00000300 // Sequencer 2 priority mask
  981. #define ADC_SSPRI_SS1_MASK 0x00000030 // Sequencer 1 priority mask
  982. #define ADC_SSPRI_SS0_MASK 0x00000003 // Sequencer 0 priority mask
  983. //*****************************************************************************
  984. //
  985. // The following are deprecated defines for the bit fields in the ADC_SSMUX0,
  986. // ADC_SSMUX1, ADC_SSMUX2, and ADC_SSMUX3 registers. Not all fields are present
  987. // in all registers.
  988. //
  989. //*****************************************************************************
  990. #define ADC_SSMUX_MUX7_MASK 0x70000000 // 8th mux select mask
  991. #define ADC_SSMUX_MUX6_MASK 0x07000000 // 7th mux select mask
  992. #define ADC_SSMUX_MUX5_MASK 0x00700000 // 6th mux select mask
  993. #define ADC_SSMUX_MUX4_MASK 0x00070000 // 5th mux select mask
  994. #define ADC_SSMUX_MUX3_MASK 0x00007000 // 4th mux select mask
  995. #define ADC_SSMUX_MUX2_MASK 0x00000700 // 3rd mux select mask
  996. #define ADC_SSMUX_MUX1_MASK 0x00000070 // 2nd mux select mask
  997. #define ADC_SSMUX_MUX0_MASK 0x00000007 // 1st mux select mask
  998. #define ADC_SSMUX_MUX7_SHIFT 28
  999. #define ADC_SSMUX_MUX6_SHIFT 24
  1000. #define ADC_SSMUX_MUX5_SHIFT 20
  1001. #define ADC_SSMUX_MUX4_SHIFT 16
  1002. #define ADC_SSMUX_MUX3_SHIFT 12
  1003. #define ADC_SSMUX_MUX2_SHIFT 8
  1004. #define ADC_SSMUX_MUX1_SHIFT 4
  1005. #define ADC_SSMUX_MUX0_SHIFT 0
  1006. //*****************************************************************************
  1007. //
  1008. // The following are deprecated defines for the bit fields in the ADC_SSCTL0,
  1009. // ADC_SSCTL1, ADC_SSCTL2, and ADC_SSCTL3 registers. Not all fields are present
  1010. // in all registers.
  1011. //
  1012. //*****************************************************************************
  1013. #define ADC_SSCTL_TS7 0x80000000 // 8th temperature sensor select
  1014. #define ADC_SSCTL_IE7 0x40000000 // 8th interrupt enable
  1015. #define ADC_SSCTL_END7 0x20000000 // 8th sequence end select
  1016. #define ADC_SSCTL_D7 0x10000000 // 8th differential select
  1017. #define ADC_SSCTL_TS6 0x08000000 // 7th temperature sensor select
  1018. #define ADC_SSCTL_IE6 0x04000000 // 7th interrupt enable
  1019. #define ADC_SSCTL_END6 0x02000000 // 7th sequence end select
  1020. #define ADC_SSCTL_D6 0x01000000 // 7th differential select
  1021. #define ADC_SSCTL_TS5 0x00800000 // 6th temperature sensor select
  1022. #define ADC_SSCTL_IE5 0x00400000 // 6th interrupt enable
  1023. #define ADC_SSCTL_END5 0x00200000 // 6th sequence end select
  1024. #define ADC_SSCTL_D5 0x00100000 // 6th differential select
  1025. #define ADC_SSCTL_TS4 0x00080000 // 5th temperature sensor select
  1026. #define ADC_SSCTL_IE4 0x00040000 // 5th interrupt enable
  1027. #define ADC_SSCTL_END4 0x00020000 // 5th sequence end select
  1028. #define ADC_SSCTL_D4 0x00010000 // 5th differential select
  1029. #define ADC_SSCTL_TS3 0x00008000 // 4th temperature sensor select
  1030. #define ADC_SSCTL_IE3 0x00004000 // 4th interrupt enable
  1031. #define ADC_SSCTL_END3 0x00002000 // 4th sequence end select
  1032. #define ADC_SSCTL_D3 0x00001000 // 4th differential select
  1033. #define ADC_SSCTL_TS2 0x00000800 // 3rd temperature sensor select
  1034. #define ADC_SSCTL_IE2 0x00000400 // 3rd interrupt enable
  1035. #define ADC_SSCTL_END2 0x00000200 // 3rd sequence end select
  1036. #define ADC_SSCTL_D2 0x00000100 // 3rd differential select
  1037. #define ADC_SSCTL_TS1 0x00000080 // 2nd temperature sensor select
  1038. #define ADC_SSCTL_IE1 0x00000040 // 2nd interrupt enable
  1039. #define ADC_SSCTL_END1 0x00000020 // 2nd sequence end select
  1040. #define ADC_SSCTL_D1 0x00000010 // 2nd differential select
  1041. #define ADC_SSCTL_TS0 0x00000008 // 1st temperature sensor select
  1042. #define ADC_SSCTL_IE0 0x00000004 // 1st interrupt enable
  1043. #define ADC_SSCTL_END0 0x00000002 // 1st sequence end select
  1044. #define ADC_SSCTL_D0 0x00000001 // 1st differential select
  1045. //*****************************************************************************
  1046. //
  1047. // The following are deprecated defines for the bit fields in the ADC_SSFIFO0,
  1048. // ADC_SSFIFO1, ADC_SSFIFO2, and ADC_SSFIFO3 registers.
  1049. //
  1050. //*****************************************************************************
  1051. #define ADC_SSFIFO_DATA_MASK 0x000003FF // Sample data
  1052. #define ADC_SSFIFO_DATA_SHIFT 0
  1053. //*****************************************************************************
  1054. //
  1055. // The following are deprecated defines for the bit fields in the ADC_SSFSTAT0,
  1056. // ADC_SSFSTAT1, ADC_SSFSTAT2, and ADC_SSFSTAT3 registers.
  1057. //
  1058. //*****************************************************************************
  1059. #define ADC_SSFSTAT_FULL 0x00001000 // FIFO is full
  1060. #define ADC_SSFSTAT_EMPTY 0x00000100 // FIFO is empty
  1061. #define ADC_SSFSTAT_HPTR 0x000000F0 // FIFO head pointer
  1062. #define ADC_SSFSTAT_TPTR 0x0000000F // FIFO tail pointer
  1063. //*****************************************************************************
  1064. //
  1065. // The following are deprecated defines for the the interpretation of the data
  1066. // in the SSFIFOx when the ADC TMLB is enabled.
  1067. //
  1068. //*****************************************************************************
  1069. #define ADC_TMLB_CNT_M 0x000003C0 // Continuous Sample Counter.
  1070. #define ADC_TMLB_CONT 0x00000020 // Continuation Sample Indicator.
  1071. #define ADC_TMLB_DIFF 0x00000010 // Differential Sample Indicator.
  1072. #define ADC_TMLB_TS 0x00000008 // Temp Sensor Sample Indicator.
  1073. #define ADC_TMLB_MUX_M 0x00000007 // Analog Input Indicator.
  1074. #define ADC_TMLB_CNT_S 6 // Sample counter shift
  1075. #define ADC_TMLB_MUX_S 0 // Input channel number shift
  1076. //*****************************************************************************
  1077. //
  1078. // The following are deprecated defines for the bit fields in the loopback ADC
  1079. // data.
  1080. //
  1081. //*****************************************************************************
  1082. #define ADC_LB_CNT_MASK 0x000003C0 // Sample counter mask
  1083. #define ADC_LB_CONT 0x00000020 // Continuation sample
  1084. #define ADC_LB_DIFF 0x00000010 // Differential sample
  1085. #define ADC_LB_TS 0x00000008 // Temperature sensor sample
  1086. #define ADC_LB_MUX_MASK 0x00000007 // Input channel number mask
  1087. #define ADC_LB_CNT_SHIFT 6 // Sample counter shift
  1088. #define ADC_LB_MUX_SHIFT 0 // Input channel number shift
  1089. #endif
  1090. #endif // __HW_ADC_H__