tc.h 93 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027
  1. /**
  2. * \file
  3. *
  4. * \brief Component description for TC
  5. *
  6. * Copyright (c) 2018 Microchip Technology Inc.
  7. *
  8. * \license_start
  9. *
  10. * \page License
  11. *
  12. * SPDX-License-Identifier: Apache-2.0
  13. *
  14. * Licensed under the Apache License, Version 2.0 (the "License");
  15. * you may not use this file except in compliance with the License.
  16. * You may obtain a copy of the License at
  17. *
  18. * http://www.apache.org/licenses/LICENSE-2.0
  19. *
  20. * Unless required by applicable law or agreed to in writing, software
  21. * distributed under the License is distributed on an "AS IS" BASIS,
  22. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  23. * See the License for the specific language governing permissions and
  24. * limitations under the License.
  25. *
  26. * \license_stop
  27. *
  28. */
  29. /* file generated from device description version 2018-05-30T11:07:17Z */
  30. #ifndef _SAML11_TC_COMPONENT_H_
  31. #define _SAML11_TC_COMPONENT_H_
  32. #define _SAML11_TC_COMPONENT_ /**< \deprecated Backward compatibility for ASF */
  33. /** \addtogroup SAML_SAML11 Basic Timer Counter
  34. * @{
  35. */
  36. /* ========================================================================== */
  37. /** SOFTWARE API DEFINITION FOR TC */
  38. /* ========================================================================== */
  39. #define TC_U2249 /**< (TC) Module ID */
  40. #define REV_TC 0x310 /**< (TC) Module revision */
  41. /* -------- TC_CTRLA : (TC Offset: 0x00) (R/W 32) Control A -------- */
  42. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  43. typedef union {
  44. struct {
  45. uint32_t SWRST:1; /**< bit: 0 Software Reset */
  46. uint32_t ENABLE:1; /**< bit: 1 Enable */
  47. uint32_t MODE:2; /**< bit: 2..3 Timer Counter Mode */
  48. uint32_t PRESCSYNC:2; /**< bit: 4..5 Prescaler and Counter Synchronization */
  49. uint32_t RUNSTDBY:1; /**< bit: 6 Run during Standby */
  50. uint32_t ONDEMAND:1; /**< bit: 7 Clock On Demand */
  51. uint32_t PRESCALER:3; /**< bit: 8..10 Prescaler */
  52. uint32_t ALOCK:1; /**< bit: 11 Auto Lock */
  53. uint32_t :4; /**< bit: 12..15 Reserved */
  54. uint32_t CAPTEN0:1; /**< bit: 16 Capture Channel 0 Enable */
  55. uint32_t CAPTEN1:1; /**< bit: 17 Capture Channel 1 Enable */
  56. uint32_t :2; /**< bit: 18..19 Reserved */
  57. uint32_t COPEN0:1; /**< bit: 20 Capture On Pin 0 Enable */
  58. uint32_t COPEN1:1; /**< bit: 21 Capture On Pin 1 Enable */
  59. uint32_t :2; /**< bit: 22..23 Reserved */
  60. uint32_t CAPTMODE0:2; /**< bit: 24..25 Capture Mode Channel 0 */
  61. uint32_t :1; /**< bit: 26 Reserved */
  62. uint32_t CAPTMODE1:2; /**< bit: 27..28 Capture mode Channel 1 */
  63. uint32_t :3; /**< bit: 29..31 Reserved */
  64. } bit; /**< Structure used for bit access */
  65. struct {
  66. uint32_t :16; /**< bit: 0..15 Reserved */
  67. uint32_t CAPTEN:2; /**< bit: 16..17 Capture Channel x Enable */
  68. uint32_t :2; /**< bit: 18..19 Reserved */
  69. uint32_t COPEN:2; /**< bit: 20..21 Capture On Pin x Enable */
  70. uint32_t :10; /**< bit: 22..31 Reserved */
  71. } vec; /**< Structure used for vec access */
  72. uint32_t reg; /**< Type used for register access */
  73. } TC_CTRLA_Type;
  74. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  75. #define TC_CTRLA_OFFSET (0x00) /**< (TC_CTRLA) Control A Offset */
  76. #define TC_CTRLA_RESETVALUE _U_(0x00) /**< (TC_CTRLA) Control A Reset Value */
  77. #define TC_CTRLA_SWRST_Pos 0 /**< (TC_CTRLA) Software Reset Position */
  78. #define TC_CTRLA_SWRST_Msk (_U_(0x1) << TC_CTRLA_SWRST_Pos) /**< (TC_CTRLA) Software Reset Mask */
  79. #define TC_CTRLA_SWRST TC_CTRLA_SWRST_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CTRLA_SWRST_Msk instead */
  80. #define TC_CTRLA_ENABLE_Pos 1 /**< (TC_CTRLA) Enable Position */
  81. #define TC_CTRLA_ENABLE_Msk (_U_(0x1) << TC_CTRLA_ENABLE_Pos) /**< (TC_CTRLA) Enable Mask */
  82. #define TC_CTRLA_ENABLE TC_CTRLA_ENABLE_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CTRLA_ENABLE_Msk instead */
  83. #define TC_CTRLA_MODE_Pos 2 /**< (TC_CTRLA) Timer Counter Mode Position */
  84. #define TC_CTRLA_MODE_Msk (_U_(0x3) << TC_CTRLA_MODE_Pos) /**< (TC_CTRLA) Timer Counter Mode Mask */
  85. #define TC_CTRLA_MODE(value) (TC_CTRLA_MODE_Msk & ((value) << TC_CTRLA_MODE_Pos))
  86. #define TC_CTRLA_MODE_COUNT16_Val _U_(0x0) /**< (TC_CTRLA) Counter in 16-bit mode */
  87. #define TC_CTRLA_MODE_COUNT8_Val _U_(0x1) /**< (TC_CTRLA) Counter in 8-bit mode */
  88. #define TC_CTRLA_MODE_COUNT32_Val _U_(0x2) /**< (TC_CTRLA) Counter in 32-bit mode */
  89. #define TC_CTRLA_MODE_COUNT16 (TC_CTRLA_MODE_COUNT16_Val << TC_CTRLA_MODE_Pos) /**< (TC_CTRLA) Counter in 16-bit mode Position */
  90. #define TC_CTRLA_MODE_COUNT8 (TC_CTRLA_MODE_COUNT8_Val << TC_CTRLA_MODE_Pos) /**< (TC_CTRLA) Counter in 8-bit mode Position */
  91. #define TC_CTRLA_MODE_COUNT32 (TC_CTRLA_MODE_COUNT32_Val << TC_CTRLA_MODE_Pos) /**< (TC_CTRLA) Counter in 32-bit mode Position */
  92. #define TC_CTRLA_PRESCSYNC_Pos 4 /**< (TC_CTRLA) Prescaler and Counter Synchronization Position */
  93. #define TC_CTRLA_PRESCSYNC_Msk (_U_(0x3) << TC_CTRLA_PRESCSYNC_Pos) /**< (TC_CTRLA) Prescaler and Counter Synchronization Mask */
  94. #define TC_CTRLA_PRESCSYNC(value) (TC_CTRLA_PRESCSYNC_Msk & ((value) << TC_CTRLA_PRESCSYNC_Pos))
  95. #define TC_CTRLA_PRESCSYNC_GCLK_Val _U_(0x0) /**< (TC_CTRLA) Reload or reset the counter on next generic clock */
  96. #define TC_CTRLA_PRESCSYNC_PRESC_Val _U_(0x1) /**< (TC_CTRLA) Reload or reset the counter on next prescaler clock */
  97. #define TC_CTRLA_PRESCSYNC_RESYNC_Val _U_(0x2) /**< (TC_CTRLA) Reload or reset the counter on next generic clock and reset the prescaler counter */
  98. #define TC_CTRLA_PRESCSYNC_GCLK (TC_CTRLA_PRESCSYNC_GCLK_Val << TC_CTRLA_PRESCSYNC_Pos) /**< (TC_CTRLA) Reload or reset the counter on next generic clock Position */
  99. #define TC_CTRLA_PRESCSYNC_PRESC (TC_CTRLA_PRESCSYNC_PRESC_Val << TC_CTRLA_PRESCSYNC_Pos) /**< (TC_CTRLA) Reload or reset the counter on next prescaler clock Position */
  100. #define TC_CTRLA_PRESCSYNC_RESYNC (TC_CTRLA_PRESCSYNC_RESYNC_Val << TC_CTRLA_PRESCSYNC_Pos) /**< (TC_CTRLA) Reload or reset the counter on next generic clock and reset the prescaler counter Position */
  101. #define TC_CTRLA_RUNSTDBY_Pos 6 /**< (TC_CTRLA) Run during Standby Position */
  102. #define TC_CTRLA_RUNSTDBY_Msk (_U_(0x1) << TC_CTRLA_RUNSTDBY_Pos) /**< (TC_CTRLA) Run during Standby Mask */
  103. #define TC_CTRLA_RUNSTDBY TC_CTRLA_RUNSTDBY_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CTRLA_RUNSTDBY_Msk instead */
  104. #define TC_CTRLA_ONDEMAND_Pos 7 /**< (TC_CTRLA) Clock On Demand Position */
  105. #define TC_CTRLA_ONDEMAND_Msk (_U_(0x1) << TC_CTRLA_ONDEMAND_Pos) /**< (TC_CTRLA) Clock On Demand Mask */
  106. #define TC_CTRLA_ONDEMAND TC_CTRLA_ONDEMAND_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CTRLA_ONDEMAND_Msk instead */
  107. #define TC_CTRLA_PRESCALER_Pos 8 /**< (TC_CTRLA) Prescaler Position */
  108. #define TC_CTRLA_PRESCALER_Msk (_U_(0x7) << TC_CTRLA_PRESCALER_Pos) /**< (TC_CTRLA) Prescaler Mask */
  109. #define TC_CTRLA_PRESCALER(value) (TC_CTRLA_PRESCALER_Msk & ((value) << TC_CTRLA_PRESCALER_Pos))
  110. #define TC_CTRLA_PRESCALER_DIV1_Val _U_(0x0) /**< (TC_CTRLA) Prescaler: GCLK_TC */
  111. #define TC_CTRLA_PRESCALER_DIV2_Val _U_(0x1) /**< (TC_CTRLA) Prescaler: GCLK_TC/2 */
  112. #define TC_CTRLA_PRESCALER_DIV4_Val _U_(0x2) /**< (TC_CTRLA) Prescaler: GCLK_TC/4 */
  113. #define TC_CTRLA_PRESCALER_DIV8_Val _U_(0x3) /**< (TC_CTRLA) Prescaler: GCLK_TC/8 */
  114. #define TC_CTRLA_PRESCALER_DIV16_Val _U_(0x4) /**< (TC_CTRLA) Prescaler: GCLK_TC/16 */
  115. #define TC_CTRLA_PRESCALER_DIV64_Val _U_(0x5) /**< (TC_CTRLA) Prescaler: GCLK_TC/64 */
  116. #define TC_CTRLA_PRESCALER_DIV256_Val _U_(0x6) /**< (TC_CTRLA) Prescaler: GCLK_TC/256 */
  117. #define TC_CTRLA_PRESCALER_DIV1024_Val _U_(0x7) /**< (TC_CTRLA) Prescaler: GCLK_TC/1024 */
  118. #define TC_CTRLA_PRESCALER_DIV1 (TC_CTRLA_PRESCALER_DIV1_Val << TC_CTRLA_PRESCALER_Pos) /**< (TC_CTRLA) Prescaler: GCLK_TC Position */
  119. #define TC_CTRLA_PRESCALER_DIV2 (TC_CTRLA_PRESCALER_DIV2_Val << TC_CTRLA_PRESCALER_Pos) /**< (TC_CTRLA) Prescaler: GCLK_TC/2 Position */
  120. #define TC_CTRLA_PRESCALER_DIV4 (TC_CTRLA_PRESCALER_DIV4_Val << TC_CTRLA_PRESCALER_Pos) /**< (TC_CTRLA) Prescaler: GCLK_TC/4 Position */
  121. #define TC_CTRLA_PRESCALER_DIV8 (TC_CTRLA_PRESCALER_DIV8_Val << TC_CTRLA_PRESCALER_Pos) /**< (TC_CTRLA) Prescaler: GCLK_TC/8 Position */
  122. #define TC_CTRLA_PRESCALER_DIV16 (TC_CTRLA_PRESCALER_DIV16_Val << TC_CTRLA_PRESCALER_Pos) /**< (TC_CTRLA) Prescaler: GCLK_TC/16 Position */
  123. #define TC_CTRLA_PRESCALER_DIV64 (TC_CTRLA_PRESCALER_DIV64_Val << TC_CTRLA_PRESCALER_Pos) /**< (TC_CTRLA) Prescaler: GCLK_TC/64 Position */
  124. #define TC_CTRLA_PRESCALER_DIV256 (TC_CTRLA_PRESCALER_DIV256_Val << TC_CTRLA_PRESCALER_Pos) /**< (TC_CTRLA) Prescaler: GCLK_TC/256 Position */
  125. #define TC_CTRLA_PRESCALER_DIV1024 (TC_CTRLA_PRESCALER_DIV1024_Val << TC_CTRLA_PRESCALER_Pos) /**< (TC_CTRLA) Prescaler: GCLK_TC/1024 Position */
  126. #define TC_CTRLA_ALOCK_Pos 11 /**< (TC_CTRLA) Auto Lock Position */
  127. #define TC_CTRLA_ALOCK_Msk (_U_(0x1) << TC_CTRLA_ALOCK_Pos) /**< (TC_CTRLA) Auto Lock Mask */
  128. #define TC_CTRLA_ALOCK TC_CTRLA_ALOCK_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CTRLA_ALOCK_Msk instead */
  129. #define TC_CTRLA_CAPTEN0_Pos 16 /**< (TC_CTRLA) Capture Channel 0 Enable Position */
  130. #define TC_CTRLA_CAPTEN0_Msk (_U_(0x1) << TC_CTRLA_CAPTEN0_Pos) /**< (TC_CTRLA) Capture Channel 0 Enable Mask */
  131. #define TC_CTRLA_CAPTEN0 TC_CTRLA_CAPTEN0_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CTRLA_CAPTEN0_Msk instead */
  132. #define TC_CTRLA_CAPTEN1_Pos 17 /**< (TC_CTRLA) Capture Channel 1 Enable Position */
  133. #define TC_CTRLA_CAPTEN1_Msk (_U_(0x1) << TC_CTRLA_CAPTEN1_Pos) /**< (TC_CTRLA) Capture Channel 1 Enable Mask */
  134. #define TC_CTRLA_CAPTEN1 TC_CTRLA_CAPTEN1_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CTRLA_CAPTEN1_Msk instead */
  135. #define TC_CTRLA_COPEN0_Pos 20 /**< (TC_CTRLA) Capture On Pin 0 Enable Position */
  136. #define TC_CTRLA_COPEN0_Msk (_U_(0x1) << TC_CTRLA_COPEN0_Pos) /**< (TC_CTRLA) Capture On Pin 0 Enable Mask */
  137. #define TC_CTRLA_COPEN0 TC_CTRLA_COPEN0_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CTRLA_COPEN0_Msk instead */
  138. #define TC_CTRLA_COPEN1_Pos 21 /**< (TC_CTRLA) Capture On Pin 1 Enable Position */
  139. #define TC_CTRLA_COPEN1_Msk (_U_(0x1) << TC_CTRLA_COPEN1_Pos) /**< (TC_CTRLA) Capture On Pin 1 Enable Mask */
  140. #define TC_CTRLA_COPEN1 TC_CTRLA_COPEN1_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CTRLA_COPEN1_Msk instead */
  141. #define TC_CTRLA_CAPTMODE0_Pos 24 /**< (TC_CTRLA) Capture Mode Channel 0 Position */
  142. #define TC_CTRLA_CAPTMODE0_Msk (_U_(0x3) << TC_CTRLA_CAPTMODE0_Pos) /**< (TC_CTRLA) Capture Mode Channel 0 Mask */
  143. #define TC_CTRLA_CAPTMODE0(value) (TC_CTRLA_CAPTMODE0_Msk & ((value) << TC_CTRLA_CAPTMODE0_Pos))
  144. #define TC_CTRLA_CAPTMODE0_DEFAULT_Val _U_(0x0) /**< (TC_CTRLA) Default capture */
  145. #define TC_CTRLA_CAPTMODE0_CAPTMIN_Val _U_(0x1) /**< (TC_CTRLA) Minimum capture */
  146. #define TC_CTRLA_CAPTMODE0_CAPTMAX_Val _U_(0x2) /**< (TC_CTRLA) Maximum capture */
  147. #define TC_CTRLA_CAPTMODE0_DEFAULT (TC_CTRLA_CAPTMODE0_DEFAULT_Val << TC_CTRLA_CAPTMODE0_Pos) /**< (TC_CTRLA) Default capture Position */
  148. #define TC_CTRLA_CAPTMODE0_CAPTMIN (TC_CTRLA_CAPTMODE0_CAPTMIN_Val << TC_CTRLA_CAPTMODE0_Pos) /**< (TC_CTRLA) Minimum capture Position */
  149. #define TC_CTRLA_CAPTMODE0_CAPTMAX (TC_CTRLA_CAPTMODE0_CAPTMAX_Val << TC_CTRLA_CAPTMODE0_Pos) /**< (TC_CTRLA) Maximum capture Position */
  150. #define TC_CTRLA_CAPTMODE1_Pos 27 /**< (TC_CTRLA) Capture mode Channel 1 Position */
  151. #define TC_CTRLA_CAPTMODE1_Msk (_U_(0x3) << TC_CTRLA_CAPTMODE1_Pos) /**< (TC_CTRLA) Capture mode Channel 1 Mask */
  152. #define TC_CTRLA_CAPTMODE1(value) (TC_CTRLA_CAPTMODE1_Msk & ((value) << TC_CTRLA_CAPTMODE1_Pos))
  153. #define TC_CTRLA_CAPTMODE1_DEFAULT_Val _U_(0x0) /**< (TC_CTRLA) Default capture */
  154. #define TC_CTRLA_CAPTMODE1_CAPTMIN_Val _U_(0x1) /**< (TC_CTRLA) Minimum capture */
  155. #define TC_CTRLA_CAPTMODE1_CAPTMAX_Val _U_(0x2) /**< (TC_CTRLA) Maximum capture */
  156. #define TC_CTRLA_CAPTMODE1_DEFAULT (TC_CTRLA_CAPTMODE1_DEFAULT_Val << TC_CTRLA_CAPTMODE1_Pos) /**< (TC_CTRLA) Default capture Position */
  157. #define TC_CTRLA_CAPTMODE1_CAPTMIN (TC_CTRLA_CAPTMODE1_CAPTMIN_Val << TC_CTRLA_CAPTMODE1_Pos) /**< (TC_CTRLA) Minimum capture Position */
  158. #define TC_CTRLA_CAPTMODE1_CAPTMAX (TC_CTRLA_CAPTMODE1_CAPTMAX_Val << TC_CTRLA_CAPTMODE1_Pos) /**< (TC_CTRLA) Maximum capture Position */
  159. #define TC_CTRLA_MASK _U_(0x1B330FFF) /**< \deprecated (TC_CTRLA) Register MASK (Use TC_CTRLA_Msk instead) */
  160. #define TC_CTRLA_Msk _U_(0x1B330FFF) /**< (TC_CTRLA) Register Mask */
  161. #define TC_CTRLA_CAPTEN_Pos 16 /**< (TC_CTRLA Position) Capture Channel x Enable */
  162. #define TC_CTRLA_CAPTEN_Msk (_U_(0x3) << TC_CTRLA_CAPTEN_Pos) /**< (TC_CTRLA Mask) CAPTEN */
  163. #define TC_CTRLA_CAPTEN(value) (TC_CTRLA_CAPTEN_Msk & ((value) << TC_CTRLA_CAPTEN_Pos))
  164. #define TC_CTRLA_COPEN_Pos 20 /**< (TC_CTRLA Position) Capture On Pin x Enable */
  165. #define TC_CTRLA_COPEN_Msk (_U_(0x3) << TC_CTRLA_COPEN_Pos) /**< (TC_CTRLA Mask) COPEN */
  166. #define TC_CTRLA_COPEN(value) (TC_CTRLA_COPEN_Msk & ((value) << TC_CTRLA_COPEN_Pos))
  167. /* -------- TC_CTRLBCLR : (TC Offset: 0x04) (R/W 8) Control B Clear -------- */
  168. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  169. typedef union {
  170. struct {
  171. uint8_t DIR:1; /**< bit: 0 Counter Direction */
  172. uint8_t LUPD:1; /**< bit: 1 Lock Update */
  173. uint8_t ONESHOT:1; /**< bit: 2 One-Shot on Counter */
  174. uint8_t :2; /**< bit: 3..4 Reserved */
  175. uint8_t CMD:3; /**< bit: 5..7 Command */
  176. } bit; /**< Structure used for bit access */
  177. uint8_t reg; /**< Type used for register access */
  178. } TC_CTRLBCLR_Type;
  179. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  180. #define TC_CTRLBCLR_OFFSET (0x04) /**< (TC_CTRLBCLR) Control B Clear Offset */
  181. #define TC_CTRLBCLR_RESETVALUE _U_(0x00) /**< (TC_CTRLBCLR) Control B Clear Reset Value */
  182. #define TC_CTRLBCLR_DIR_Pos 0 /**< (TC_CTRLBCLR) Counter Direction Position */
  183. #define TC_CTRLBCLR_DIR_Msk (_U_(0x1) << TC_CTRLBCLR_DIR_Pos) /**< (TC_CTRLBCLR) Counter Direction Mask */
  184. #define TC_CTRLBCLR_DIR TC_CTRLBCLR_DIR_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CTRLBCLR_DIR_Msk instead */
  185. #define TC_CTRLBCLR_LUPD_Pos 1 /**< (TC_CTRLBCLR) Lock Update Position */
  186. #define TC_CTRLBCLR_LUPD_Msk (_U_(0x1) << TC_CTRLBCLR_LUPD_Pos) /**< (TC_CTRLBCLR) Lock Update Mask */
  187. #define TC_CTRLBCLR_LUPD TC_CTRLBCLR_LUPD_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CTRLBCLR_LUPD_Msk instead */
  188. #define TC_CTRLBCLR_ONESHOT_Pos 2 /**< (TC_CTRLBCLR) One-Shot on Counter Position */
  189. #define TC_CTRLBCLR_ONESHOT_Msk (_U_(0x1) << TC_CTRLBCLR_ONESHOT_Pos) /**< (TC_CTRLBCLR) One-Shot on Counter Mask */
  190. #define TC_CTRLBCLR_ONESHOT TC_CTRLBCLR_ONESHOT_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CTRLBCLR_ONESHOT_Msk instead */
  191. #define TC_CTRLBCLR_CMD_Pos 5 /**< (TC_CTRLBCLR) Command Position */
  192. #define TC_CTRLBCLR_CMD_Msk (_U_(0x7) << TC_CTRLBCLR_CMD_Pos) /**< (TC_CTRLBCLR) Command Mask */
  193. #define TC_CTRLBCLR_CMD(value) (TC_CTRLBCLR_CMD_Msk & ((value) << TC_CTRLBCLR_CMD_Pos))
  194. #define TC_CTRLBCLR_CMD_NONE_Val _U_(0x0) /**< (TC_CTRLBCLR) No action */
  195. #define TC_CTRLBCLR_CMD_RETRIGGER_Val _U_(0x1) /**< (TC_CTRLBCLR) Force a start, restart or retrigger */
  196. #define TC_CTRLBCLR_CMD_STOP_Val _U_(0x2) /**< (TC_CTRLBCLR) Force a stop */
  197. #define TC_CTRLBCLR_CMD_UPDATE_Val _U_(0x3) /**< (TC_CTRLBCLR) Force update of double-buffered register */
  198. #define TC_CTRLBCLR_CMD_READSYNC_Val _U_(0x4) /**< (TC_CTRLBCLR) Force a read synchronization of COUNT */
  199. #define TC_CTRLBCLR_CMD_DMAOS_Val _U_(0x5) /**< (TC_CTRLBCLR) One-shot DMA trigger */
  200. #define TC_CTRLBCLR_CMD_NONE (TC_CTRLBCLR_CMD_NONE_Val << TC_CTRLBCLR_CMD_Pos) /**< (TC_CTRLBCLR) No action Position */
  201. #define TC_CTRLBCLR_CMD_RETRIGGER (TC_CTRLBCLR_CMD_RETRIGGER_Val << TC_CTRLBCLR_CMD_Pos) /**< (TC_CTRLBCLR) Force a start, restart or retrigger Position */
  202. #define TC_CTRLBCLR_CMD_STOP (TC_CTRLBCLR_CMD_STOP_Val << TC_CTRLBCLR_CMD_Pos) /**< (TC_CTRLBCLR) Force a stop Position */
  203. #define TC_CTRLBCLR_CMD_UPDATE (TC_CTRLBCLR_CMD_UPDATE_Val << TC_CTRLBCLR_CMD_Pos) /**< (TC_CTRLBCLR) Force update of double-buffered register Position */
  204. #define TC_CTRLBCLR_CMD_READSYNC (TC_CTRLBCLR_CMD_READSYNC_Val << TC_CTRLBCLR_CMD_Pos) /**< (TC_CTRLBCLR) Force a read synchronization of COUNT Position */
  205. #define TC_CTRLBCLR_CMD_DMAOS (TC_CTRLBCLR_CMD_DMAOS_Val << TC_CTRLBCLR_CMD_Pos) /**< (TC_CTRLBCLR) One-shot DMA trigger Position */
  206. #define TC_CTRLBCLR_MASK _U_(0xE7) /**< \deprecated (TC_CTRLBCLR) Register MASK (Use TC_CTRLBCLR_Msk instead) */
  207. #define TC_CTRLBCLR_Msk _U_(0xE7) /**< (TC_CTRLBCLR) Register Mask */
  208. /* -------- TC_CTRLBSET : (TC Offset: 0x05) (R/W 8) Control B Set -------- */
  209. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  210. typedef union {
  211. struct {
  212. uint8_t DIR:1; /**< bit: 0 Counter Direction */
  213. uint8_t LUPD:1; /**< bit: 1 Lock Update */
  214. uint8_t ONESHOT:1; /**< bit: 2 One-Shot on Counter */
  215. uint8_t :2; /**< bit: 3..4 Reserved */
  216. uint8_t CMD:3; /**< bit: 5..7 Command */
  217. } bit; /**< Structure used for bit access */
  218. uint8_t reg; /**< Type used for register access */
  219. } TC_CTRLBSET_Type;
  220. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  221. #define TC_CTRLBSET_OFFSET (0x05) /**< (TC_CTRLBSET) Control B Set Offset */
  222. #define TC_CTRLBSET_RESETVALUE _U_(0x00) /**< (TC_CTRLBSET) Control B Set Reset Value */
  223. #define TC_CTRLBSET_DIR_Pos 0 /**< (TC_CTRLBSET) Counter Direction Position */
  224. #define TC_CTRLBSET_DIR_Msk (_U_(0x1) << TC_CTRLBSET_DIR_Pos) /**< (TC_CTRLBSET) Counter Direction Mask */
  225. #define TC_CTRLBSET_DIR TC_CTRLBSET_DIR_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CTRLBSET_DIR_Msk instead */
  226. #define TC_CTRLBSET_LUPD_Pos 1 /**< (TC_CTRLBSET) Lock Update Position */
  227. #define TC_CTRLBSET_LUPD_Msk (_U_(0x1) << TC_CTRLBSET_LUPD_Pos) /**< (TC_CTRLBSET) Lock Update Mask */
  228. #define TC_CTRLBSET_LUPD TC_CTRLBSET_LUPD_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CTRLBSET_LUPD_Msk instead */
  229. #define TC_CTRLBSET_ONESHOT_Pos 2 /**< (TC_CTRLBSET) One-Shot on Counter Position */
  230. #define TC_CTRLBSET_ONESHOT_Msk (_U_(0x1) << TC_CTRLBSET_ONESHOT_Pos) /**< (TC_CTRLBSET) One-Shot on Counter Mask */
  231. #define TC_CTRLBSET_ONESHOT TC_CTRLBSET_ONESHOT_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_CTRLBSET_ONESHOT_Msk instead */
  232. #define TC_CTRLBSET_CMD_Pos 5 /**< (TC_CTRLBSET) Command Position */
  233. #define TC_CTRLBSET_CMD_Msk (_U_(0x7) << TC_CTRLBSET_CMD_Pos) /**< (TC_CTRLBSET) Command Mask */
  234. #define TC_CTRLBSET_CMD(value) (TC_CTRLBSET_CMD_Msk & ((value) << TC_CTRLBSET_CMD_Pos))
  235. #define TC_CTRLBSET_CMD_NONE_Val _U_(0x0) /**< (TC_CTRLBSET) No action */
  236. #define TC_CTRLBSET_CMD_RETRIGGER_Val _U_(0x1) /**< (TC_CTRLBSET) Force a start, restart or retrigger */
  237. #define TC_CTRLBSET_CMD_STOP_Val _U_(0x2) /**< (TC_CTRLBSET) Force a stop */
  238. #define TC_CTRLBSET_CMD_UPDATE_Val _U_(0x3) /**< (TC_CTRLBSET) Force update of double-buffered register */
  239. #define TC_CTRLBSET_CMD_READSYNC_Val _U_(0x4) /**< (TC_CTRLBSET) Force a read synchronization of COUNT */
  240. #define TC_CTRLBSET_CMD_DMAOS_Val _U_(0x5) /**< (TC_CTRLBSET) One-shot DMA trigger */
  241. #define TC_CTRLBSET_CMD_NONE (TC_CTRLBSET_CMD_NONE_Val << TC_CTRLBSET_CMD_Pos) /**< (TC_CTRLBSET) No action Position */
  242. #define TC_CTRLBSET_CMD_RETRIGGER (TC_CTRLBSET_CMD_RETRIGGER_Val << TC_CTRLBSET_CMD_Pos) /**< (TC_CTRLBSET) Force a start, restart or retrigger Position */
  243. #define TC_CTRLBSET_CMD_STOP (TC_CTRLBSET_CMD_STOP_Val << TC_CTRLBSET_CMD_Pos) /**< (TC_CTRLBSET) Force a stop Position */
  244. #define TC_CTRLBSET_CMD_UPDATE (TC_CTRLBSET_CMD_UPDATE_Val << TC_CTRLBSET_CMD_Pos) /**< (TC_CTRLBSET) Force update of double-buffered register Position */
  245. #define TC_CTRLBSET_CMD_READSYNC (TC_CTRLBSET_CMD_READSYNC_Val << TC_CTRLBSET_CMD_Pos) /**< (TC_CTRLBSET) Force a read synchronization of COUNT Position */
  246. #define TC_CTRLBSET_CMD_DMAOS (TC_CTRLBSET_CMD_DMAOS_Val << TC_CTRLBSET_CMD_Pos) /**< (TC_CTRLBSET) One-shot DMA trigger Position */
  247. #define TC_CTRLBSET_MASK _U_(0xE7) /**< \deprecated (TC_CTRLBSET) Register MASK (Use TC_CTRLBSET_Msk instead) */
  248. #define TC_CTRLBSET_Msk _U_(0xE7) /**< (TC_CTRLBSET) Register Mask */
  249. /* -------- TC_EVCTRL : (TC Offset: 0x06) (R/W 16) Event Control -------- */
  250. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  251. typedef union {
  252. struct {
  253. uint16_t EVACT:3; /**< bit: 0..2 Event Action */
  254. uint16_t :1; /**< bit: 3 Reserved */
  255. uint16_t TCINV:1; /**< bit: 4 TC Event Input Polarity */
  256. uint16_t TCEI:1; /**< bit: 5 TC Event Enable */
  257. uint16_t :2; /**< bit: 6..7 Reserved */
  258. uint16_t OVFEO:1; /**< bit: 8 Event Output Enable */
  259. uint16_t :3; /**< bit: 9..11 Reserved */
  260. uint16_t MCEO0:1; /**< bit: 12 MC Event Output Enable 0 */
  261. uint16_t MCEO1:1; /**< bit: 13 MC Event Output Enable 1 */
  262. uint16_t :2; /**< bit: 14..15 Reserved */
  263. } bit; /**< Structure used for bit access */
  264. struct {
  265. uint16_t :12; /**< bit: 0..11 Reserved */
  266. uint16_t MCEO:2; /**< bit: 12..13 MC Event Output Enable x */
  267. uint16_t :2; /**< bit: 14..15 Reserved */
  268. } vec; /**< Structure used for vec access */
  269. uint16_t reg; /**< Type used for register access */
  270. } TC_EVCTRL_Type;
  271. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  272. #define TC_EVCTRL_OFFSET (0x06) /**< (TC_EVCTRL) Event Control Offset */
  273. #define TC_EVCTRL_RESETVALUE _U_(0x00) /**< (TC_EVCTRL) Event Control Reset Value */
  274. #define TC_EVCTRL_EVACT_Pos 0 /**< (TC_EVCTRL) Event Action Position */
  275. #define TC_EVCTRL_EVACT_Msk (_U_(0x7) << TC_EVCTRL_EVACT_Pos) /**< (TC_EVCTRL) Event Action Mask */
  276. #define TC_EVCTRL_EVACT(value) (TC_EVCTRL_EVACT_Msk & ((value) << TC_EVCTRL_EVACT_Pos))
  277. #define TC_EVCTRL_EVACT_OFF_Val _U_(0x0) /**< (TC_EVCTRL) Event action disabled */
  278. #define TC_EVCTRL_EVACT_RETRIGGER_Val _U_(0x1) /**< (TC_EVCTRL) Start, restart or retrigger TC on event */
  279. #define TC_EVCTRL_EVACT_COUNT_Val _U_(0x2) /**< (TC_EVCTRL) Count on event */
  280. #define TC_EVCTRL_EVACT_START_Val _U_(0x3) /**< (TC_EVCTRL) Start TC on event */
  281. #define TC_EVCTRL_EVACT_STAMP_Val _U_(0x4) /**< (TC_EVCTRL) Time stamp capture */
  282. #define TC_EVCTRL_EVACT_PPW_Val _U_(0x5) /**< (TC_EVCTRL) Period catured in CC0, pulse width in CC1 */
  283. #define TC_EVCTRL_EVACT_PWP_Val _U_(0x6) /**< (TC_EVCTRL) Period catured in CC1, pulse width in CC0 */
  284. #define TC_EVCTRL_EVACT_PW_Val _U_(0x7) /**< (TC_EVCTRL) Pulse width capture */
  285. #define TC_EVCTRL_EVACT_OFF (TC_EVCTRL_EVACT_OFF_Val << TC_EVCTRL_EVACT_Pos) /**< (TC_EVCTRL) Event action disabled Position */
  286. #define TC_EVCTRL_EVACT_RETRIGGER (TC_EVCTRL_EVACT_RETRIGGER_Val << TC_EVCTRL_EVACT_Pos) /**< (TC_EVCTRL) Start, restart or retrigger TC on event Position */
  287. #define TC_EVCTRL_EVACT_COUNT (TC_EVCTRL_EVACT_COUNT_Val << TC_EVCTRL_EVACT_Pos) /**< (TC_EVCTRL) Count on event Position */
  288. #define TC_EVCTRL_EVACT_START (TC_EVCTRL_EVACT_START_Val << TC_EVCTRL_EVACT_Pos) /**< (TC_EVCTRL) Start TC on event Position */
  289. #define TC_EVCTRL_EVACT_STAMP (TC_EVCTRL_EVACT_STAMP_Val << TC_EVCTRL_EVACT_Pos) /**< (TC_EVCTRL) Time stamp capture Position */
  290. #define TC_EVCTRL_EVACT_PPW (TC_EVCTRL_EVACT_PPW_Val << TC_EVCTRL_EVACT_Pos) /**< (TC_EVCTRL) Period catured in CC0, pulse width in CC1 Position */
  291. #define TC_EVCTRL_EVACT_PWP (TC_EVCTRL_EVACT_PWP_Val << TC_EVCTRL_EVACT_Pos) /**< (TC_EVCTRL) Period catured in CC1, pulse width in CC0 Position */
  292. #define TC_EVCTRL_EVACT_PW (TC_EVCTRL_EVACT_PW_Val << TC_EVCTRL_EVACT_Pos) /**< (TC_EVCTRL) Pulse width capture Position */
  293. #define TC_EVCTRL_TCINV_Pos 4 /**< (TC_EVCTRL) TC Event Input Polarity Position */
  294. #define TC_EVCTRL_TCINV_Msk (_U_(0x1) << TC_EVCTRL_TCINV_Pos) /**< (TC_EVCTRL) TC Event Input Polarity Mask */
  295. #define TC_EVCTRL_TCINV TC_EVCTRL_TCINV_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_EVCTRL_TCINV_Msk instead */
  296. #define TC_EVCTRL_TCEI_Pos 5 /**< (TC_EVCTRL) TC Event Enable Position */
  297. #define TC_EVCTRL_TCEI_Msk (_U_(0x1) << TC_EVCTRL_TCEI_Pos) /**< (TC_EVCTRL) TC Event Enable Mask */
  298. #define TC_EVCTRL_TCEI TC_EVCTRL_TCEI_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_EVCTRL_TCEI_Msk instead */
  299. #define TC_EVCTRL_OVFEO_Pos 8 /**< (TC_EVCTRL) Event Output Enable Position */
  300. #define TC_EVCTRL_OVFEO_Msk (_U_(0x1) << TC_EVCTRL_OVFEO_Pos) /**< (TC_EVCTRL) Event Output Enable Mask */
  301. #define TC_EVCTRL_OVFEO TC_EVCTRL_OVFEO_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_EVCTRL_OVFEO_Msk instead */
  302. #define TC_EVCTRL_MCEO0_Pos 12 /**< (TC_EVCTRL) MC Event Output Enable 0 Position */
  303. #define TC_EVCTRL_MCEO0_Msk (_U_(0x1) << TC_EVCTRL_MCEO0_Pos) /**< (TC_EVCTRL) MC Event Output Enable 0 Mask */
  304. #define TC_EVCTRL_MCEO0 TC_EVCTRL_MCEO0_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_EVCTRL_MCEO0_Msk instead */
  305. #define TC_EVCTRL_MCEO1_Pos 13 /**< (TC_EVCTRL) MC Event Output Enable 1 Position */
  306. #define TC_EVCTRL_MCEO1_Msk (_U_(0x1) << TC_EVCTRL_MCEO1_Pos) /**< (TC_EVCTRL) MC Event Output Enable 1 Mask */
  307. #define TC_EVCTRL_MCEO1 TC_EVCTRL_MCEO1_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_EVCTRL_MCEO1_Msk instead */
  308. #define TC_EVCTRL_MASK _U_(0x3137) /**< \deprecated (TC_EVCTRL) Register MASK (Use TC_EVCTRL_Msk instead) */
  309. #define TC_EVCTRL_Msk _U_(0x3137) /**< (TC_EVCTRL) Register Mask */
  310. #define TC_EVCTRL_MCEO_Pos 12 /**< (TC_EVCTRL Position) MC Event Output Enable x */
  311. #define TC_EVCTRL_MCEO_Msk (_U_(0x3) << TC_EVCTRL_MCEO_Pos) /**< (TC_EVCTRL Mask) MCEO */
  312. #define TC_EVCTRL_MCEO(value) (TC_EVCTRL_MCEO_Msk & ((value) << TC_EVCTRL_MCEO_Pos))
  313. /* -------- TC_INTENCLR : (TC Offset: 0x08) (R/W 8) Interrupt Enable Clear -------- */
  314. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  315. typedef union {
  316. struct {
  317. uint8_t OVF:1; /**< bit: 0 OVF Interrupt Disable */
  318. uint8_t ERR:1; /**< bit: 1 ERR Interrupt Disable */
  319. uint8_t :2; /**< bit: 2..3 Reserved */
  320. uint8_t MC0:1; /**< bit: 4 MC Interrupt Disable 0 */
  321. uint8_t MC1:1; /**< bit: 5 MC Interrupt Disable 1 */
  322. uint8_t :2; /**< bit: 6..7 Reserved */
  323. } bit; /**< Structure used for bit access */
  324. struct {
  325. uint8_t :4; /**< bit: 0..3 Reserved */
  326. uint8_t MC:2; /**< bit: 4..5 MC Interrupt Disable x */
  327. uint8_t :2; /**< bit: 6..7 Reserved */
  328. } vec; /**< Structure used for vec access */
  329. uint8_t reg; /**< Type used for register access */
  330. } TC_INTENCLR_Type;
  331. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  332. #define TC_INTENCLR_OFFSET (0x08) /**< (TC_INTENCLR) Interrupt Enable Clear Offset */
  333. #define TC_INTENCLR_RESETVALUE _U_(0x00) /**< (TC_INTENCLR) Interrupt Enable Clear Reset Value */
  334. #define TC_INTENCLR_OVF_Pos 0 /**< (TC_INTENCLR) OVF Interrupt Disable Position */
  335. #define TC_INTENCLR_OVF_Msk (_U_(0x1) << TC_INTENCLR_OVF_Pos) /**< (TC_INTENCLR) OVF Interrupt Disable Mask */
  336. #define TC_INTENCLR_OVF TC_INTENCLR_OVF_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_INTENCLR_OVF_Msk instead */
  337. #define TC_INTENCLR_ERR_Pos 1 /**< (TC_INTENCLR) ERR Interrupt Disable Position */
  338. #define TC_INTENCLR_ERR_Msk (_U_(0x1) << TC_INTENCLR_ERR_Pos) /**< (TC_INTENCLR) ERR Interrupt Disable Mask */
  339. #define TC_INTENCLR_ERR TC_INTENCLR_ERR_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_INTENCLR_ERR_Msk instead */
  340. #define TC_INTENCLR_MC0_Pos 4 /**< (TC_INTENCLR) MC Interrupt Disable 0 Position */
  341. #define TC_INTENCLR_MC0_Msk (_U_(0x1) << TC_INTENCLR_MC0_Pos) /**< (TC_INTENCLR) MC Interrupt Disable 0 Mask */
  342. #define TC_INTENCLR_MC0 TC_INTENCLR_MC0_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_INTENCLR_MC0_Msk instead */
  343. #define TC_INTENCLR_MC1_Pos 5 /**< (TC_INTENCLR) MC Interrupt Disable 1 Position */
  344. #define TC_INTENCLR_MC1_Msk (_U_(0x1) << TC_INTENCLR_MC1_Pos) /**< (TC_INTENCLR) MC Interrupt Disable 1 Mask */
  345. #define TC_INTENCLR_MC1 TC_INTENCLR_MC1_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_INTENCLR_MC1_Msk instead */
  346. #define TC_INTENCLR_MASK _U_(0x33) /**< \deprecated (TC_INTENCLR) Register MASK (Use TC_INTENCLR_Msk instead) */
  347. #define TC_INTENCLR_Msk _U_(0x33) /**< (TC_INTENCLR) Register Mask */
  348. #define TC_INTENCLR_MC_Pos 4 /**< (TC_INTENCLR Position) MC Interrupt Disable x */
  349. #define TC_INTENCLR_MC_Msk (_U_(0x3) << TC_INTENCLR_MC_Pos) /**< (TC_INTENCLR Mask) MC */
  350. #define TC_INTENCLR_MC(value) (TC_INTENCLR_MC_Msk & ((value) << TC_INTENCLR_MC_Pos))
  351. /* -------- TC_INTENSET : (TC Offset: 0x09) (R/W 8) Interrupt Enable Set -------- */
  352. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  353. typedef union {
  354. struct {
  355. uint8_t OVF:1; /**< bit: 0 OVF Interrupt Enable */
  356. uint8_t ERR:1; /**< bit: 1 ERR Interrupt Enable */
  357. uint8_t :2; /**< bit: 2..3 Reserved */
  358. uint8_t MC0:1; /**< bit: 4 MC Interrupt Enable 0 */
  359. uint8_t MC1:1; /**< bit: 5 MC Interrupt Enable 1 */
  360. uint8_t :2; /**< bit: 6..7 Reserved */
  361. } bit; /**< Structure used for bit access */
  362. struct {
  363. uint8_t :4; /**< bit: 0..3 Reserved */
  364. uint8_t MC:2; /**< bit: 4..5 MC Interrupt Enable x */
  365. uint8_t :2; /**< bit: 6..7 Reserved */
  366. } vec; /**< Structure used for vec access */
  367. uint8_t reg; /**< Type used for register access */
  368. } TC_INTENSET_Type;
  369. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  370. #define TC_INTENSET_OFFSET (0x09) /**< (TC_INTENSET) Interrupt Enable Set Offset */
  371. #define TC_INTENSET_RESETVALUE _U_(0x00) /**< (TC_INTENSET) Interrupt Enable Set Reset Value */
  372. #define TC_INTENSET_OVF_Pos 0 /**< (TC_INTENSET) OVF Interrupt Enable Position */
  373. #define TC_INTENSET_OVF_Msk (_U_(0x1) << TC_INTENSET_OVF_Pos) /**< (TC_INTENSET) OVF Interrupt Enable Mask */
  374. #define TC_INTENSET_OVF TC_INTENSET_OVF_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_INTENSET_OVF_Msk instead */
  375. #define TC_INTENSET_ERR_Pos 1 /**< (TC_INTENSET) ERR Interrupt Enable Position */
  376. #define TC_INTENSET_ERR_Msk (_U_(0x1) << TC_INTENSET_ERR_Pos) /**< (TC_INTENSET) ERR Interrupt Enable Mask */
  377. #define TC_INTENSET_ERR TC_INTENSET_ERR_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_INTENSET_ERR_Msk instead */
  378. #define TC_INTENSET_MC0_Pos 4 /**< (TC_INTENSET) MC Interrupt Enable 0 Position */
  379. #define TC_INTENSET_MC0_Msk (_U_(0x1) << TC_INTENSET_MC0_Pos) /**< (TC_INTENSET) MC Interrupt Enable 0 Mask */
  380. #define TC_INTENSET_MC0 TC_INTENSET_MC0_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_INTENSET_MC0_Msk instead */
  381. #define TC_INTENSET_MC1_Pos 5 /**< (TC_INTENSET) MC Interrupt Enable 1 Position */
  382. #define TC_INTENSET_MC1_Msk (_U_(0x1) << TC_INTENSET_MC1_Pos) /**< (TC_INTENSET) MC Interrupt Enable 1 Mask */
  383. #define TC_INTENSET_MC1 TC_INTENSET_MC1_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_INTENSET_MC1_Msk instead */
  384. #define TC_INTENSET_MASK _U_(0x33) /**< \deprecated (TC_INTENSET) Register MASK (Use TC_INTENSET_Msk instead) */
  385. #define TC_INTENSET_Msk _U_(0x33) /**< (TC_INTENSET) Register Mask */
  386. #define TC_INTENSET_MC_Pos 4 /**< (TC_INTENSET Position) MC Interrupt Enable x */
  387. #define TC_INTENSET_MC_Msk (_U_(0x3) << TC_INTENSET_MC_Pos) /**< (TC_INTENSET Mask) MC */
  388. #define TC_INTENSET_MC(value) (TC_INTENSET_MC_Msk & ((value) << TC_INTENSET_MC_Pos))
  389. /* -------- TC_INTFLAG : (TC Offset: 0x0a) (R/W 8) Interrupt Flag Status and Clear -------- */
  390. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  391. typedef union { // __I to avoid read-modify-write on write-to-clear register
  392. struct {
  393. __I uint8_t OVF:1; /**< bit: 0 OVF Interrupt Flag */
  394. __I uint8_t ERR:1; /**< bit: 1 ERR Interrupt Flag */
  395. __I uint8_t :2; /**< bit: 2..3 Reserved */
  396. __I uint8_t MC0:1; /**< bit: 4 MC Interrupt Flag 0 */
  397. __I uint8_t MC1:1; /**< bit: 5 MC Interrupt Flag 1 */
  398. __I uint8_t :2; /**< bit: 6..7 Reserved */
  399. } bit; /**< Structure used for bit access */
  400. struct {
  401. __I uint8_t :4; /**< bit: 0..3 Reserved */
  402. __I uint8_t MC:2; /**< bit: 4..5 MC Interrupt Flag x */
  403. __I uint8_t :2; /**< bit: 6..7 Reserved */
  404. } vec; /**< Structure used for vec access */
  405. uint8_t reg; /**< Type used for register access */
  406. } TC_INTFLAG_Type;
  407. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  408. #define TC_INTFLAG_OFFSET (0x0A) /**< (TC_INTFLAG) Interrupt Flag Status and Clear Offset */
  409. #define TC_INTFLAG_RESETVALUE _U_(0x00) /**< (TC_INTFLAG) Interrupt Flag Status and Clear Reset Value */
  410. #define TC_INTFLAG_OVF_Pos 0 /**< (TC_INTFLAG) OVF Interrupt Flag Position */
  411. #define TC_INTFLAG_OVF_Msk (_U_(0x1) << TC_INTFLAG_OVF_Pos) /**< (TC_INTFLAG) OVF Interrupt Flag Mask */
  412. #define TC_INTFLAG_OVF TC_INTFLAG_OVF_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_INTFLAG_OVF_Msk instead */
  413. #define TC_INTFLAG_ERR_Pos 1 /**< (TC_INTFLAG) ERR Interrupt Flag Position */
  414. #define TC_INTFLAG_ERR_Msk (_U_(0x1) << TC_INTFLAG_ERR_Pos) /**< (TC_INTFLAG) ERR Interrupt Flag Mask */
  415. #define TC_INTFLAG_ERR TC_INTFLAG_ERR_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_INTFLAG_ERR_Msk instead */
  416. #define TC_INTFLAG_MC0_Pos 4 /**< (TC_INTFLAG) MC Interrupt Flag 0 Position */
  417. #define TC_INTFLAG_MC0_Msk (_U_(0x1) << TC_INTFLAG_MC0_Pos) /**< (TC_INTFLAG) MC Interrupt Flag 0 Mask */
  418. #define TC_INTFLAG_MC0 TC_INTFLAG_MC0_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_INTFLAG_MC0_Msk instead */
  419. #define TC_INTFLAG_MC1_Pos 5 /**< (TC_INTFLAG) MC Interrupt Flag 1 Position */
  420. #define TC_INTFLAG_MC1_Msk (_U_(0x1) << TC_INTFLAG_MC1_Pos) /**< (TC_INTFLAG) MC Interrupt Flag 1 Mask */
  421. #define TC_INTFLAG_MC1 TC_INTFLAG_MC1_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_INTFLAG_MC1_Msk instead */
  422. #define TC_INTFLAG_MASK _U_(0x33) /**< \deprecated (TC_INTFLAG) Register MASK (Use TC_INTFLAG_Msk instead) */
  423. #define TC_INTFLAG_Msk _U_(0x33) /**< (TC_INTFLAG) Register Mask */
  424. #define TC_INTFLAG_MC_Pos 4 /**< (TC_INTFLAG Position) MC Interrupt Flag x */
  425. #define TC_INTFLAG_MC_Msk (_U_(0x3) << TC_INTFLAG_MC_Pos) /**< (TC_INTFLAG Mask) MC */
  426. #define TC_INTFLAG_MC(value) (TC_INTFLAG_MC_Msk & ((value) << TC_INTFLAG_MC_Pos))
  427. /* -------- TC_STATUS : (TC Offset: 0x0b) (R/W 8) Status -------- */
  428. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  429. typedef union {
  430. struct {
  431. uint8_t STOP:1; /**< bit: 0 Stop Status Flag */
  432. uint8_t SLAVE:1; /**< bit: 1 Slave Status Flag */
  433. uint8_t :1; /**< bit: 2 Reserved */
  434. uint8_t PERBUFV:1; /**< bit: 3 Synchronization Busy Status */
  435. uint8_t CCBUFV0:1; /**< bit: 4 Compare channel buffer 0 valid */
  436. uint8_t CCBUFV1:1; /**< bit: 5 Compare channel buffer 1 valid */
  437. uint8_t :2; /**< bit: 6..7 Reserved */
  438. } bit; /**< Structure used for bit access */
  439. struct {
  440. uint8_t :4; /**< bit: 0..3 Reserved */
  441. uint8_t CCBUFV:2; /**< bit: 4..5 Compare channel buffer x valid */
  442. uint8_t :2; /**< bit: 6..7 Reserved */
  443. } vec; /**< Structure used for vec access */
  444. uint8_t reg; /**< Type used for register access */
  445. } TC_STATUS_Type;
  446. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  447. #define TC_STATUS_OFFSET (0x0B) /**< (TC_STATUS) Status Offset */
  448. #define TC_STATUS_RESETVALUE _U_(0x01) /**< (TC_STATUS) Status Reset Value */
  449. #define TC_STATUS_STOP_Pos 0 /**< (TC_STATUS) Stop Status Flag Position */
  450. #define TC_STATUS_STOP_Msk (_U_(0x1) << TC_STATUS_STOP_Pos) /**< (TC_STATUS) Stop Status Flag Mask */
  451. #define TC_STATUS_STOP TC_STATUS_STOP_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_STATUS_STOP_Msk instead */
  452. #define TC_STATUS_SLAVE_Pos 1 /**< (TC_STATUS) Slave Status Flag Position */
  453. #define TC_STATUS_SLAVE_Msk (_U_(0x1) << TC_STATUS_SLAVE_Pos) /**< (TC_STATUS) Slave Status Flag Mask */
  454. #define TC_STATUS_SLAVE TC_STATUS_SLAVE_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_STATUS_SLAVE_Msk instead */
  455. #define TC_STATUS_PERBUFV_Pos 3 /**< (TC_STATUS) Synchronization Busy Status Position */
  456. #define TC_STATUS_PERBUFV_Msk (_U_(0x1) << TC_STATUS_PERBUFV_Pos) /**< (TC_STATUS) Synchronization Busy Status Mask */
  457. #define TC_STATUS_PERBUFV TC_STATUS_PERBUFV_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_STATUS_PERBUFV_Msk instead */
  458. #define TC_STATUS_CCBUFV0_Pos 4 /**< (TC_STATUS) Compare channel buffer 0 valid Position */
  459. #define TC_STATUS_CCBUFV0_Msk (_U_(0x1) << TC_STATUS_CCBUFV0_Pos) /**< (TC_STATUS) Compare channel buffer 0 valid Mask */
  460. #define TC_STATUS_CCBUFV0 TC_STATUS_CCBUFV0_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_STATUS_CCBUFV0_Msk instead */
  461. #define TC_STATUS_CCBUFV1_Pos 5 /**< (TC_STATUS) Compare channel buffer 1 valid Position */
  462. #define TC_STATUS_CCBUFV1_Msk (_U_(0x1) << TC_STATUS_CCBUFV1_Pos) /**< (TC_STATUS) Compare channel buffer 1 valid Mask */
  463. #define TC_STATUS_CCBUFV1 TC_STATUS_CCBUFV1_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_STATUS_CCBUFV1_Msk instead */
  464. #define TC_STATUS_MASK _U_(0x3B) /**< \deprecated (TC_STATUS) Register MASK (Use TC_STATUS_Msk instead) */
  465. #define TC_STATUS_Msk _U_(0x3B) /**< (TC_STATUS) Register Mask */
  466. #define TC_STATUS_CCBUFV_Pos 4 /**< (TC_STATUS Position) Compare channel buffer x valid */
  467. #define TC_STATUS_CCBUFV_Msk (_U_(0x3) << TC_STATUS_CCBUFV_Pos) /**< (TC_STATUS Mask) CCBUFV */
  468. #define TC_STATUS_CCBUFV(value) (TC_STATUS_CCBUFV_Msk & ((value) << TC_STATUS_CCBUFV_Pos))
  469. /* -------- TC_WAVE : (TC Offset: 0x0c) (R/W 8) Waveform Generation Control -------- */
  470. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  471. typedef union {
  472. struct {
  473. uint8_t WAVEGEN:2; /**< bit: 0..1 Waveform Generation Mode */
  474. uint8_t :6; /**< bit: 2..7 Reserved */
  475. } bit; /**< Structure used for bit access */
  476. uint8_t reg; /**< Type used for register access */
  477. } TC_WAVE_Type;
  478. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  479. #define TC_WAVE_OFFSET (0x0C) /**< (TC_WAVE) Waveform Generation Control Offset */
  480. #define TC_WAVE_RESETVALUE _U_(0x00) /**< (TC_WAVE) Waveform Generation Control Reset Value */
  481. #define TC_WAVE_WAVEGEN_Pos 0 /**< (TC_WAVE) Waveform Generation Mode Position */
  482. #define TC_WAVE_WAVEGEN_Msk (_U_(0x3) << TC_WAVE_WAVEGEN_Pos) /**< (TC_WAVE) Waveform Generation Mode Mask */
  483. #define TC_WAVE_WAVEGEN(value) (TC_WAVE_WAVEGEN_Msk & ((value) << TC_WAVE_WAVEGEN_Pos))
  484. #define TC_WAVE_WAVEGEN_NFRQ_Val _U_(0x0) /**< (TC_WAVE) Normal frequency */
  485. #define TC_WAVE_WAVEGEN_MFRQ_Val _U_(0x1) /**< (TC_WAVE) Match frequency */
  486. #define TC_WAVE_WAVEGEN_NPWM_Val _U_(0x2) /**< (TC_WAVE) Normal PWM */
  487. #define TC_WAVE_WAVEGEN_MPWM_Val _U_(0x3) /**< (TC_WAVE) Match PWM */
  488. #define TC_WAVE_WAVEGEN_NFRQ (TC_WAVE_WAVEGEN_NFRQ_Val << TC_WAVE_WAVEGEN_Pos) /**< (TC_WAVE) Normal frequency Position */
  489. #define TC_WAVE_WAVEGEN_MFRQ (TC_WAVE_WAVEGEN_MFRQ_Val << TC_WAVE_WAVEGEN_Pos) /**< (TC_WAVE) Match frequency Position */
  490. #define TC_WAVE_WAVEGEN_NPWM (TC_WAVE_WAVEGEN_NPWM_Val << TC_WAVE_WAVEGEN_Pos) /**< (TC_WAVE) Normal PWM Position */
  491. #define TC_WAVE_WAVEGEN_MPWM (TC_WAVE_WAVEGEN_MPWM_Val << TC_WAVE_WAVEGEN_Pos) /**< (TC_WAVE) Match PWM Position */
  492. #define TC_WAVE_MASK _U_(0x03) /**< \deprecated (TC_WAVE) Register MASK (Use TC_WAVE_Msk instead) */
  493. #define TC_WAVE_Msk _U_(0x03) /**< (TC_WAVE) Register Mask */
  494. /* -------- TC_DRVCTRL : (TC Offset: 0x0d) (R/W 8) Control C -------- */
  495. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  496. typedef union {
  497. struct {
  498. uint8_t INVEN0:1; /**< bit: 0 Output Waveform Invert Enable 0 */
  499. uint8_t INVEN1:1; /**< bit: 1 Output Waveform Invert Enable 1 */
  500. uint8_t :6; /**< bit: 2..7 Reserved */
  501. } bit; /**< Structure used for bit access */
  502. struct {
  503. uint8_t INVEN:2; /**< bit: 0..1 Output Waveform Invert Enable x */
  504. uint8_t :6; /**< bit: 2..7 Reserved */
  505. } vec; /**< Structure used for vec access */
  506. uint8_t reg; /**< Type used for register access */
  507. } TC_DRVCTRL_Type;
  508. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  509. #define TC_DRVCTRL_OFFSET (0x0D) /**< (TC_DRVCTRL) Control C Offset */
  510. #define TC_DRVCTRL_RESETVALUE _U_(0x00) /**< (TC_DRVCTRL) Control C Reset Value */
  511. #define TC_DRVCTRL_INVEN0_Pos 0 /**< (TC_DRVCTRL) Output Waveform Invert Enable 0 Position */
  512. #define TC_DRVCTRL_INVEN0_Msk (_U_(0x1) << TC_DRVCTRL_INVEN0_Pos) /**< (TC_DRVCTRL) Output Waveform Invert Enable 0 Mask */
  513. #define TC_DRVCTRL_INVEN0 TC_DRVCTRL_INVEN0_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_DRVCTRL_INVEN0_Msk instead */
  514. #define TC_DRVCTRL_INVEN1_Pos 1 /**< (TC_DRVCTRL) Output Waveform Invert Enable 1 Position */
  515. #define TC_DRVCTRL_INVEN1_Msk (_U_(0x1) << TC_DRVCTRL_INVEN1_Pos) /**< (TC_DRVCTRL) Output Waveform Invert Enable 1 Mask */
  516. #define TC_DRVCTRL_INVEN1 TC_DRVCTRL_INVEN1_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_DRVCTRL_INVEN1_Msk instead */
  517. #define TC_DRVCTRL_MASK _U_(0x03) /**< \deprecated (TC_DRVCTRL) Register MASK (Use TC_DRVCTRL_Msk instead) */
  518. #define TC_DRVCTRL_Msk _U_(0x03) /**< (TC_DRVCTRL) Register Mask */
  519. #define TC_DRVCTRL_INVEN_Pos 0 /**< (TC_DRVCTRL Position) Output Waveform Invert Enable x */
  520. #define TC_DRVCTRL_INVEN_Msk (_U_(0x3) << TC_DRVCTRL_INVEN_Pos) /**< (TC_DRVCTRL Mask) INVEN */
  521. #define TC_DRVCTRL_INVEN(value) (TC_DRVCTRL_INVEN_Msk & ((value) << TC_DRVCTRL_INVEN_Pos))
  522. /* -------- TC_DBGCTRL : (TC Offset: 0x0f) (R/W 8) Debug Control -------- */
  523. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  524. typedef union {
  525. struct {
  526. uint8_t DBGRUN:1; /**< bit: 0 Run During Debug */
  527. uint8_t :7; /**< bit: 1..7 Reserved */
  528. } bit; /**< Structure used for bit access */
  529. uint8_t reg; /**< Type used for register access */
  530. } TC_DBGCTRL_Type;
  531. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  532. #define TC_DBGCTRL_OFFSET (0x0F) /**< (TC_DBGCTRL) Debug Control Offset */
  533. #define TC_DBGCTRL_RESETVALUE _U_(0x00) /**< (TC_DBGCTRL) Debug Control Reset Value */
  534. #define TC_DBGCTRL_DBGRUN_Pos 0 /**< (TC_DBGCTRL) Run During Debug Position */
  535. #define TC_DBGCTRL_DBGRUN_Msk (_U_(0x1) << TC_DBGCTRL_DBGRUN_Pos) /**< (TC_DBGCTRL) Run During Debug Mask */
  536. #define TC_DBGCTRL_DBGRUN TC_DBGCTRL_DBGRUN_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_DBGCTRL_DBGRUN_Msk instead */
  537. #define TC_DBGCTRL_MASK _U_(0x01) /**< \deprecated (TC_DBGCTRL) Register MASK (Use TC_DBGCTRL_Msk instead) */
  538. #define TC_DBGCTRL_Msk _U_(0x01) /**< (TC_DBGCTRL) Register Mask */
  539. /* -------- TC_SYNCBUSY : (TC Offset: 0x10) (R/ 32) Synchronization Status -------- */
  540. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  541. typedef union {
  542. struct {
  543. uint32_t SWRST:1; /**< bit: 0 swrst */
  544. uint32_t ENABLE:1; /**< bit: 1 enable */
  545. uint32_t CTRLB:1; /**< bit: 2 CTRLB */
  546. uint32_t STATUS:1; /**< bit: 3 STATUS */
  547. uint32_t COUNT:1; /**< bit: 4 Counter */
  548. uint32_t PER:1; /**< bit: 5 Period */
  549. uint32_t CC0:1; /**< bit: 6 Compare Channel 0 */
  550. uint32_t CC1:1; /**< bit: 7 Compare Channel 1 */
  551. uint32_t :24; /**< bit: 8..31 Reserved */
  552. } bit; /**< Structure used for bit access */
  553. struct {
  554. uint32_t :6; /**< bit: 0..5 Reserved */
  555. uint32_t CC:2; /**< bit: 6..7 Compare Channel x */
  556. uint32_t :24; /**< bit: 8..31 Reserved */
  557. } vec; /**< Structure used for vec access */
  558. uint32_t reg; /**< Type used for register access */
  559. } TC_SYNCBUSY_Type;
  560. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  561. #define TC_SYNCBUSY_OFFSET (0x10) /**< (TC_SYNCBUSY) Synchronization Status Offset */
  562. #define TC_SYNCBUSY_RESETVALUE _U_(0x00) /**< (TC_SYNCBUSY) Synchronization Status Reset Value */
  563. #define TC_SYNCBUSY_SWRST_Pos 0 /**< (TC_SYNCBUSY) swrst Position */
  564. #define TC_SYNCBUSY_SWRST_Msk (_U_(0x1) << TC_SYNCBUSY_SWRST_Pos) /**< (TC_SYNCBUSY) swrst Mask */
  565. #define TC_SYNCBUSY_SWRST TC_SYNCBUSY_SWRST_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SYNCBUSY_SWRST_Msk instead */
  566. #define TC_SYNCBUSY_ENABLE_Pos 1 /**< (TC_SYNCBUSY) enable Position */
  567. #define TC_SYNCBUSY_ENABLE_Msk (_U_(0x1) << TC_SYNCBUSY_ENABLE_Pos) /**< (TC_SYNCBUSY) enable Mask */
  568. #define TC_SYNCBUSY_ENABLE TC_SYNCBUSY_ENABLE_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SYNCBUSY_ENABLE_Msk instead */
  569. #define TC_SYNCBUSY_CTRLB_Pos 2 /**< (TC_SYNCBUSY) CTRLB Position */
  570. #define TC_SYNCBUSY_CTRLB_Msk (_U_(0x1) << TC_SYNCBUSY_CTRLB_Pos) /**< (TC_SYNCBUSY) CTRLB Mask */
  571. #define TC_SYNCBUSY_CTRLB TC_SYNCBUSY_CTRLB_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SYNCBUSY_CTRLB_Msk instead */
  572. #define TC_SYNCBUSY_STATUS_Pos 3 /**< (TC_SYNCBUSY) STATUS Position */
  573. #define TC_SYNCBUSY_STATUS_Msk (_U_(0x1) << TC_SYNCBUSY_STATUS_Pos) /**< (TC_SYNCBUSY) STATUS Mask */
  574. #define TC_SYNCBUSY_STATUS TC_SYNCBUSY_STATUS_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SYNCBUSY_STATUS_Msk instead */
  575. #define TC_SYNCBUSY_COUNT_Pos 4 /**< (TC_SYNCBUSY) Counter Position */
  576. #define TC_SYNCBUSY_COUNT_Msk (_U_(0x1) << TC_SYNCBUSY_COUNT_Pos) /**< (TC_SYNCBUSY) Counter Mask */
  577. #define TC_SYNCBUSY_COUNT TC_SYNCBUSY_COUNT_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SYNCBUSY_COUNT_Msk instead */
  578. #define TC_SYNCBUSY_PER_Pos 5 /**< (TC_SYNCBUSY) Period Position */
  579. #define TC_SYNCBUSY_PER_Msk (_U_(0x1) << TC_SYNCBUSY_PER_Pos) /**< (TC_SYNCBUSY) Period Mask */
  580. #define TC_SYNCBUSY_PER TC_SYNCBUSY_PER_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SYNCBUSY_PER_Msk instead */
  581. #define TC_SYNCBUSY_CC0_Pos 6 /**< (TC_SYNCBUSY) Compare Channel 0 Position */
  582. #define TC_SYNCBUSY_CC0_Msk (_U_(0x1) << TC_SYNCBUSY_CC0_Pos) /**< (TC_SYNCBUSY) Compare Channel 0 Mask */
  583. #define TC_SYNCBUSY_CC0 TC_SYNCBUSY_CC0_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SYNCBUSY_CC0_Msk instead */
  584. #define TC_SYNCBUSY_CC1_Pos 7 /**< (TC_SYNCBUSY) Compare Channel 1 Position */
  585. #define TC_SYNCBUSY_CC1_Msk (_U_(0x1) << TC_SYNCBUSY_CC1_Pos) /**< (TC_SYNCBUSY) Compare Channel 1 Mask */
  586. #define TC_SYNCBUSY_CC1 TC_SYNCBUSY_CC1_Msk /**< \deprecated Old style mask definition for 1 bit bitfield. Use TC_SYNCBUSY_CC1_Msk instead */
  587. #define TC_SYNCBUSY_MASK _U_(0xFF) /**< \deprecated (TC_SYNCBUSY) Register MASK (Use TC_SYNCBUSY_Msk instead) */
  588. #define TC_SYNCBUSY_Msk _U_(0xFF) /**< (TC_SYNCBUSY) Register Mask */
  589. #define TC_SYNCBUSY_CC_Pos 6 /**< (TC_SYNCBUSY Position) Compare Channel x */
  590. #define TC_SYNCBUSY_CC_Msk (_U_(0x3) << TC_SYNCBUSY_CC_Pos) /**< (TC_SYNCBUSY Mask) CC */
  591. #define TC_SYNCBUSY_CC(value) (TC_SYNCBUSY_CC_Msk & ((value) << TC_SYNCBUSY_CC_Pos))
  592. /* -------- TC_COUNT8_COUNT : (TC Offset: 0x14) (R/W 8) COUNT8 Count -------- */
  593. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  594. typedef union {
  595. struct {
  596. uint8_t COUNT:8; /**< bit: 0..7 Counter Value */
  597. } bit; /**< Structure used for bit access */
  598. uint8_t reg; /**< Type used for register access */
  599. } TC_COUNT8_COUNT_Type;
  600. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  601. #define TC_COUNT8_COUNT_OFFSET (0x14) /**< (TC_COUNT8_COUNT) COUNT8 Count Offset */
  602. #define TC_COUNT8_COUNT_RESETVALUE _U_(0x00) /**< (TC_COUNT8_COUNT) COUNT8 Count Reset Value */
  603. #define TC_COUNT8_COUNT_COUNT_Pos 0 /**< (TC_COUNT8_COUNT) Counter Value Position */
  604. #define TC_COUNT8_COUNT_COUNT_Msk (_U_(0xFF) << TC_COUNT8_COUNT_COUNT_Pos) /**< (TC_COUNT8_COUNT) Counter Value Mask */
  605. #define TC_COUNT8_COUNT_COUNT(value) (TC_COUNT8_COUNT_COUNT_Msk & ((value) << TC_COUNT8_COUNT_COUNT_Pos))
  606. #define TC_COUNT8_COUNT_MASK _U_(0xFF) /**< \deprecated (TC_COUNT8_COUNT) Register MASK (Use TC_COUNT8_COUNT_Msk instead) */
  607. #define TC_COUNT8_COUNT_Msk _U_(0xFF) /**< (TC_COUNT8_COUNT) Register Mask */
  608. /* -------- TC_COUNT16_COUNT : (TC Offset: 0x14) (R/W 16) COUNT16 Count -------- */
  609. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  610. typedef union {
  611. struct {
  612. uint16_t COUNT:16; /**< bit: 0..15 Counter Value */
  613. } bit; /**< Structure used for bit access */
  614. uint16_t reg; /**< Type used for register access */
  615. } TC_COUNT16_COUNT_Type;
  616. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  617. #define TC_COUNT16_COUNT_OFFSET (0x14) /**< (TC_COUNT16_COUNT) COUNT16 Count Offset */
  618. #define TC_COUNT16_COUNT_RESETVALUE _U_(0x00) /**< (TC_COUNT16_COUNT) COUNT16 Count Reset Value */
  619. #define TC_COUNT16_COUNT_COUNT_Pos 0 /**< (TC_COUNT16_COUNT) Counter Value Position */
  620. #define TC_COUNT16_COUNT_COUNT_Msk (_U_(0xFFFF) << TC_COUNT16_COUNT_COUNT_Pos) /**< (TC_COUNT16_COUNT) Counter Value Mask */
  621. #define TC_COUNT16_COUNT_COUNT(value) (TC_COUNT16_COUNT_COUNT_Msk & ((value) << TC_COUNT16_COUNT_COUNT_Pos))
  622. #define TC_COUNT16_COUNT_MASK _U_(0xFFFF) /**< \deprecated (TC_COUNT16_COUNT) Register MASK (Use TC_COUNT16_COUNT_Msk instead) */
  623. #define TC_COUNT16_COUNT_Msk _U_(0xFFFF) /**< (TC_COUNT16_COUNT) Register Mask */
  624. /* -------- TC_COUNT32_COUNT : (TC Offset: 0x14) (R/W 32) COUNT32 Count -------- */
  625. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  626. typedef union {
  627. struct {
  628. uint32_t COUNT:32; /**< bit: 0..31 Counter Value */
  629. } bit; /**< Structure used for bit access */
  630. uint32_t reg; /**< Type used for register access */
  631. } TC_COUNT32_COUNT_Type;
  632. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  633. #define TC_COUNT32_COUNT_OFFSET (0x14) /**< (TC_COUNT32_COUNT) COUNT32 Count Offset */
  634. #define TC_COUNT32_COUNT_RESETVALUE _U_(0x00) /**< (TC_COUNT32_COUNT) COUNT32 Count Reset Value */
  635. #define TC_COUNT32_COUNT_COUNT_Pos 0 /**< (TC_COUNT32_COUNT) Counter Value Position */
  636. #define TC_COUNT32_COUNT_COUNT_Msk (_U_(0xFFFFFFFF) << TC_COUNT32_COUNT_COUNT_Pos) /**< (TC_COUNT32_COUNT) Counter Value Mask */
  637. #define TC_COUNT32_COUNT_COUNT(value) (TC_COUNT32_COUNT_COUNT_Msk & ((value) << TC_COUNT32_COUNT_COUNT_Pos))
  638. #define TC_COUNT32_COUNT_MASK _U_(0xFFFFFFFF) /**< \deprecated (TC_COUNT32_COUNT) Register MASK (Use TC_COUNT32_COUNT_Msk instead) */
  639. #define TC_COUNT32_COUNT_Msk _U_(0xFFFFFFFF) /**< (TC_COUNT32_COUNT) Register Mask */
  640. /* -------- TC_COUNT32_PER : (TC Offset: 0x18) (R/W 32) COUNT32 Period -------- */
  641. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  642. typedef union {
  643. struct {
  644. uint32_t PER:32; /**< bit: 0..31 Period Value */
  645. } bit; /**< Structure used for bit access */
  646. uint32_t reg; /**< Type used for register access */
  647. } TC_COUNT32_PER_Type;
  648. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  649. #define TC_COUNT32_PER_OFFSET (0x18) /**< (TC_COUNT32_PER) COUNT32 Period Offset */
  650. #define TC_COUNT32_PER_RESETVALUE _U_(0xFFFFFFFF) /**< (TC_COUNT32_PER) COUNT32 Period Reset Value */
  651. #define TC_COUNT32_PER_PER_Pos 0 /**< (TC_COUNT32_PER) Period Value Position */
  652. #define TC_COUNT32_PER_PER_Msk (_U_(0xFFFFFFFF) << TC_COUNT32_PER_PER_Pos) /**< (TC_COUNT32_PER) Period Value Mask */
  653. #define TC_COUNT32_PER_PER(value) (TC_COUNT32_PER_PER_Msk & ((value) << TC_COUNT32_PER_PER_Pos))
  654. #define TC_COUNT32_PER_MASK _U_(0xFFFFFFFF) /**< \deprecated (TC_COUNT32_PER) Register MASK (Use TC_COUNT32_PER_Msk instead) */
  655. #define TC_COUNT32_PER_Msk _U_(0xFFFFFFFF) /**< (TC_COUNT32_PER) Register Mask */
  656. /* -------- TC_COUNT16_PER : (TC Offset: 0x1a) (R/W 16) COUNT16 Period -------- */
  657. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  658. typedef union {
  659. struct {
  660. uint16_t PER:16; /**< bit: 0..15 Period Value */
  661. } bit; /**< Structure used for bit access */
  662. uint16_t reg; /**< Type used for register access */
  663. } TC_COUNT16_PER_Type;
  664. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  665. #define TC_COUNT16_PER_OFFSET (0x1A) /**< (TC_COUNT16_PER) COUNT16 Period Offset */
  666. #define TC_COUNT16_PER_RESETVALUE _U_(0xFFFF) /**< (TC_COUNT16_PER) COUNT16 Period Reset Value */
  667. #define TC_COUNT16_PER_PER_Pos 0 /**< (TC_COUNT16_PER) Period Value Position */
  668. #define TC_COUNT16_PER_PER_Msk (_U_(0xFFFF) << TC_COUNT16_PER_PER_Pos) /**< (TC_COUNT16_PER) Period Value Mask */
  669. #define TC_COUNT16_PER_PER(value) (TC_COUNT16_PER_PER_Msk & ((value) << TC_COUNT16_PER_PER_Pos))
  670. #define TC_COUNT16_PER_MASK _U_(0xFFFF) /**< \deprecated (TC_COUNT16_PER) Register MASK (Use TC_COUNT16_PER_Msk instead) */
  671. #define TC_COUNT16_PER_Msk _U_(0xFFFF) /**< (TC_COUNT16_PER) Register Mask */
  672. /* -------- TC_COUNT8_PER : (TC Offset: 0x1b) (R/W 8) COUNT8 Period -------- */
  673. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  674. typedef union {
  675. struct {
  676. uint8_t PER:8; /**< bit: 0..7 Period Value */
  677. } bit; /**< Structure used for bit access */
  678. uint8_t reg; /**< Type used for register access */
  679. } TC_COUNT8_PER_Type;
  680. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  681. #define TC_COUNT8_PER_OFFSET (0x1B) /**< (TC_COUNT8_PER) COUNT8 Period Offset */
  682. #define TC_COUNT8_PER_RESETVALUE _U_(0xFF) /**< (TC_COUNT8_PER) COUNT8 Period Reset Value */
  683. #define TC_COUNT8_PER_PER_Pos 0 /**< (TC_COUNT8_PER) Period Value Position */
  684. #define TC_COUNT8_PER_PER_Msk (_U_(0xFF) << TC_COUNT8_PER_PER_Pos) /**< (TC_COUNT8_PER) Period Value Mask */
  685. #define TC_COUNT8_PER_PER(value) (TC_COUNT8_PER_PER_Msk & ((value) << TC_COUNT8_PER_PER_Pos))
  686. #define TC_COUNT8_PER_MASK _U_(0xFF) /**< \deprecated (TC_COUNT8_PER) Register MASK (Use TC_COUNT8_PER_Msk instead) */
  687. #define TC_COUNT8_PER_Msk _U_(0xFF) /**< (TC_COUNT8_PER) Register Mask */
  688. /* -------- TC_COUNT8_CC : (TC Offset: 0x1c) (R/W 8) COUNT8 Compare and Capture -------- */
  689. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  690. typedef union {
  691. struct {
  692. uint8_t CC:8; /**< bit: 0..7 Counter/Compare Value */
  693. } bit; /**< Structure used for bit access */
  694. uint8_t reg; /**< Type used for register access */
  695. } TC_COUNT8_CC_Type;
  696. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  697. #define TC_COUNT8_CC_OFFSET (0x1C) /**< (TC_COUNT8_CC) COUNT8 Compare and Capture Offset */
  698. #define TC_COUNT8_CC_RESETVALUE _U_(0x00) /**< (TC_COUNT8_CC) COUNT8 Compare and Capture Reset Value */
  699. #define TC_COUNT8_CC_CC_Pos 0 /**< (TC_COUNT8_CC) Counter/Compare Value Position */
  700. #define TC_COUNT8_CC_CC_Msk (_U_(0xFF) << TC_COUNT8_CC_CC_Pos) /**< (TC_COUNT8_CC) Counter/Compare Value Mask */
  701. #define TC_COUNT8_CC_CC(value) (TC_COUNT8_CC_CC_Msk & ((value) << TC_COUNT8_CC_CC_Pos))
  702. #define TC_COUNT8_CC_MASK _U_(0xFF) /**< \deprecated (TC_COUNT8_CC) Register MASK (Use TC_COUNT8_CC_Msk instead) */
  703. #define TC_COUNT8_CC_Msk _U_(0xFF) /**< (TC_COUNT8_CC) Register Mask */
  704. /* -------- TC_COUNT16_CC : (TC Offset: 0x1c) (R/W 16) COUNT16 Compare and Capture -------- */
  705. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  706. typedef union {
  707. struct {
  708. uint16_t CC:16; /**< bit: 0..15 Counter/Compare Value */
  709. } bit; /**< Structure used for bit access */
  710. uint16_t reg; /**< Type used for register access */
  711. } TC_COUNT16_CC_Type;
  712. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  713. #define TC_COUNT16_CC_OFFSET (0x1C) /**< (TC_COUNT16_CC) COUNT16 Compare and Capture Offset */
  714. #define TC_COUNT16_CC_RESETVALUE _U_(0x00) /**< (TC_COUNT16_CC) COUNT16 Compare and Capture Reset Value */
  715. #define TC_COUNT16_CC_CC_Pos 0 /**< (TC_COUNT16_CC) Counter/Compare Value Position */
  716. #define TC_COUNT16_CC_CC_Msk (_U_(0xFFFF) << TC_COUNT16_CC_CC_Pos) /**< (TC_COUNT16_CC) Counter/Compare Value Mask */
  717. #define TC_COUNT16_CC_CC(value) (TC_COUNT16_CC_CC_Msk & ((value) << TC_COUNT16_CC_CC_Pos))
  718. #define TC_COUNT16_CC_MASK _U_(0xFFFF) /**< \deprecated (TC_COUNT16_CC) Register MASK (Use TC_COUNT16_CC_Msk instead) */
  719. #define TC_COUNT16_CC_Msk _U_(0xFFFF) /**< (TC_COUNT16_CC) Register Mask */
  720. /* -------- TC_COUNT32_CC : (TC Offset: 0x1c) (R/W 32) COUNT32 Compare and Capture -------- */
  721. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  722. typedef union {
  723. struct {
  724. uint32_t CC:32; /**< bit: 0..31 Counter/Compare Value */
  725. } bit; /**< Structure used for bit access */
  726. uint32_t reg; /**< Type used for register access */
  727. } TC_COUNT32_CC_Type;
  728. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  729. #define TC_COUNT32_CC_OFFSET (0x1C) /**< (TC_COUNT32_CC) COUNT32 Compare and Capture Offset */
  730. #define TC_COUNT32_CC_RESETVALUE _U_(0x00) /**< (TC_COUNT32_CC) COUNT32 Compare and Capture Reset Value */
  731. #define TC_COUNT32_CC_CC_Pos 0 /**< (TC_COUNT32_CC) Counter/Compare Value Position */
  732. #define TC_COUNT32_CC_CC_Msk (_U_(0xFFFFFFFF) << TC_COUNT32_CC_CC_Pos) /**< (TC_COUNT32_CC) Counter/Compare Value Mask */
  733. #define TC_COUNT32_CC_CC(value) (TC_COUNT32_CC_CC_Msk & ((value) << TC_COUNT32_CC_CC_Pos))
  734. #define TC_COUNT32_CC_MASK _U_(0xFFFFFFFF) /**< \deprecated (TC_COUNT32_CC) Register MASK (Use TC_COUNT32_CC_Msk instead) */
  735. #define TC_COUNT32_CC_Msk _U_(0xFFFFFFFF) /**< (TC_COUNT32_CC) Register Mask */
  736. /* -------- TC_COUNT32_PERBUF : (TC Offset: 0x2c) (R/W 32) COUNT32 Period Buffer -------- */
  737. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  738. typedef union {
  739. struct {
  740. uint32_t PERBUF:32; /**< bit: 0..31 Period Buffer Value */
  741. } bit; /**< Structure used for bit access */
  742. uint32_t reg; /**< Type used for register access */
  743. } TC_COUNT32_PERBUF_Type;
  744. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  745. #define TC_COUNT32_PERBUF_OFFSET (0x2C) /**< (TC_COUNT32_PERBUF) COUNT32 Period Buffer Offset */
  746. #define TC_COUNT32_PERBUF_RESETVALUE _U_(0xFFFFFFFF) /**< (TC_COUNT32_PERBUF) COUNT32 Period Buffer Reset Value */
  747. #define TC_COUNT32_PERBUF_PERBUF_Pos 0 /**< (TC_COUNT32_PERBUF) Period Buffer Value Position */
  748. #define TC_COUNT32_PERBUF_PERBUF_Msk (_U_(0xFFFFFFFF) << TC_COUNT32_PERBUF_PERBUF_Pos) /**< (TC_COUNT32_PERBUF) Period Buffer Value Mask */
  749. #define TC_COUNT32_PERBUF_PERBUF(value) (TC_COUNT32_PERBUF_PERBUF_Msk & ((value) << TC_COUNT32_PERBUF_PERBUF_Pos))
  750. #define TC_COUNT32_PERBUF_MASK _U_(0xFFFFFFFF) /**< \deprecated (TC_COUNT32_PERBUF) Register MASK (Use TC_COUNT32_PERBUF_Msk instead) */
  751. #define TC_COUNT32_PERBUF_Msk _U_(0xFFFFFFFF) /**< (TC_COUNT32_PERBUF) Register Mask */
  752. /* -------- TC_COUNT16_PERBUF : (TC Offset: 0x2e) (R/W 16) COUNT16 Period Buffer -------- */
  753. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  754. typedef union {
  755. struct {
  756. uint16_t PERBUF:16; /**< bit: 0..15 Period Buffer Value */
  757. } bit; /**< Structure used for bit access */
  758. uint16_t reg; /**< Type used for register access */
  759. } TC_COUNT16_PERBUF_Type;
  760. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  761. #define TC_COUNT16_PERBUF_OFFSET (0x2E) /**< (TC_COUNT16_PERBUF) COUNT16 Period Buffer Offset */
  762. #define TC_COUNT16_PERBUF_RESETVALUE _U_(0xFFFF) /**< (TC_COUNT16_PERBUF) COUNT16 Period Buffer Reset Value */
  763. #define TC_COUNT16_PERBUF_PERBUF_Pos 0 /**< (TC_COUNT16_PERBUF) Period Buffer Value Position */
  764. #define TC_COUNT16_PERBUF_PERBUF_Msk (_U_(0xFFFF) << TC_COUNT16_PERBUF_PERBUF_Pos) /**< (TC_COUNT16_PERBUF) Period Buffer Value Mask */
  765. #define TC_COUNT16_PERBUF_PERBUF(value) (TC_COUNT16_PERBUF_PERBUF_Msk & ((value) << TC_COUNT16_PERBUF_PERBUF_Pos))
  766. #define TC_COUNT16_PERBUF_MASK _U_(0xFFFF) /**< \deprecated (TC_COUNT16_PERBUF) Register MASK (Use TC_COUNT16_PERBUF_Msk instead) */
  767. #define TC_COUNT16_PERBUF_Msk _U_(0xFFFF) /**< (TC_COUNT16_PERBUF) Register Mask */
  768. /* -------- TC_COUNT8_PERBUF : (TC Offset: 0x2f) (R/W 8) COUNT8 Period Buffer -------- */
  769. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  770. typedef union {
  771. struct {
  772. uint8_t PERBUF:8; /**< bit: 0..7 Period Buffer Value */
  773. } bit; /**< Structure used for bit access */
  774. uint8_t reg; /**< Type used for register access */
  775. } TC_COUNT8_PERBUF_Type;
  776. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  777. #define TC_COUNT8_PERBUF_OFFSET (0x2F) /**< (TC_COUNT8_PERBUF) COUNT8 Period Buffer Offset */
  778. #define TC_COUNT8_PERBUF_RESETVALUE _U_(0xFF) /**< (TC_COUNT8_PERBUF) COUNT8 Period Buffer Reset Value */
  779. #define TC_COUNT8_PERBUF_PERBUF_Pos 0 /**< (TC_COUNT8_PERBUF) Period Buffer Value Position */
  780. #define TC_COUNT8_PERBUF_PERBUF_Msk (_U_(0xFF) << TC_COUNT8_PERBUF_PERBUF_Pos) /**< (TC_COUNT8_PERBUF) Period Buffer Value Mask */
  781. #define TC_COUNT8_PERBUF_PERBUF(value) (TC_COUNT8_PERBUF_PERBUF_Msk & ((value) << TC_COUNT8_PERBUF_PERBUF_Pos))
  782. #define TC_COUNT8_PERBUF_MASK _U_(0xFF) /**< \deprecated (TC_COUNT8_PERBUF) Register MASK (Use TC_COUNT8_PERBUF_Msk instead) */
  783. #define TC_COUNT8_PERBUF_Msk _U_(0xFF) /**< (TC_COUNT8_PERBUF) Register Mask */
  784. /* -------- TC_COUNT8_CCBUF : (TC Offset: 0x30) (R/W 8) COUNT8 Compare and Capture Buffer -------- */
  785. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  786. typedef union {
  787. struct {
  788. uint8_t CCBUF:8; /**< bit: 0..7 Counter/Compare Buffer Value */
  789. } bit; /**< Structure used for bit access */
  790. uint8_t reg; /**< Type used for register access */
  791. } TC_COUNT8_CCBUF_Type;
  792. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  793. #define TC_COUNT8_CCBUF_OFFSET (0x30) /**< (TC_COUNT8_CCBUF) COUNT8 Compare and Capture Buffer Offset */
  794. #define TC_COUNT8_CCBUF_RESETVALUE _U_(0x00) /**< (TC_COUNT8_CCBUF) COUNT8 Compare and Capture Buffer Reset Value */
  795. #define TC_COUNT8_CCBUF_CCBUF_Pos 0 /**< (TC_COUNT8_CCBUF) Counter/Compare Buffer Value Position */
  796. #define TC_COUNT8_CCBUF_CCBUF_Msk (_U_(0xFF) << TC_COUNT8_CCBUF_CCBUF_Pos) /**< (TC_COUNT8_CCBUF) Counter/Compare Buffer Value Mask */
  797. #define TC_COUNT8_CCBUF_CCBUF(value) (TC_COUNT8_CCBUF_CCBUF_Msk & ((value) << TC_COUNT8_CCBUF_CCBUF_Pos))
  798. #define TC_COUNT8_CCBUF_MASK _U_(0xFF) /**< \deprecated (TC_COUNT8_CCBUF) Register MASK (Use TC_COUNT8_CCBUF_Msk instead) */
  799. #define TC_COUNT8_CCBUF_Msk _U_(0xFF) /**< (TC_COUNT8_CCBUF) Register Mask */
  800. /* -------- TC_COUNT16_CCBUF : (TC Offset: 0x30) (R/W 16) COUNT16 Compare and Capture Buffer -------- */
  801. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  802. typedef union {
  803. struct {
  804. uint16_t CCBUF:16; /**< bit: 0..15 Counter/Compare Buffer Value */
  805. } bit; /**< Structure used for bit access */
  806. uint16_t reg; /**< Type used for register access */
  807. } TC_COUNT16_CCBUF_Type;
  808. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  809. #define TC_COUNT16_CCBUF_OFFSET (0x30) /**< (TC_COUNT16_CCBUF) COUNT16 Compare and Capture Buffer Offset */
  810. #define TC_COUNT16_CCBUF_RESETVALUE _U_(0x00) /**< (TC_COUNT16_CCBUF) COUNT16 Compare and Capture Buffer Reset Value */
  811. #define TC_COUNT16_CCBUF_CCBUF_Pos 0 /**< (TC_COUNT16_CCBUF) Counter/Compare Buffer Value Position */
  812. #define TC_COUNT16_CCBUF_CCBUF_Msk (_U_(0xFFFF) << TC_COUNT16_CCBUF_CCBUF_Pos) /**< (TC_COUNT16_CCBUF) Counter/Compare Buffer Value Mask */
  813. #define TC_COUNT16_CCBUF_CCBUF(value) (TC_COUNT16_CCBUF_CCBUF_Msk & ((value) << TC_COUNT16_CCBUF_CCBUF_Pos))
  814. #define TC_COUNT16_CCBUF_MASK _U_(0xFFFF) /**< \deprecated (TC_COUNT16_CCBUF) Register MASK (Use TC_COUNT16_CCBUF_Msk instead) */
  815. #define TC_COUNT16_CCBUF_Msk _U_(0xFFFF) /**< (TC_COUNT16_CCBUF) Register Mask */
  816. /* -------- TC_COUNT32_CCBUF : (TC Offset: 0x30) (R/W 32) COUNT32 Compare and Capture Buffer -------- */
  817. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  818. typedef union {
  819. struct {
  820. uint32_t CCBUF:32; /**< bit: 0..31 Counter/Compare Buffer Value */
  821. } bit; /**< Structure used for bit access */
  822. uint32_t reg; /**< Type used for register access */
  823. } TC_COUNT32_CCBUF_Type;
  824. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  825. #define TC_COUNT32_CCBUF_OFFSET (0x30) /**< (TC_COUNT32_CCBUF) COUNT32 Compare and Capture Buffer Offset */
  826. #define TC_COUNT32_CCBUF_RESETVALUE _U_(0x00) /**< (TC_COUNT32_CCBUF) COUNT32 Compare and Capture Buffer Reset Value */
  827. #define TC_COUNT32_CCBUF_CCBUF_Pos 0 /**< (TC_COUNT32_CCBUF) Counter/Compare Buffer Value Position */
  828. #define TC_COUNT32_CCBUF_CCBUF_Msk (_U_(0xFFFFFFFF) << TC_COUNT32_CCBUF_CCBUF_Pos) /**< (TC_COUNT32_CCBUF) Counter/Compare Buffer Value Mask */
  829. #define TC_COUNT32_CCBUF_CCBUF(value) (TC_COUNT32_CCBUF_CCBUF_Msk & ((value) << TC_COUNT32_CCBUF_CCBUF_Pos))
  830. #define TC_COUNT32_CCBUF_MASK _U_(0xFFFFFFFF) /**< \deprecated (TC_COUNT32_CCBUF) Register MASK (Use TC_COUNT32_CCBUF_Msk instead) */
  831. #define TC_COUNT32_CCBUF_Msk _U_(0xFFFFFFFF) /**< (TC_COUNT32_CCBUF) Register Mask */
  832. #if !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__))
  833. /** \brief TC hardware registers */
  834. typedef struct { /* Basic Timer Counter */
  835. __IO TC_CTRLA_Type CTRLA; /**< Offset: 0x00 (R/W 32) Control A */
  836. __IO TC_CTRLBCLR_Type CTRLBCLR; /**< Offset: 0x04 (R/W 8) Control B Clear */
  837. __IO TC_CTRLBSET_Type CTRLBSET; /**< Offset: 0x05 (R/W 8) Control B Set */
  838. __IO TC_EVCTRL_Type EVCTRL; /**< Offset: 0x06 (R/W 16) Event Control */
  839. __IO TC_INTENCLR_Type INTENCLR; /**< Offset: 0x08 (R/W 8) Interrupt Enable Clear */
  840. __IO TC_INTENSET_Type INTENSET; /**< Offset: 0x09 (R/W 8) Interrupt Enable Set */
  841. __IO TC_INTFLAG_Type INTFLAG; /**< Offset: 0x0A (R/W 8) Interrupt Flag Status and Clear */
  842. __IO TC_STATUS_Type STATUS; /**< Offset: 0x0B (R/W 8) Status */
  843. __IO TC_WAVE_Type WAVE; /**< Offset: 0x0C (R/W 8) Waveform Generation Control */
  844. __IO TC_DRVCTRL_Type DRVCTRL; /**< Offset: 0x0D (R/W 8) Control C */
  845. __I uint8_t Reserved1[1];
  846. __IO TC_DBGCTRL_Type DBGCTRL; /**< Offset: 0x0F (R/W 8) Debug Control */
  847. __I TC_SYNCBUSY_Type SYNCBUSY; /**< Offset: 0x10 (R/ 32) Synchronization Status */
  848. __IO TC_COUNT8_COUNT_Type COUNT; /**< Offset: 0x14 (R/W 8) COUNT8 Count */
  849. __I uint8_t Reserved2[6];
  850. __IO TC_COUNT8_PER_Type PER; /**< Offset: 0x1B (R/W 8) COUNT8 Period */
  851. __IO TC_COUNT8_CC_Type CC[2]; /**< Offset: 0x1C (R/W 8) COUNT8 Compare and Capture */
  852. __I uint8_t Reserved3[17];
  853. __IO TC_COUNT8_PERBUF_Type PERBUF; /**< Offset: 0x2F (R/W 8) COUNT8 Period Buffer */
  854. __IO TC_COUNT8_CCBUF_Type CCBUF[2]; /**< Offset: 0x30 (R/W 8) COUNT8 Compare and Capture Buffer */
  855. } TcCount8;
  856. /** \brief TC hardware registers */
  857. typedef struct { /* Basic Timer Counter */
  858. __IO TC_CTRLA_Type CTRLA; /**< Offset: 0x00 (R/W 32) Control A */
  859. __IO TC_CTRLBCLR_Type CTRLBCLR; /**< Offset: 0x04 (R/W 8) Control B Clear */
  860. __IO TC_CTRLBSET_Type CTRLBSET; /**< Offset: 0x05 (R/W 8) Control B Set */
  861. __IO TC_EVCTRL_Type EVCTRL; /**< Offset: 0x06 (R/W 16) Event Control */
  862. __IO TC_INTENCLR_Type INTENCLR; /**< Offset: 0x08 (R/W 8) Interrupt Enable Clear */
  863. __IO TC_INTENSET_Type INTENSET; /**< Offset: 0x09 (R/W 8) Interrupt Enable Set */
  864. __IO TC_INTFLAG_Type INTFLAG; /**< Offset: 0x0A (R/W 8) Interrupt Flag Status and Clear */
  865. __IO TC_STATUS_Type STATUS; /**< Offset: 0x0B (R/W 8) Status */
  866. __IO TC_WAVE_Type WAVE; /**< Offset: 0x0C (R/W 8) Waveform Generation Control */
  867. __IO TC_DRVCTRL_Type DRVCTRL; /**< Offset: 0x0D (R/W 8) Control C */
  868. __I uint8_t Reserved1[1];
  869. __IO TC_DBGCTRL_Type DBGCTRL; /**< Offset: 0x0F (R/W 8) Debug Control */
  870. __I TC_SYNCBUSY_Type SYNCBUSY; /**< Offset: 0x10 (R/ 32) Synchronization Status */
  871. __IO TC_COUNT16_COUNT_Type COUNT; /**< Offset: 0x14 (R/W 16) COUNT16 Count */
  872. __I uint8_t Reserved2[4];
  873. __IO TC_COUNT16_PER_Type PER; /**< Offset: 0x1A (R/W 16) COUNT16 Period */
  874. __IO TC_COUNT16_CC_Type CC[2]; /**< Offset: 0x1C (R/W 16) COUNT16 Compare and Capture */
  875. __I uint8_t Reserved3[14];
  876. __IO TC_COUNT16_PERBUF_Type PERBUF; /**< Offset: 0x2E (R/W 16) COUNT16 Period Buffer */
  877. __IO TC_COUNT16_CCBUF_Type CCBUF[2]; /**< Offset: 0x30 (R/W 16) COUNT16 Compare and Capture Buffer */
  878. } TcCount16;
  879. /** \brief TC hardware registers */
  880. typedef struct { /* Basic Timer Counter */
  881. __IO TC_CTRLA_Type CTRLA; /**< Offset: 0x00 (R/W 32) Control A */
  882. __IO TC_CTRLBCLR_Type CTRLBCLR; /**< Offset: 0x04 (R/W 8) Control B Clear */
  883. __IO TC_CTRLBSET_Type CTRLBSET; /**< Offset: 0x05 (R/W 8) Control B Set */
  884. __IO TC_EVCTRL_Type EVCTRL; /**< Offset: 0x06 (R/W 16) Event Control */
  885. __IO TC_INTENCLR_Type INTENCLR; /**< Offset: 0x08 (R/W 8) Interrupt Enable Clear */
  886. __IO TC_INTENSET_Type INTENSET; /**< Offset: 0x09 (R/W 8) Interrupt Enable Set */
  887. __IO TC_INTFLAG_Type INTFLAG; /**< Offset: 0x0A (R/W 8) Interrupt Flag Status and Clear */
  888. __IO TC_STATUS_Type STATUS; /**< Offset: 0x0B (R/W 8) Status */
  889. __IO TC_WAVE_Type WAVE; /**< Offset: 0x0C (R/W 8) Waveform Generation Control */
  890. __IO TC_DRVCTRL_Type DRVCTRL; /**< Offset: 0x0D (R/W 8) Control C */
  891. __I uint8_t Reserved1[1];
  892. __IO TC_DBGCTRL_Type DBGCTRL; /**< Offset: 0x0F (R/W 8) Debug Control */
  893. __I TC_SYNCBUSY_Type SYNCBUSY; /**< Offset: 0x10 (R/ 32) Synchronization Status */
  894. __IO TC_COUNT32_COUNT_Type COUNT; /**< Offset: 0x14 (R/W 32) COUNT32 Count */
  895. __IO TC_COUNT32_PER_Type PER; /**< Offset: 0x18 (R/W 32) COUNT32 Period */
  896. __IO TC_COUNT32_CC_Type CC[2]; /**< Offset: 0x1C (R/W 32) COUNT32 Compare and Capture */
  897. __I uint8_t Reserved2[8];
  898. __IO TC_COUNT32_PERBUF_Type PERBUF; /**< Offset: 0x2C (R/W 32) COUNT32 Period Buffer */
  899. __IO TC_COUNT32_CCBUF_Type CCBUF[2]; /**< Offset: 0x30 (R/W 32) COUNT32 Compare and Capture Buffer */
  900. } TcCount32;
  901. /** \brief TC hardware registers */
  902. typedef union { /* Basic Timer Counter */
  903. TcCount8 COUNT8; /**< 8-bit Counter Mode */
  904. TcCount16 COUNT16; /**< 16-bit Counter Mode */
  905. TcCount32 COUNT32; /**< 32-bit Counter Mode */
  906. } Tc;
  907. #endif /* !(defined(__ASSEMBLER__) || defined(__IAR_SYSTEMS_ASM__)) */
  908. /** @} end of Basic Timer Counter */
  909. #endif /* _SAML11_TC_COMPONENT_H_ */