aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
Diffstat (limited to 'crates')
-rw-r--r--crates/ra_assists/Cargo.toml2
-rw-r--r--crates/ra_assists/src/assist_ctx.rs56
-rw-r--r--crates/ra_assists/src/assists/inline_local_variable.rs4
-rw-r--r--crates/ra_assists/src/ast_transform.rs13
-rw-r--r--crates/ra_assists/src/doc_tests.rs8
-rw-r--r--crates/ra_assists/src/lib.rs39
-rw-r--r--crates/ra_cargo_watch/Cargo.toml2
-rw-r--r--crates/ra_cargo_watch/src/lib.rs80
-rw-r--r--crates/ra_hir/src/code_model.rs6
-rw-r--r--crates/ra_hir/src/lib.rs4
-rw-r--r--crates/ra_hir/src/source_analyzer.rs138
-rw-r--r--crates/ra_hir/src/source_binder.rs173
-rw-r--r--crates/ra_hir_def/src/find_path.rs12
-rw-r--r--crates/ra_hir_def/src/lib.rs2
-rw-r--r--crates/ra_hir_def/src/nameres.rs7
-rw-r--r--crates/ra_hir_def/src/path.rs11
-rw-r--r--crates/ra_hir_def/src/path/lower/lower_use.rs8
-rw-r--r--crates/ra_ide/src/assists.rs44
-rw-r--r--crates/ra_ide/src/display/function_signature.rs20
-rw-r--r--crates/ra_ide/src/goto_definition.rs5
-rw-r--r--crates/ra_ide/src/hover.rs9
-rw-r--r--crates/ra_ide/src/inlay_hints.rs207
-rw-r--r--crates/ra_ide/src/references.rs19
-rw-r--r--crates/ra_ide/src/references/classify.rs100
-rw-r--r--crates/ra_ide/src/syntax_highlighting.rs33
-rw-r--r--crates/ra_lsp_server/Cargo.toml3
-rw-r--r--crates/ra_lsp_server/src/cargo_target_spec.rs2
-rw-r--r--crates/ra_lsp_server/src/main_loop.rs79
-rw-r--r--crates/ra_lsp_server/src/main_loop/handlers.rs39
-rw-r--r--crates/ra_lsp_server/src/req.rs1
-rw-r--r--crates/ra_lsp_server/src/world.rs12
-rw-r--r--crates/ra_syntax/src/ast/edit.rs81
-rw-r--r--crates/ra_syntax/src/ast/make.rs42
-rw-r--r--crates/ra_syntax/test_data/accidentally_quadratic3980
34 files changed, 4848 insertions, 393 deletions
diff --git a/crates/ra_assists/Cargo.toml b/crates/ra_assists/Cargo.toml
index 50be8d9bc..0d2109e4e 100644
--- a/crates/ra_assists/Cargo.toml
+++ b/crates/ra_assists/Cargo.toml
@@ -11,7 +11,7 @@ doctest = false
11format-buf = "1.0.0" 11format-buf = "1.0.0"
12join_to_string = "0.1.3" 12join_to_string = "0.1.3"
13rustc-hash = "1.0" 13rustc-hash = "1.0"
14itertools = "0.8.0" 14either = "1.5"
15 15
16ra_syntax = { path = "../ra_syntax" } 16ra_syntax = { path = "../ra_syntax" }
17ra_text_edit = { path = "../ra_text_edit" } 17ra_text_edit = { path = "../ra_text_edit" }
diff --git a/crates/ra_assists/src/assist_ctx.rs b/crates/ra_assists/src/assist_ctx.rs
index 1b626faaa..9d533fa0c 100644
--- a/crates/ra_assists/src/assist_ctx.rs
+++ b/crates/ra_assists/src/assist_ctx.rs
@@ -1,4 +1,5 @@
1//! This module defines `AssistCtx` -- the API surface that is exposed to assists. 1//! This module defines `AssistCtx` -- the API surface that is exposed to assists.
2use either::Either;
2use hir::{db::HirDatabase, InFile, SourceAnalyzer}; 3use hir::{db::HirDatabase, InFile, SourceAnalyzer};
3use ra_db::FileRange; 4use ra_db::FileRange;
4use ra_fmt::{leading_indent, reindent}; 5use ra_fmt::{leading_indent, reindent};
@@ -9,12 +10,12 @@ use ra_syntax::{
9}; 10};
10use ra_text_edit::TextEditBuilder; 11use ra_text_edit::TextEditBuilder;
11 12
12use crate::{AssistAction, AssistId, AssistLabel}; 13use crate::{AssistAction, AssistId, AssistLabel, ResolvedAssist};
13 14
14#[derive(Clone, Debug)] 15#[derive(Clone, Debug)]
15pub(crate) enum Assist { 16pub(crate) enum Assist {
16 Unresolved { label: AssistLabel }, 17 Unresolved { label: AssistLabel },
17 Resolved { label: AssistLabel, action: AssistAction }, 18 Resolved { assist: ResolvedAssist },
18} 19}
19 20
20/// `AssistCtx` allows to apply an assist or check if it could be applied. 21/// `AssistCtx` allows to apply an assist or check if it could be applied.
@@ -81,22 +82,45 @@ impl<'a, DB: HirDatabase> AssistCtx<'a, DB> {
81 self, 82 self,
82 id: AssistId, 83 id: AssistId,
83 label: impl Into<String>, 84 label: impl Into<String>,
84 f: impl FnOnce(&mut AssistBuilder), 85 f: impl FnOnce(&mut ActionBuilder),
85 ) -> Option<Assist> { 86 ) -> Option<Assist> {
86 let label = AssistLabel { label: label.into(), id }; 87 let label = AssistLabel { label: label.into(), id };
87 assert_eq!( 88 assert!(label.label.chars().nth(0).unwrap().is_uppercase());
88 label.label.chars().nth(0).and_then(|c| Some(c.is_uppercase())).unwrap(),
89 true,
90 "First character should be uppercase"
91 );
92 89
93 let assist = if self.should_compute_edit { 90 let assist = if self.should_compute_edit {
94 let action = { 91 let action = {
95 let mut edit = AssistBuilder::default(); 92 let mut edit = ActionBuilder::default();
96 f(&mut edit); 93 f(&mut edit);
97 edit.build() 94 edit.build()
98 }; 95 };
99 Assist::Resolved { label, action } 96 Assist::Resolved { assist: ResolvedAssist { label, action_data: Either::Left(action) } }
97 } else {
98 Assist::Unresolved { label }
99 };
100
101 Some(assist)
102 }
103
104 #[allow(dead_code)] // will be used for auto import assist with multiple actions
105 pub(crate) fn add_assist_group(
106 self,
107 id: AssistId,
108 label: impl Into<String>,
109 f: impl FnOnce() -> Vec<ActionBuilder>,
110 ) -> Option<Assist> {
111 let label = AssistLabel { label: label.into(), id };
112 let assist = if self.should_compute_edit {
113 let actions = f();
114 assert!(!actions.is_empty(), "Assist cannot have no");
115
116 Assist::Resolved {
117 assist: ResolvedAssist {
118 label,
119 action_data: Either::Right(
120 actions.into_iter().map(ActionBuilder::build).collect(),
121 ),
122 },
123 }
100 } else { 124 } else {
101 Assist::Unresolved { label } 125 Assist::Unresolved { label }
102 }; 126 };
@@ -132,13 +156,20 @@ impl<'a, DB: HirDatabase> AssistCtx<'a, DB> {
132} 156}
133 157
134#[derive(Default)] 158#[derive(Default)]
135pub(crate) struct AssistBuilder { 159pub(crate) struct ActionBuilder {
136 edit: TextEditBuilder, 160 edit: TextEditBuilder,
137 cursor_position: Option<TextUnit>, 161 cursor_position: Option<TextUnit>,
138 target: Option<TextRange>, 162 target: Option<TextRange>,
163 label: Option<String>,
139} 164}
140 165
141impl AssistBuilder { 166impl ActionBuilder {
167 #[allow(dead_code)]
168 /// Adds a custom label to the action, if it needs to be different from the assist label
169 pub(crate) fn label(&mut self, label: impl Into<String>) {
170 self.label = Some(label.into())
171 }
172
142 /// Replaces specified `range` of text with a given string. 173 /// Replaces specified `range` of text with a given string.
143 pub(crate) fn replace(&mut self, range: TextRange, replace_with: impl Into<String>) { 174 pub(crate) fn replace(&mut self, range: TextRange, replace_with: impl Into<String>) {
144 self.edit.replace(range, replace_with.into()) 175 self.edit.replace(range, replace_with.into())
@@ -197,6 +228,7 @@ impl AssistBuilder {
197 edit: self.edit.finish(), 228 edit: self.edit.finish(),
198 cursor_position: self.cursor_position, 229 cursor_position: self.cursor_position,
199 target: self.target, 230 target: self.target,
231 label: self.label,
200 } 232 }
201 } 233 }
202} 234}
diff --git a/crates/ra_assists/src/assists/inline_local_variable.rs b/crates/ra_assists/src/assists/inline_local_variable.rs
index 164aee90c..45e0f983f 100644
--- a/crates/ra_assists/src/assists/inline_local_variable.rs
+++ b/crates/ra_assists/src/assists/inline_local_variable.rs
@@ -4,7 +4,7 @@ use ra_syntax::{
4 TextRange, 4 TextRange,
5}; 5};
6 6
7use crate::assist_ctx::AssistBuilder; 7use crate::assist_ctx::ActionBuilder;
8use crate::{Assist, AssistCtx, AssistId}; 8use crate::{Assist, AssistCtx, AssistId};
9 9
10// Assist: inline_local_variable 10// Assist: inline_local_variable
@@ -94,7 +94,7 @@ pub(crate) fn inline_local_varialbe(ctx: AssistCtx<impl HirDatabase>) -> Option<
94 ctx.add_assist( 94 ctx.add_assist(
95 AssistId("inline_local_variable"), 95 AssistId("inline_local_variable"),
96 "Inline variable", 96 "Inline variable",
97 move |edit: &mut AssistBuilder| { 97 move |edit: &mut ActionBuilder| {
98 edit.delete(delete_range); 98 edit.delete(delete_range);
99 for (desc, should_wrap) in refs.iter().zip(wrap_in_parens) { 99 for (desc, should_wrap) in refs.iter().zip(wrap_in_parens) {
100 if should_wrap { 100 if should_wrap {
diff --git a/crates/ra_assists/src/ast_transform.rs b/crates/ra_assists/src/ast_transform.rs
index eac2903d1..56b7588ef 100644
--- a/crates/ra_assists/src/ast_transform.rs
+++ b/crates/ra_assists/src/ast_transform.rs
@@ -2,7 +2,7 @@
2use rustc_hash::FxHashMap; 2use rustc_hash::FxHashMap;
3 3
4use hir::{db::HirDatabase, InFile, PathResolution}; 4use hir::{db::HirDatabase, InFile, PathResolution};
5use ra_syntax::ast::{self, make, AstNode}; 5use ra_syntax::ast::{self, AstNode};
6 6
7pub trait AstTransform<'a> { 7pub trait AstTransform<'a> {
8 fn get_substitution( 8 fn get_substitution(
@@ -134,11 +134,18 @@ impl<'a, DB: HirDatabase> QualifyPaths<'a, DB> {
134 match resolution { 134 match resolution {
135 PathResolution::Def(def) => { 135 PathResolution::Def(def) => {
136 let found_path = from.find_use_path(self.db, def)?; 136 let found_path = from.find_use_path(self.db, def)?;
137 let args = p 137 let mut path = path_to_ast(found_path);
138
139 let type_args = p
138 .segment() 140 .segment()
139 .and_then(|s| s.type_arg_list()) 141 .and_then(|s| s.type_arg_list())
140 .map(|arg_list| apply(self, node.with_value(arg_list))); 142 .map(|arg_list| apply(self, node.with_value(arg_list)));
141 Some(make::path_with_type_arg_list(path_to_ast(found_path), args).syntax().clone()) 143 if let Some(type_args) = type_args {
144 let last_segment = path.segment().unwrap();
145 path = path.with_segment(last_segment.with_type_args(type_args))
146 }
147
148 Some(path.syntax().clone())
142 } 149 }
143 PathResolution::Local(_) 150 PathResolution::Local(_)
144 | PathResolution::TypeParam(_) 151 | PathResolution::TypeParam(_)
diff --git a/crates/ra_assists/src/doc_tests.rs b/crates/ra_assists/src/doc_tests.rs
index a8f8446cb..5dc1ee233 100644
--- a/crates/ra_assists/src/doc_tests.rs
+++ b/crates/ra_assists/src/doc_tests.rs
@@ -15,21 +15,21 @@ fn check(assist_id: &str, before: &str, after: &str) {
15 let (db, file_id) = TestDB::with_single_file(&before); 15 let (db, file_id) = TestDB::with_single_file(&before);
16 let frange = FileRange { file_id, range: selection.into() }; 16 let frange = FileRange { file_id, range: selection.into() };
17 17
18 let (_assist_id, action) = crate::assists(&db, frange) 18 let assist = crate::assists(&db, frange)
19 .into_iter() 19 .into_iter()
20 .find(|(id, _)| id.id.0 == assist_id) 20 .find(|assist| assist.label.id.0 == assist_id)
21 .unwrap_or_else(|| { 21 .unwrap_or_else(|| {
22 panic!( 22 panic!(
23 "\n\nAssist is not applicable: {}\nAvailable assists: {}", 23 "\n\nAssist is not applicable: {}\nAvailable assists: {}",
24 assist_id, 24 assist_id,
25 crate::assists(&db, frange) 25 crate::assists(&db, frange)
26 .into_iter() 26 .into_iter()
27 .map(|(id, _)| id.id.0) 27 .map(|assist| assist.label.id.0)
28 .collect::<Vec<_>>() 28 .collect::<Vec<_>>()
29 .join(", ") 29 .join(", ")
30 ) 30 )
31 }); 31 });
32 32
33 let actual = action.edit.apply(&before); 33 let actual = assist.get_first_action().edit.apply(&before);
34 assert_eq_text!(after, &actual); 34 assert_eq_text!(after, &actual);
35} 35}
diff --git a/crates/ra_assists/src/lib.rs b/crates/ra_assists/src/lib.rs
index 150b34ac7..d45b58966 100644
--- a/crates/ra_assists/src/lib.rs
+++ b/crates/ra_assists/src/lib.rs
@@ -13,6 +13,7 @@ mod doc_tests;
13mod test_db; 13mod test_db;
14pub mod ast_transform; 14pub mod ast_transform;
15 15
16use either::Either;
16use hir::db::HirDatabase; 17use hir::db::HirDatabase;
17use ra_db::FileRange; 18use ra_db::FileRange;
18use ra_syntax::{TextRange, TextUnit}; 19use ra_syntax::{TextRange, TextUnit};
@@ -35,11 +36,27 @@ pub struct AssistLabel {
35 36
36#[derive(Debug, Clone)] 37#[derive(Debug, Clone)]
37pub struct AssistAction { 38pub struct AssistAction {
39 pub label: Option<String>,
38 pub edit: TextEdit, 40 pub edit: TextEdit,
39 pub cursor_position: Option<TextUnit>, 41 pub cursor_position: Option<TextUnit>,
40 pub target: Option<TextRange>, 42 pub target: Option<TextRange>,
41} 43}
42 44
45#[derive(Debug, Clone)]
46pub struct ResolvedAssist {
47 pub label: AssistLabel,
48 pub action_data: Either<AssistAction, Vec<AssistAction>>,
49}
50
51impl ResolvedAssist {
52 pub fn get_first_action(&self) -> AssistAction {
53 match &self.action_data {
54 Either::Left(action) => action.clone(),
55 Either::Right(actions) => actions[0].clone(),
56 }
57 }
58}
59
43/// Return all the assists applicable at the given position. 60/// Return all the assists applicable at the given position.
44/// 61///
45/// Assists are returned in the "unresolved" state, that is only labels are 62/// Assists are returned in the "unresolved" state, that is only labels are
@@ -64,7 +81,7 @@ where
64/// 81///
65/// Assists are returned in the "resolved" state, that is with edit fully 82/// Assists are returned in the "resolved" state, that is with edit fully
66/// computed. 83/// computed.
67pub fn assists<H>(db: &H, range: FileRange) -> Vec<(AssistLabel, AssistAction)> 84pub fn assists<H>(db: &H, range: FileRange) -> Vec<ResolvedAssist>
68where 85where
69 H: HirDatabase + 'static, 86 H: HirDatabase + 'static,
70{ 87{
@@ -75,11 +92,11 @@ where
75 .iter() 92 .iter()
76 .filter_map(|f| f(ctx.clone())) 93 .filter_map(|f| f(ctx.clone()))
77 .map(|a| match a { 94 .map(|a| match a {
78 Assist::Resolved { label, action } => (label, action), 95 Assist::Resolved { assist } => assist,
79 Assist::Unresolved { .. } => unreachable!(), 96 Assist::Unresolved { .. } => unreachable!(),
80 }) 97 })
81 .collect::<Vec<_>>(); 98 .collect::<Vec<_>>();
82 a.sort_by(|a, b| match (a.1.target, b.1.target) { 99 a.sort_by(|a, b| match (a.get_first_action().target, b.get_first_action().target) {
83 (Some(a), Some(b)) => a.len().cmp(&b.len()), 100 (Some(a), Some(b)) => a.len().cmp(&b.len()),
84 (Some(_), None) => Ordering::Less, 101 (Some(_), None) => Ordering::Less,
85 (None, Some(_)) => Ordering::Greater, 102 (None, Some(_)) => Ordering::Greater,
@@ -174,7 +191,7 @@ mod helpers {
174 AssistCtx::with_ctx(&db, frange, true, assist).expect("code action is not applicable"); 191 AssistCtx::with_ctx(&db, frange, true, assist).expect("code action is not applicable");
175 let action = match assist { 192 let action = match assist {
176 Assist::Unresolved { .. } => unreachable!(), 193 Assist::Unresolved { .. } => unreachable!(),
177 Assist::Resolved { action, .. } => action, 194 Assist::Resolved { assist } => assist.get_first_action(),
178 }; 195 };
179 196
180 let actual = action.edit.apply(&before); 197 let actual = action.edit.apply(&before);
@@ -201,7 +218,7 @@ mod helpers {
201 AssistCtx::with_ctx(&db, frange, true, assist).expect("code action is not applicable"); 218 AssistCtx::with_ctx(&db, frange, true, assist).expect("code action is not applicable");
202 let action = match assist { 219 let action = match assist {
203 Assist::Unresolved { .. } => unreachable!(), 220 Assist::Unresolved { .. } => unreachable!(),
204 Assist::Resolved { action, .. } => action, 221 Assist::Resolved { assist } => assist.get_first_action(),
205 }; 222 };
206 223
207 let mut actual = action.edit.apply(&before); 224 let mut actual = action.edit.apply(&before);
@@ -224,7 +241,7 @@ mod helpers {
224 AssistCtx::with_ctx(&db, frange, true, assist).expect("code action is not applicable"); 241 AssistCtx::with_ctx(&db, frange, true, assist).expect("code action is not applicable");
225 let action = match assist { 242 let action = match assist {
226 Assist::Unresolved { .. } => unreachable!(), 243 Assist::Unresolved { .. } => unreachable!(),
227 Assist::Resolved { action, .. } => action, 244 Assist::Resolved { assist } => assist.get_first_action(),
228 }; 245 };
229 246
230 let range = action.target.expect("expected target on action"); 247 let range = action.target.expect("expected target on action");
@@ -243,7 +260,7 @@ mod helpers {
243 AssistCtx::with_ctx(&db, frange, true, assist).expect("code action is not applicable"); 260 AssistCtx::with_ctx(&db, frange, true, assist).expect("code action is not applicable");
244 let action = match assist { 261 let action = match assist {
245 Assist::Unresolved { .. } => unreachable!(), 262 Assist::Unresolved { .. } => unreachable!(),
246 Assist::Resolved { action, .. } => action, 263 Assist::Resolved { assist } => assist.get_first_action(),
247 }; 264 };
248 265
249 let range = action.target.expect("expected target on action"); 266 let range = action.target.expect("expected target on action");
@@ -293,10 +310,10 @@ mod tests {
293 let mut assists = assists.iter(); 310 let mut assists = assists.iter();
294 311
295 assert_eq!( 312 assert_eq!(
296 assists.next().expect("expected assist").0.label, 313 assists.next().expect("expected assist").label.label,
297 "Change visibility to pub(crate)" 314 "Change visibility to pub(crate)"
298 ); 315 );
299 assert_eq!(assists.next().expect("expected assist").0.label, "Add `#[derive]`"); 316 assert_eq!(assists.next().expect("expected assist").label.label, "Add `#[derive]`");
300 } 317 }
301 318
302 #[test] 319 #[test]
@@ -315,7 +332,7 @@ mod tests {
315 let assists = super::assists(&db, frange); 332 let assists = super::assists(&db, frange);
316 let mut assists = assists.iter(); 333 let mut assists = assists.iter();
317 334
318 assert_eq!(assists.next().expect("expected assist").0.label, "Extract into variable"); 335 assert_eq!(assists.next().expect("expected assist").label.label, "Extract into variable");
319 assert_eq!(assists.next().expect("expected assist").0.label, "Replace with match"); 336 assert_eq!(assists.next().expect("expected assist").label.label, "Replace with match");
320 } 337 }
321} 338}
diff --git a/crates/ra_cargo_watch/Cargo.toml b/crates/ra_cargo_watch/Cargo.toml
index 2e411d23b..9ead48abf 100644
--- a/crates/ra_cargo_watch/Cargo.toml
+++ b/crates/ra_cargo_watch/Cargo.toml
@@ -6,7 +6,7 @@ authors = ["rust-analyzer developers"]
6 6
7[dependencies] 7[dependencies]
8crossbeam-channel = "0.4" 8crossbeam-channel = "0.4"
9lsp-types = { version = "0.68.0", features = ["proposed"] } 9lsp-types = { version = "0.69.0", features = ["proposed"] }
10log = "0.4.3" 10log = "0.4.3"
11cargo_metadata = "0.9.1" 11cargo_metadata = "0.9.1"
12jod-thread = "0.1.0" 12jod-thread = "0.1.0"
diff --git a/crates/ra_cargo_watch/src/lib.rs b/crates/ra_cargo_watch/src/lib.rs
index 20fa5a924..7f4c9280c 100644
--- a/crates/ra_cargo_watch/src/lib.rs
+++ b/crates/ra_cargo_watch/src/lib.rs
@@ -38,7 +38,7 @@ pub struct CheckOptions {
38#[derive(Debug)] 38#[derive(Debug)]
39pub struct CheckWatcher { 39pub struct CheckWatcher {
40 pub task_recv: Receiver<CheckTask>, 40 pub task_recv: Receiver<CheckTask>,
41 pub shared: Arc<RwLock<CheckWatcherSharedState>>, 41 pub state: Arc<RwLock<CheckState>>,
42 cmd_send: Option<Sender<CheckCommand>>, 42 cmd_send: Option<Sender<CheckCommand>>,
43 handle: Option<JoinHandle<()>>, 43 handle: Option<JoinHandle<()>>,
44} 44}
@@ -46,22 +46,21 @@ pub struct CheckWatcher {
46impl CheckWatcher { 46impl CheckWatcher {
47 pub fn new(options: &CheckOptions, workspace_root: PathBuf) -> CheckWatcher { 47 pub fn new(options: &CheckOptions, workspace_root: PathBuf) -> CheckWatcher {
48 let options = options.clone(); 48 let options = options.clone();
49 let shared = Arc::new(RwLock::new(CheckWatcherSharedState::new())); 49 let state = Arc::new(RwLock::new(CheckState::new()));
50 50
51 let (task_send, task_recv) = unbounded::<CheckTask>(); 51 let (task_send, task_recv) = unbounded::<CheckTask>();
52 let (cmd_send, cmd_recv) = unbounded::<CheckCommand>(); 52 let (cmd_send, cmd_recv) = unbounded::<CheckCommand>();
53 let shared_ = shared.clone();
54 let handle = std::thread::spawn(move || { 53 let handle = std::thread::spawn(move || {
55 let mut check = CheckWatcherState::new(options, workspace_root, shared_); 54 let mut check = CheckWatcherThread::new(options, workspace_root);
56 check.run(&task_send, &cmd_recv); 55 check.run(&task_send, &cmd_recv);
57 }); 56 });
58 CheckWatcher { task_recv, cmd_send: Some(cmd_send), handle: Some(handle), shared } 57 CheckWatcher { task_recv, cmd_send: Some(cmd_send), handle: Some(handle), state }
59 } 58 }
60 59
61 /// Returns a CheckWatcher that doesn't actually do anything 60 /// Returns a CheckWatcher that doesn't actually do anything
62 pub fn dummy() -> CheckWatcher { 61 pub fn dummy() -> CheckWatcher {
63 let shared = Arc::new(RwLock::new(CheckWatcherSharedState::new())); 62 let state = Arc::new(RwLock::new(CheckState::new()));
64 CheckWatcher { task_recv: never(), cmd_send: None, handle: None, shared } 63 CheckWatcher { task_recv: never(), cmd_send: None, handle: None, state }
65 } 64 }
66 65
67 /// Schedule a re-start of the cargo check worker. 66 /// Schedule a re-start of the cargo check worker.
@@ -89,14 +88,14 @@ impl std::ops::Drop for CheckWatcher {
89} 88}
90 89
91#[derive(Debug)] 90#[derive(Debug)]
92pub struct CheckWatcherSharedState { 91pub struct CheckState {
93 diagnostic_collection: HashMap<Url, Vec<Diagnostic>>, 92 diagnostic_collection: HashMap<Url, Vec<Diagnostic>>,
94 suggested_fix_collection: HashMap<Url, Vec<SuggestedFix>>, 93 suggested_fix_collection: HashMap<Url, Vec<SuggestedFix>>,
95} 94}
96 95
97impl CheckWatcherSharedState { 96impl CheckState {
98 fn new() -> CheckWatcherSharedState { 97 fn new() -> CheckState {
99 CheckWatcherSharedState { 98 CheckState {
100 diagnostic_collection: HashMap::new(), 99 diagnostic_collection: HashMap::new(),
101 suggested_fix_collection: HashMap::new(), 100 suggested_fix_collection: HashMap::new(),
102 } 101 }
@@ -104,15 +103,11 @@ impl CheckWatcherSharedState {
104 103
105 /// Clear the cached diagnostics, and schedule updating diagnostics by the 104 /// Clear the cached diagnostics, and schedule updating diagnostics by the
106 /// server, to clear stale results. 105 /// server, to clear stale results.
107 pub fn clear(&mut self, task_send: &Sender<CheckTask>) { 106 pub fn clear(&mut self) -> Vec<Url> {
108 let cleared_files: Vec<Url> = self.diagnostic_collection.keys().cloned().collect(); 107 let cleared_files: Vec<Url> = self.diagnostic_collection.keys().cloned().collect();
109
110 self.diagnostic_collection.clear(); 108 self.diagnostic_collection.clear();
111 self.suggested_fix_collection.clear(); 109 self.suggested_fix_collection.clear();
112 110 cleared_files
113 for uri in cleared_files {
114 task_send.send(CheckTask::Update(uri.clone())).unwrap();
115 }
116 } 111 }
117 112
118 pub fn diagnostics_for(&self, uri: &Url) -> Option<&[Diagnostic]> { 113 pub fn diagnostics_for(&self, uri: &Url) -> Option<&[Diagnostic]> {
@@ -123,6 +118,13 @@ impl CheckWatcherSharedState {
123 self.suggested_fix_collection.get(uri).map(|d| d.as_slice()) 118 self.suggested_fix_collection.get(uri).map(|d| d.as_slice())
124 } 119 }
125 120
121 pub fn add_diagnostic_with_fixes(&mut self, file_uri: Url, diagnostic: DiagnosticWithFixes) {
122 for fix in diagnostic.suggested_fixes {
123 self.add_suggested_fix_for_diagnostic(fix, &diagnostic.diagnostic);
124 }
125 self.add_diagnostic(file_uri, diagnostic.diagnostic);
126 }
127
126 fn add_diagnostic(&mut self, file_uri: Url, diagnostic: Diagnostic) { 128 fn add_diagnostic(&mut self, file_uri: Url, diagnostic: Diagnostic) {
127 let diagnostics = self.diagnostic_collection.entry(file_uri).or_default(); 129 let diagnostics = self.diagnostic_collection.entry(file_uri).or_default();
128 130
@@ -158,8 +160,11 @@ impl CheckWatcherSharedState {
158 160
159#[derive(Debug)] 161#[derive(Debug)]
160pub enum CheckTask { 162pub enum CheckTask {
161 /// Request a update of the given files diagnostics 163 /// Request a clearing of all cached diagnostics from the check watcher
162 Update(Url), 164 ClearDiagnostics,
165
166 /// Request adding a diagnostic with fixes included to a file
167 AddDiagnostic(Url, DiagnosticWithFixes),
163 168
164 /// Request check progress notification to client 169 /// Request check progress notification to client
165 Status(WorkDoneProgress), 170 Status(WorkDoneProgress),
@@ -170,26 +175,20 @@ pub enum CheckCommand {
170 Update, 175 Update,
171} 176}
172 177
173struct CheckWatcherState { 178struct CheckWatcherThread {
174 options: CheckOptions, 179 options: CheckOptions,
175 workspace_root: PathBuf, 180 workspace_root: PathBuf,
176 watcher: WatchThread, 181 watcher: WatchThread,
177 last_update_req: Option<Instant>, 182 last_update_req: Option<Instant>,
178 shared: Arc<RwLock<CheckWatcherSharedState>>,
179} 183}
180 184
181impl CheckWatcherState { 185impl CheckWatcherThread {
182 fn new( 186 fn new(options: CheckOptions, workspace_root: PathBuf) -> CheckWatcherThread {
183 options: CheckOptions, 187 CheckWatcherThread {
184 workspace_root: PathBuf,
185 shared: Arc<RwLock<CheckWatcherSharedState>>,
186 ) -> CheckWatcherState {
187 CheckWatcherState {
188 options, 188 options,
189 workspace_root, 189 workspace_root,
190 watcher: WatchThread::dummy(), 190 watcher: WatchThread::dummy(),
191 last_update_req: None, 191 last_update_req: None,
192 shared,
193 } 192 }
194 } 193 }
195 194
@@ -215,7 +214,7 @@ impl CheckWatcherState {
215 214
216 if self.should_recheck() { 215 if self.should_recheck() {
217 self.last_update_req.take(); 216 self.last_update_req.take();
218 self.shared.write().clear(task_send); 217 task_send.send(CheckTask::ClearDiagnostics).unwrap();
219 218
220 // By replacing the watcher, we drop the previous one which 219 // By replacing the watcher, we drop the previous one which
221 // causes it to shut down automatically. 220 // causes it to shut down automatically.
@@ -240,7 +239,7 @@ impl CheckWatcherState {
240 } 239 }
241 } 240 }
242 241
243 fn handle_message(&mut self, msg: CheckEvent, task_send: &Sender<CheckTask>) { 242 fn handle_message(&self, msg: CheckEvent, task_send: &Sender<CheckTask>) {
244 match msg { 243 match msg {
245 CheckEvent::Begin => { 244 CheckEvent::Begin => {
246 task_send 245 task_send
@@ -279,18 +278,9 @@ impl CheckWatcherState {
279 }; 278 };
280 279
281 let MappedRustDiagnostic { location, diagnostic, suggested_fixes } = map_result; 280 let MappedRustDiagnostic { location, diagnostic, suggested_fixes } = map_result;
282 let file_uri = location.uri.clone();
283 281
284 if !suggested_fixes.is_empty() { 282 let diagnostic = DiagnosticWithFixes { diagnostic, suggested_fixes };
285 for suggested_fix in suggested_fixes { 283 task_send.send(CheckTask::AddDiagnostic(location.uri, diagnostic)).unwrap();
286 self.shared
287 .write()
288 .add_suggested_fix_for_diagnostic(suggested_fix, &diagnostic);
289 }
290 }
291 self.shared.write().add_diagnostic(file_uri, diagnostic);
292
293 task_send.send(CheckTask::Update(location.uri)).unwrap();
294 } 284 }
295 285
296 CheckEvent::Msg(Message::BuildScriptExecuted(_msg)) => {} 286 CheckEvent::Msg(Message::BuildScriptExecuted(_msg)) => {}
@@ -299,6 +289,12 @@ impl CheckWatcherState {
299 } 289 }
300} 290}
301 291
292#[derive(Debug)]
293pub struct DiagnosticWithFixes {
294 diagnostic: Diagnostic,
295 suggested_fixes: Vec<SuggestedFix>,
296}
297
302/// WatchThread exists to wrap around the communication needed to be able to 298/// WatchThread exists to wrap around the communication needed to be able to
303/// run `cargo check` without blocking. Currently the Rust standard library 299/// run `cargo check` without blocking. Currently the Rust standard library
304/// doesn't provide a way to read sub-process output without blocking, so we 300/// doesn't provide a way to read sub-process output without blocking, so we
diff --git a/crates/ra_hir/src/code_model.rs b/crates/ra_hir/src/code_model.rs
index 3b479356f..500b34c17 100644
--- a/crates/ra_hir/src/code_model.rs
+++ b/crates/ra_hir/src/code_model.rs
@@ -7,7 +7,6 @@ use hir_def::{
7 builtin_type::BuiltinType, 7 builtin_type::BuiltinType,
8 docs::Documentation, 8 docs::Documentation,
9 expr::{BindingAnnotation, Pat, PatId}, 9 expr::{BindingAnnotation, Pat, PatId},
10 nameres::ModuleSource,
11 per_ns::PerNs, 10 per_ns::PerNs,
12 resolver::HasResolver, 11 resolver::HasResolver,
13 type_ref::{Mutability, TypeRef}, 12 type_ref::{Mutability, TypeRef},
@@ -193,13 +192,14 @@ impl Module {
193 192
194 pub fn diagnostics(self, db: &impl HirDatabase, sink: &mut DiagnosticSink) { 193 pub fn diagnostics(self, db: &impl HirDatabase, sink: &mut DiagnosticSink) {
195 let _p = profile("Module::diagnostics"); 194 let _p = profile("Module::diagnostics");
196 db.crate_def_map(self.id.krate).add_diagnostics(db, self.id.local_id, sink); 195 let crate_def_map = db.crate_def_map(self.id.krate);
196 crate_def_map.add_diagnostics(db, self.id.local_id, sink);
197 for decl in self.declarations(db) { 197 for decl in self.declarations(db) {
198 match decl { 198 match decl {
199 crate::ModuleDef::Function(f) => f.diagnostics(db, sink), 199 crate::ModuleDef::Function(f) => f.diagnostics(db, sink),
200 crate::ModuleDef::Module(m) => { 200 crate::ModuleDef::Module(m) => {
201 // Only add diagnostics from inline modules 201 // Only add diagnostics from inline modules
202 if let ModuleSource::Module(_) = m.definition_source(db).value { 202 if crate_def_map[m.id.local_id].origin.is_inline() {
203 m.diagnostics(db, sink) 203 m.diagnostics(db, sink)
204 } 204 }
205 } 205 }
diff --git a/crates/ra_hir/src/lib.rs b/crates/ra_hir/src/lib.rs
index a1cf89010..a2350573c 100644
--- a/crates/ra_hir/src/lib.rs
+++ b/crates/ra_hir/src/lib.rs
@@ -8,7 +8,7 @@
8#![recursion_limit = "512"] 8#![recursion_limit = "512"]
9 9
10macro_rules! impl_froms { 10macro_rules! impl_froms {
11 ($e:ident: $($v:ident $(($($sv:ident),*))?),*) => { 11 ($e:ident: $($v:ident $(($($sv:ident),*))?),*$(,)?) => {
12 $( 12 $(
13 impl From<$v> for $e { 13 impl From<$v> for $e {
14 fn from(it: $v) -> $e { 14 fn from(it: $v) -> $e {
@@ -28,6 +28,7 @@ macro_rules! impl_froms {
28 28
29pub mod db; 29pub mod db;
30pub mod source_analyzer; 30pub mod source_analyzer;
31pub mod source_binder;
31 32
32pub mod diagnostics; 33pub mod diagnostics;
33 34
@@ -47,6 +48,7 @@ pub use crate::{
47 from_source::FromSource, 48 from_source::FromSource,
48 has_source::HasSource, 49 has_source::HasSource,
49 source_analyzer::{PathResolution, ScopeEntryWithSyntax, SourceAnalyzer}, 50 source_analyzer::{PathResolution, ScopeEntryWithSyntax, SourceAnalyzer},
51 source_binder::SourceBinder,
50}; 52};
51 53
52pub use hir_def::{ 54pub use hir_def::{
diff --git a/crates/ra_hir/src/source_analyzer.rs b/crates/ra_hir/src/source_analyzer.rs
index 76e0bff34..4f8fc9602 100644
--- a/crates/ra_hir/src/source_analyzer.rs
+++ b/crates/ra_hir/src/source_analyzer.rs
@@ -14,26 +14,22 @@ use hir_def::{
14 BodySourceMap, 14 BodySourceMap,
15 }, 15 },
16 expr::{ExprId, PatId}, 16 expr::{ExprId, PatId},
17 nameres::ModuleSource, 17 resolver::{self, resolver_for_scope, Resolver, TypeNs, ValueNs},
18 resolver::{self, resolver_for_scope, HasResolver, Resolver, TypeNs, ValueNs},
19 DefWithBodyId, TraitId, 18 DefWithBodyId, TraitId,
20}; 19};
21use hir_expand::{ 20use hir_expand::{
22 hygiene::Hygiene, name::AsName, AstId, HirFileId, InFile, MacroCallId, MacroCallKind, 21 hygiene::Hygiene, name::AsName, AstId, HirFileId, InFile, MacroCallId, MacroCallKind,
23}; 22};
24use hir_ty::{InEnvironment, InferenceResult, TraitEnvironment}; 23use hir_ty::{InEnvironment, InferenceResult, TraitEnvironment};
25use ra_prof::profile;
26use ra_syntax::{ 24use ra_syntax::{
27 ast::{self, AstNode}, 25 ast::{self, AstNode},
28 match_ast, AstPtr, 26 AstPtr, SyntaxNode, SyntaxNodePtr, SyntaxToken, TextRange, TextUnit,
29 SyntaxKind::*,
30 SyntaxNode, SyntaxNodePtr, SyntaxToken, TextRange, TextUnit,
31}; 27};
32use rustc_hash::FxHashSet; 28use rustc_hash::FxHashSet;
33 29
34use crate::{ 30use crate::{
35 db::HirDatabase, Adt, Const, DefWithBody, Enum, EnumVariant, FromSource, Function, ImplBlock, 31 db::HirDatabase, Adt, Const, DefWithBody, EnumVariant, Function, Local, MacroDef, Name, Path,
36 Local, MacroDef, Name, Path, ScopeDef, Static, Struct, Trait, Type, TypeAlias, TypeParam, 32 ScopeDef, Static, Struct, Trait, Type, TypeAlias, TypeParam,
37}; 33};
38 34
39/// `SourceAnalyzer` is a convenience wrapper which exposes HIR API in terms of 35/// `SourceAnalyzer` is a convenience wrapper which exposes HIR API in terms of
@@ -109,37 +105,43 @@ impl SourceAnalyzer {
109 node: InFile<&SyntaxNode>, 105 node: InFile<&SyntaxNode>,
110 offset: Option<TextUnit>, 106 offset: Option<TextUnit>,
111 ) -> SourceAnalyzer { 107 ) -> SourceAnalyzer {
112 let _p = profile("SourceAnalyzer::new"); 108 crate::source_binder::SourceBinder::new(db).analyze(node, offset)
113 let def_with_body = def_with_body_from_child_node(db, node); 109 }
114 if let Some(def) = def_with_body { 110
115 let (_body, source_map) = db.body_with_source_map(def.into()); 111 pub(crate) fn new_for_body(
116 let scopes = db.expr_scopes(def.into()); 112 db: &impl HirDatabase,
117 let scope = match offset { 113 def: DefWithBodyId,
118 None => scope_for(&scopes, &source_map, node), 114 node: InFile<&SyntaxNode>,
119 Some(offset) => scope_for_offset(&scopes, &source_map, node.with_value(offset)), 115 offset: Option<TextUnit>,
120 }; 116 ) -> SourceAnalyzer {
121 let resolver = resolver_for_scope(db, def.into(), scope); 117 let (_body, source_map) = db.body_with_source_map(def);
122 SourceAnalyzer { 118 let scopes = db.expr_scopes(def);
123 resolver, 119 let scope = match offset {
124 body_owner: Some(def), 120 None => scope_for(&scopes, &source_map, node),
125 body_source_map: Some(source_map), 121 Some(offset) => scope_for_offset(&scopes, &source_map, node.with_value(offset)),
126 infer: Some(db.infer(def.into())), 122 };
127 scopes: Some(scopes), 123 let resolver = resolver_for_scope(db, def, scope);
128 file_id: node.file_id, 124 SourceAnalyzer {
129 } 125 resolver,
130 } else { 126 body_owner: Some(def.into()),
131 SourceAnalyzer { 127 body_source_map: Some(source_map),
132 resolver: node 128 infer: Some(db.infer(def)),
133 .value 129 scopes: Some(scopes),
134 .ancestors() 130 file_id: node.file_id,
135 .find_map(|it| try_get_resolver_for_node(db, node.with_value(&it))) 131 }
136 .unwrap_or_default(), 132 }
137 body_owner: None, 133
138 body_source_map: None, 134 pub(crate) fn new_for_resolver(
139 infer: None, 135 resolver: Resolver,
140 scopes: None, 136 node: InFile<&SyntaxNode>,
141 file_id: node.file_id, 137 ) -> SourceAnalyzer {
142 } 138 SourceAnalyzer {
139 resolver,
140 body_owner: None,
141 body_source_map: None,
142 infer: None,
143 scopes: None,
144 file_id: node.file_id,
143 } 145 }
144 } 146 }
145 147
@@ -366,64 +368,6 @@ impl SourceAnalyzer {
366 } 368 }
367} 369}
368 370
369fn try_get_resolver_for_node(db: &impl HirDatabase, node: InFile<&SyntaxNode>) -> Option<Resolver> {
370 match_ast! {
371 match (node.value) {
372 ast::Module(it) => {
373 let src = node.with_value(it);
374 Some(crate::Module::from_declaration(db, src)?.id.resolver(db))
375 },
376 ast::SourceFile(it) => {
377 let src = node.with_value(ModuleSource::SourceFile(it));
378 Some(crate::Module::from_definition(db, src)?.id.resolver(db))
379 },
380 ast::StructDef(it) => {
381 let src = node.with_value(it);
382 Some(Struct::from_source(db, src)?.id.resolver(db))
383 },
384 ast::EnumDef(it) => {
385 let src = node.with_value(it);
386 Some(Enum::from_source(db, src)?.id.resolver(db))
387 },
388 ast::ImplBlock(it) => {
389 let src = node.with_value(it);
390 Some(ImplBlock::from_source(db, src)?.id.resolver(db))
391 },
392 ast::TraitDef(it) => {
393 let src = node.with_value(it);
394 Some(Trait::from_source(db, src)?.id.resolver(db))
395 },
396 _ => match node.value.kind() {
397 FN_DEF | CONST_DEF | STATIC_DEF => {
398 let def = def_with_body_from_child_node(db, node)?;
399 let def = DefWithBodyId::from(def);
400 Some(def.resolver(db))
401 }
402 // FIXME add missing cases
403 _ => None
404 }
405 }
406 }
407}
408
409fn def_with_body_from_child_node(
410 db: &impl HirDatabase,
411 child: InFile<&SyntaxNode>,
412) -> Option<DefWithBody> {
413 let _p = profile("def_with_body_from_child_node");
414 child.cloned().ancestors_with_macros(db).find_map(|node| {
415 let n = &node.value;
416 match_ast! {
417 match n {
418 ast::FnDef(def) => { return Function::from_source(db, node.with_value(def)).map(DefWithBody::from); },
419 ast::ConstDef(def) => { return Const::from_source(db, node.with_value(def)).map(DefWithBody::from); },
420 ast::StaticDef(def) => { return Static::from_source(db, node.with_value(def)).map(DefWithBody::from); },
421 _ => { None },
422 }
423 }
424 })
425}
426
427fn scope_for( 371fn scope_for(
428 scopes: &ExprScopes, 372 scopes: &ExprScopes,
429 source_map: &BodySourceMap, 373 source_map: &BodySourceMap,
diff --git a/crates/ra_hir/src/source_binder.rs b/crates/ra_hir/src/source_binder.rs
new file mode 100644
index 000000000..00541dbe1
--- /dev/null
+++ b/crates/ra_hir/src/source_binder.rs
@@ -0,0 +1,173 @@
1//! `SourceBinder` should be the main entry point for getting info about source code.
2//! It's main task is to map source syntax trees to hir-level IDs.
3//!
4//! It is intended to subsume `FromSource` and `SourceAnalyzer`.
5
6use hir_def::{
7 child_by_source::ChildBySource,
8 dyn_map::DynMap,
9 keys::{self, Key},
10 resolver::{HasResolver, Resolver},
11 ConstId, DefWithBodyId, EnumId, EnumVariantId, FunctionId, ImplId, ModuleId, StaticId,
12 StructFieldId, StructId, TraitId, TypeAliasId, UnionId, VariantId,
13};
14use hir_expand::InFile;
15use ra_prof::profile;
16use ra_syntax::{ast, match_ast, AstNode, SyntaxNode, TextUnit};
17use rustc_hash::FxHashMap;
18
19use crate::{db::HirDatabase, ModuleSource, SourceAnalyzer};
20
21pub struct SourceBinder<'a, DB> {
22 pub db: &'a DB,
23 child_by_source_cache: FxHashMap<ChildContainer, DynMap>,
24}
25
26impl<DB: HirDatabase> SourceBinder<'_, DB> {
27 pub fn new(db: &DB) -> SourceBinder<DB> {
28 SourceBinder { db, child_by_source_cache: FxHashMap::default() }
29 }
30
31 pub fn analyze(
32 &mut self,
33 src: InFile<&SyntaxNode>,
34 offset: Option<TextUnit>,
35 ) -> SourceAnalyzer {
36 let _p = profile("SourceBinder::analyzer");
37 let container = match self.find_container(src) {
38 Some(it) => it,
39 None => return SourceAnalyzer::new_for_resolver(Resolver::default(), src),
40 };
41
42 let resolver = match container {
43 ChildContainer::DefWithBodyId(def) => {
44 return SourceAnalyzer::new_for_body(self.db, def, src, offset)
45 }
46 ChildContainer::TraitId(it) => it.resolver(self.db),
47 ChildContainer::ImplId(it) => it.resolver(self.db),
48 ChildContainer::ModuleId(it) => it.resolver(self.db),
49 ChildContainer::EnumId(it) => it.resolver(self.db),
50 ChildContainer::VariantId(it) => it.resolver(self.db),
51 };
52 SourceAnalyzer::new_for_resolver(resolver, src)
53 }
54
55 pub fn to_def<D, T>(&mut self, src: InFile<T>) -> Option<D>
56 where
57 D: From<T::ID>,
58 T: ToId,
59 {
60 let id: T::ID = self.to_id(src)?;
61 Some(id.into())
62 }
63
64 fn to_id<T: ToId>(&mut self, src: InFile<T>) -> Option<T::ID> {
65 let container = self.find_container(src.as_ref().map(|it| it.syntax()))?;
66 let db = self.db;
67 let dyn_map =
68 &*self.child_by_source_cache.entry(container).or_insert_with(|| match container {
69 ChildContainer::DefWithBodyId(it) => it.child_by_source(db),
70 ChildContainer::ModuleId(it) => it.child_by_source(db),
71 ChildContainer::TraitId(it) => it.child_by_source(db),
72 ChildContainer::ImplId(it) => it.child_by_source(db),
73 ChildContainer::EnumId(it) => it.child_by_source(db),
74 ChildContainer::VariantId(it) => it.child_by_source(db),
75 });
76 dyn_map[T::KEY].get(&src).copied()
77 }
78
79 fn find_container(&mut self, src: InFile<&SyntaxNode>) -> Option<ChildContainer> {
80 for container in src.cloned().ancestors_with_macros(self.db).skip(1) {
81 let res: ChildContainer = match_ast! {
82 match (container.value) {
83 ast::TraitDef(it) => {
84 let def: TraitId = self.to_id(container.with_value(it))?;
85 def.into()
86 },
87 ast::ImplBlock(it) => {
88 let def: ImplId = self.to_id(container.with_value(it))?;
89 def.into()
90 },
91 ast::FnDef(it) => {
92 let def: FunctionId = self.to_id(container.with_value(it))?;
93 DefWithBodyId::from(def).into()
94 },
95 ast::StaticDef(it) => {
96 let def: StaticId = self.to_id(container.with_value(it))?;
97 DefWithBodyId::from(def).into()
98 },
99 ast::ConstDef(it) => {
100 let def: ConstId = self.to_id(container.with_value(it))?;
101 DefWithBodyId::from(def).into()
102 },
103 ast::EnumDef(it) => {
104 let def: EnumId = self.to_id(container.with_value(it))?;
105 def.into()
106 },
107 ast::StructDef(it) => {
108 let def: StructId = self.to_id(container.with_value(it))?;
109 VariantId::from(def).into()
110 },
111 ast::UnionDef(it) => {
112 let def: UnionId = self.to_id(container.with_value(it))?;
113 VariantId::from(def).into()
114 },
115 // FIXME: handle out-of-line modules here
116 _ => { continue },
117 }
118 };
119 return Some(res);
120 }
121
122 let module_source = ModuleSource::from_child_node(self.db, src);
123 let c = crate::Module::from_definition(self.db, src.with_value(module_source))?;
124 Some(c.id.into())
125 }
126}
127
128#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
129enum ChildContainer {
130 DefWithBodyId(DefWithBodyId),
131 ModuleId(ModuleId),
132 TraitId(TraitId),
133 ImplId(ImplId),
134 EnumId(EnumId),
135 VariantId(VariantId),
136}
137impl_froms! {
138 ChildContainer:
139 DefWithBodyId,
140 ModuleId,
141 TraitId,
142 ImplId,
143 EnumId,
144 VariantId,
145}
146
147pub trait ToId: Sized + AstNode + 'static {
148 type ID: Sized + Copy + 'static;
149 const KEY: Key<Self, Self::ID>;
150}
151
152macro_rules! to_id_impls {
153 ($(($id:ident, $ast:path, $key:path)),* ,) => {$(
154 impl ToId for $ast {
155 type ID = $id;
156 const KEY: Key<Self, Self::ID> = $key;
157 }
158 )*}
159}
160
161to_id_impls![
162 (StructId, ast::StructDef, keys::STRUCT),
163 (UnionId, ast::UnionDef, keys::UNION),
164 (EnumId, ast::EnumDef, keys::ENUM),
165 (TraitId, ast::TraitDef, keys::TRAIT),
166 (FunctionId, ast::FnDef, keys::FUNCTION),
167 (StaticId, ast::StaticDef, keys::STATIC),
168 (ConstId, ast::ConstDef, keys::CONST),
169 (TypeAliasId, ast::TypeAliasDef, keys::TYPE_ALIAS),
170 (ImplId, ast::ImplBlock, keys::IMPL),
171 (StructFieldId, ast::RecordFieldDef, keys::RECORD_FIELD),
172 (EnumVariantId, ast::EnumVariant, keys::ENUM_VARIANT),
173];
diff --git a/crates/ra_hir_def/src/find_path.rs b/crates/ra_hir_def/src/find_path.rs
index f7dc8acb7..8cc2fb160 100644
--- a/crates/ra_hir_def/src/find_path.rs
+++ b/crates/ra_hir_def/src/find_path.rs
@@ -35,7 +35,7 @@ fn find_path_inner(
35 let def_map = db.crate_def_map(from.krate); 35 let def_map = db.crate_def_map(from.krate);
36 let from_scope: &crate::item_scope::ItemScope = &def_map.modules[from.local_id].scope; 36 let from_scope: &crate::item_scope::ItemScope = &def_map.modules[from.local_id].scope;
37 if let Some((name, _)) = from_scope.name_of(item) { 37 if let Some((name, _)) = from_scope.name_of(item) {
38 return Some(ModPath::from_simple_segments(PathKind::Plain, vec![name.clone()])); 38 return Some(ModPath::from_segments(PathKind::Plain, vec![name.clone()]));
39 } 39 }
40 40
41 // - if the item is the crate root, return `crate` 41 // - if the item is the crate root, return `crate`
@@ -45,12 +45,12 @@ fn find_path_inner(
45 local_id: def_map.root, 45 local_id: def_map.root,
46 })) 46 }))
47 { 47 {
48 return Some(ModPath::from_simple_segments(PathKind::Crate, Vec::new())); 48 return Some(ModPath::from_segments(PathKind::Crate, Vec::new()));
49 } 49 }
50 50
51 // - if the item is the module we're in, use `self` 51 // - if the item is the module we're in, use `self`
52 if item == ItemInNs::Types(from.into()) { 52 if item == ItemInNs::Types(from.into()) {
53 return Some(ModPath::from_simple_segments(PathKind::Super(0), Vec::new())); 53 return Some(ModPath::from_segments(PathKind::Super(0), Vec::new()));
54 } 54 }
55 55
56 // - if the item is the parent module, use `super` (this is not used recursively, since `super::super` is ugly) 56 // - if the item is the parent module, use `super` (this is not used recursively, since `super::super` is ugly)
@@ -61,14 +61,14 @@ fn find_path_inner(
61 local_id: parent_id, 61 local_id: parent_id,
62 })) 62 }))
63 { 63 {
64 return Some(ModPath::from_simple_segments(PathKind::Super(1), Vec::new())); 64 return Some(ModPath::from_segments(PathKind::Super(1), Vec::new()));
65 } 65 }
66 } 66 }
67 67
68 // - if the item is the crate root of a dependency crate, return the name from the extern prelude 68 // - if the item is the crate root of a dependency crate, return the name from the extern prelude
69 for (name, def_id) in &def_map.extern_prelude { 69 for (name, def_id) in &def_map.extern_prelude {
70 if item == ItemInNs::Types(*def_id) { 70 if item == ItemInNs::Types(*def_id) {
71 return Some(ModPath::from_simple_segments(PathKind::Plain, vec![name.clone()])); 71 return Some(ModPath::from_segments(PathKind::Plain, vec![name.clone()]));
72 } 72 }
73 } 73 }
74 74
@@ -79,7 +79,7 @@ fn find_path_inner(
79 &prelude_def_map.modules[prelude_module.local_id].scope; 79 &prelude_def_map.modules[prelude_module.local_id].scope;
80 if let Some((name, vis)) = prelude_scope.name_of(item) { 80 if let Some((name, vis)) = prelude_scope.name_of(item) {
81 if vis.is_visible_from(db, from) { 81 if vis.is_visible_from(db, from) {
82 return Some(ModPath::from_simple_segments(PathKind::Plain, vec![name.clone()])); 82 return Some(ModPath::from_segments(PathKind::Plain, vec![name.clone()]));
83 } 83 }
84 } 84 }
85 } 85 }
diff --git a/crates/ra_hir_def/src/lib.rs b/crates/ra_hir_def/src/lib.rs
index ebc12e891..feb3a300d 100644
--- a/crates/ra_hir_def/src/lib.rs
+++ b/crates/ra_hir_def/src/lib.rs
@@ -332,7 +332,7 @@ pub enum VariantId {
332 StructId(StructId), 332 StructId(StructId),
333 UnionId(UnionId), 333 UnionId(UnionId),
334} 334}
335impl_froms!(VariantId: EnumVariantId, StructId); 335impl_froms!(VariantId: EnumVariantId, StructId, UnionId);
336 336
337trait Intern { 337trait Intern {
338 type ID; 338 type ID;
diff --git a/crates/ra_hir_def/src/nameres.rs b/crates/ra_hir_def/src/nameres.rs
index 4d210eab1..e1a6a46df 100644
--- a/crates/ra_hir_def/src/nameres.rs
+++ b/crates/ra_hir_def/src/nameres.rs
@@ -145,6 +145,13 @@ impl ModuleOrigin {
145 } 145 }
146 } 146 }
147 147
148 pub fn is_inline(&self) -> bool {
149 match self {
150 ModuleOrigin::Inline { .. } => true,
151 ModuleOrigin::CrateRoot { .. } | ModuleOrigin::File { .. } => false,
152 }
153 }
154
148 /// Returns a node which defines this module. 155 /// Returns a node which defines this module.
149 /// That is, a file or a `mod foo {}` with items. 156 /// That is, a file or a `mod foo {}` with items.
150 fn definition_source(&self, db: &impl DefDatabase) -> InFile<ModuleSource> { 157 fn definition_source(&self, db: &impl DefDatabase) -> InFile<ModuleSource> {
diff --git a/crates/ra_hir_def/src/path.rs b/crates/ra_hir_def/src/path.rs
index 9f93a5424..ab290e2c9 100644
--- a/crates/ra_hir_def/src/path.rs
+++ b/crates/ra_hir_def/src/path.rs
@@ -39,10 +39,7 @@ impl ModPath {
39 lower::lower_path(path, hygiene).map(|it| it.mod_path) 39 lower::lower_path(path, hygiene).map(|it| it.mod_path)
40 } 40 }
41 41
42 pub fn from_simple_segments( 42 pub fn from_segments(kind: PathKind, segments: impl IntoIterator<Item = Name>) -> ModPath {
43 kind: PathKind,
44 segments: impl IntoIterator<Item = Name>,
45 ) -> ModPath {
46 let segments = segments.into_iter().collect::<Vec<_>>(); 43 let segments = segments.into_iter().collect::<Vec<_>>();
47 ModPath { kind, segments } 44 ModPath { kind, segments }
48 } 45 }
@@ -240,7 +237,7 @@ impl From<Name> for Path {
240 fn from(name: Name) -> Path { 237 fn from(name: Name) -> Path {
241 Path { 238 Path {
242 type_anchor: None, 239 type_anchor: None,
243 mod_path: ModPath::from_simple_segments(PathKind::Plain, iter::once(name)), 240 mod_path: ModPath::from_segments(PathKind::Plain, iter::once(name)),
244 generic_args: vec![None], 241 generic_args: vec![None],
245 } 242 }
246 } 243 }
@@ -248,7 +245,7 @@ impl From<Name> for Path {
248 245
249impl From<Name> for ModPath { 246impl From<Name> for ModPath {
250 fn from(name: Name) -> ModPath { 247 fn from(name: Name) -> ModPath {
251 ModPath::from_simple_segments(PathKind::Plain, iter::once(name)) 248 ModPath::from_segments(PathKind::Plain, iter::once(name))
252 } 249 }
253} 250}
254 251
@@ -311,7 +308,7 @@ macro_rules! __known_path {
311macro_rules! __path { 308macro_rules! __path {
312 ($start:ident $(:: $seg:ident)*) => ({ 309 ($start:ident $(:: $seg:ident)*) => ({
313 $crate::__known_path!($start $(:: $seg)*); 310 $crate::__known_path!($start $(:: $seg)*);
314 $crate::path::ModPath::from_simple_segments($crate::path::PathKind::Abs, vec![ 311 $crate::path::ModPath::from_segments($crate::path::PathKind::Abs, vec![
315 $crate::path::__name![$start], $($crate::path::__name![$seg],)* 312 $crate::path::__name![$start], $($crate::path::__name![$seg],)*
316 ]) 313 ])
317 }); 314 });
diff --git a/crates/ra_hir_def/src/path/lower/lower_use.rs b/crates/ra_hir_def/src/path/lower/lower_use.rs
index 3218eaf0a..531878174 100644
--- a/crates/ra_hir_def/src/path/lower/lower_use.rs
+++ b/crates/ra_hir_def/src/path/lower/lower_use.rs
@@ -84,7 +84,7 @@ fn convert_path(prefix: Option<ModPath>, path: ast::Path, hygiene: &Hygiene) ->
84 res 84 res
85 } 85 }
86 Either::Right(crate_id) => { 86 Either::Right(crate_id) => {
87 return Some(ModPath::from_simple_segments( 87 return Some(ModPath::from_segments(
88 PathKind::DollarCrate(crate_id), 88 PathKind::DollarCrate(crate_id),
89 iter::empty(), 89 iter::empty(),
90 )) 90 ))
@@ -95,19 +95,19 @@ fn convert_path(prefix: Option<ModPath>, path: ast::Path, hygiene: &Hygiene) ->
95 if prefix.is_some() { 95 if prefix.is_some() {
96 return None; 96 return None;
97 } 97 }
98 ModPath::from_simple_segments(PathKind::Crate, iter::empty()) 98 ModPath::from_segments(PathKind::Crate, iter::empty())
99 } 99 }
100 ast::PathSegmentKind::SelfKw => { 100 ast::PathSegmentKind::SelfKw => {
101 if prefix.is_some() { 101 if prefix.is_some() {
102 return None; 102 return None;
103 } 103 }
104 ModPath::from_simple_segments(PathKind::Super(0), iter::empty()) 104 ModPath::from_segments(PathKind::Super(0), iter::empty())
105 } 105 }
106 ast::PathSegmentKind::SuperKw => { 106 ast::PathSegmentKind::SuperKw => {
107 if prefix.is_some() { 107 if prefix.is_some() {
108 return None; 108 return None;
109 } 109 }
110 ModPath::from_simple_segments(PathKind::Super(1), iter::empty()) 110 ModPath::from_segments(PathKind::Super(1), iter::empty())
111 } 111 }
112 ast::PathSegmentKind::Type { .. } => { 112 ast::PathSegmentKind::Type { .. } => {
113 // not allowed in imports 113 // not allowed in imports
diff --git a/crates/ra_ide/src/assists.rs b/crates/ra_ide/src/assists.rs
index e00589733..a936900da 100644
--- a/crates/ra_ide/src/assists.rs
+++ b/crates/ra_ide/src/assists.rs
@@ -2,27 +2,53 @@
2 2
3use ra_db::{FilePosition, FileRange}; 3use ra_db::{FilePosition, FileRange};
4 4
5use crate::{db::RootDatabase, SourceChange, SourceFileEdit}; 5use crate::{db::RootDatabase, FileId, SourceChange, SourceFileEdit};
6 6
7use either::Either;
7pub use ra_assists::AssistId; 8pub use ra_assists::AssistId;
9use ra_assists::{AssistAction, AssistLabel};
8 10
9#[derive(Debug)] 11#[derive(Debug)]
10pub struct Assist { 12pub struct Assist {
11 pub id: AssistId, 13 pub id: AssistId,
12 pub change: SourceChange, 14 pub label: String,
15 pub change_data: Either<SourceChange, Vec<SourceChange>>,
13} 16}
14 17
15pub(crate) fn assists(db: &RootDatabase, frange: FileRange) -> Vec<Assist> { 18pub(crate) fn assists(db: &RootDatabase, frange: FileRange) -> Vec<Assist> {
16 ra_assists::assists(db, frange) 19 ra_assists::assists(db, frange)
17 .into_iter() 20 .into_iter()
18 .map(|(label, action)| { 21 .map(|assist| {
19 let file_id = frange.file_id; 22 let file_id = frange.file_id;
20 let file_edit = SourceFileEdit { file_id, edit: action.edit }; 23 let assist_label = &assist.label;
21 let id = label.id; 24 Assist {
22 let change = SourceChange::source_file_edit(label.label, file_edit).with_cursor_opt( 25 id: assist_label.id,
23 action.cursor_position.map(|offset| FilePosition { offset, file_id }), 26 label: assist_label.label.clone(),
24 ); 27 change_data: match assist.action_data {
25 Assist { id, change } 28 Either::Left(action) => {
29 Either::Left(action_to_edit(action, file_id, assist_label))
30 }
31 Either::Right(actions) => Either::Right(
32 actions
33 .into_iter()
34 .map(|action| action_to_edit(action, file_id, assist_label))
35 .collect(),
36 ),
37 },
38 }
26 }) 39 })
27 .collect() 40 .collect()
28} 41}
42
43fn action_to_edit(
44 action: AssistAction,
45 file_id: FileId,
46 assist_label: &AssistLabel,
47) -> SourceChange {
48 let file_edit = SourceFileEdit { file_id, edit: action.edit };
49 SourceChange::source_file_edit(
50 action.label.unwrap_or_else(|| assist_label.label.clone()),
51 file_edit,
52 )
53 .with_cursor_opt(action.cursor_position.map(|offset| FilePosition { offset, file_id }))
54}
diff --git a/crates/ra_ide/src/display/function_signature.rs b/crates/ra_ide/src/display/function_signature.rs
index 324ad9552..ddc53a52b 100644
--- a/crates/ra_ide/src/display/function_signature.rs
+++ b/crates/ra_ide/src/display/function_signature.rs
@@ -34,6 +34,8 @@ pub struct FunctionSignature {
34 pub generic_parameters: Vec<String>, 34 pub generic_parameters: Vec<String>,
35 /// Parameters of the function 35 /// Parameters of the function
36 pub parameters: Vec<String>, 36 pub parameters: Vec<String>,
37 /// Parameter names of the function
38 pub parameter_names: Vec<String>,
37 /// Optional return type 39 /// Optional return type
38 pub ret_type: Option<String>, 40 pub ret_type: Option<String>,
39 /// Where predicates 41 /// Where predicates
@@ -75,6 +77,7 @@ impl FunctionSignature {
75 name: node.name().map(|n| n.text().to_string()), 77 name: node.name().map(|n| n.text().to_string()),
76 ret_type: node.name().map(|n| n.text().to_string()), 78 ret_type: node.name().map(|n| n.text().to_string()),
77 parameters: params, 79 parameters: params,
80 parameter_names: vec![],
78 generic_parameters: generic_parameters(&node), 81 generic_parameters: generic_parameters(&node),
79 where_predicates: where_predicates(&node), 82 where_predicates: where_predicates(&node),
80 doc: None, 83 doc: None,
@@ -114,6 +117,7 @@ impl FunctionSignature {
114 name: Some(name), 117 name: Some(name),
115 ret_type: None, 118 ret_type: None,
116 parameters: params, 119 parameters: params,
120 parameter_names: vec![],
117 generic_parameters: vec![], 121 generic_parameters: vec![],
118 where_predicates: vec![], 122 where_predicates: vec![],
119 doc: None, 123 doc: None,
@@ -134,6 +138,7 @@ impl FunctionSignature {
134 name: node.name().map(|n| n.text().to_string()), 138 name: node.name().map(|n| n.text().to_string()),
135 ret_type: None, 139 ret_type: None,
136 parameters: params, 140 parameters: params,
141 parameter_names: vec![],
137 generic_parameters: vec![], 142 generic_parameters: vec![],
138 where_predicates: vec![], 143 where_predicates: vec![],
139 doc: None, 144 doc: None,
@@ -157,6 +162,20 @@ impl From<&'_ ast::FnDef> for FunctionSignature {
157 res 162 res
158 } 163 }
159 164
165 fn param_name_list(node: &ast::FnDef) -> Vec<String> {
166 let mut res = vec![];
167 if let Some(param_list) = node.param_list() {
168 if let Some(self_param) = param_list.self_param() {
169 res.push(self_param.syntax().text().to_string())
170 }
171
172 res.extend(param_list.params().map(|param| {
173 param.pat().map(|pat| pat.syntax().text().to_string()).unwrap_or_default()
174 }));
175 }
176 res
177 }
178
160 FunctionSignature { 179 FunctionSignature {
161 kind: CallableKind::Function, 180 kind: CallableKind::Function,
162 visibility: node.visibility().map(|n| n.syntax().text().to_string()), 181 visibility: node.visibility().map(|n| n.syntax().text().to_string()),
@@ -166,6 +185,7 @@ impl From<&'_ ast::FnDef> for FunctionSignature {
166 .and_then(|r| r.type_ref()) 185 .and_then(|r| r.type_ref())
167 .map(|n| n.syntax().text().to_string()), 186 .map(|n| n.syntax().text().to_string()),
168 parameters: param_list(node), 187 parameters: param_list(node),
188 parameter_names: param_name_list(node),
169 generic_parameters: generic_parameters(node), 189 generic_parameters: generic_parameters(node),
170 where_predicates: where_predicates(node), 190 where_predicates: where_predicates(node),
171 // docs are processed separately 191 // docs are processed separately
diff --git a/crates/ra_ide/src/goto_definition.rs b/crates/ra_ide/src/goto_definition.rs
index 79d332e8c..f2b5af321 100644
--- a/crates/ra_ide/src/goto_definition.rs
+++ b/crates/ra_ide/src/goto_definition.rs
@@ -1,6 +1,6 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use hir::{db::AstDatabase, InFile}; 3use hir::{db::AstDatabase, InFile, SourceBinder};
4use ra_syntax::{ 4use ra_syntax::{
5 ast::{self, DocCommentsOwner}, 5 ast::{self, DocCommentsOwner},
6 match_ast, AstNode, 6 match_ast, AstNode,
@@ -72,7 +72,8 @@ pub(crate) fn reference_definition(
72) -> ReferenceResult { 72) -> ReferenceResult {
73 use self::ReferenceResult::*; 73 use self::ReferenceResult::*;
74 74
75 let name_kind = classify_name_ref(db, name_ref).map(|d| d.kind); 75 let mut sb = SourceBinder::new(db);
76 let name_kind = classify_name_ref(&mut sb, name_ref).map(|d| d.kind);
76 match name_kind { 77 match name_kind {
77 Some(Macro(it)) => return Exact(it.to_nav(db)), 78 Some(Macro(it)) => return Exact(it.to_nav(db)),
78 Some(Field(it)) => return Exact(it.to_nav(db)), 79 Some(Field(it)) => return Exact(it.to_nav(db)),
diff --git a/crates/ra_ide/src/hover.rs b/crates/ra_ide/src/hover.rs
index 5548681f1..6661e5cb2 100644
--- a/crates/ra_ide/src/hover.rs
+++ b/crates/ra_ide/src/hover.rs
@@ -1,6 +1,6 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use hir::{db::AstDatabase, Adt, HasSource, HirDisplay}; 3use hir::{db::AstDatabase, Adt, HasSource, HirDisplay, SourceBinder};
4use ra_db::SourceDatabase; 4use ra_db::SourceDatabase;
5use ra_syntax::{ 5use ra_syntax::{
6 algo::find_covering_element, 6 algo::find_covering_element,
@@ -152,13 +152,14 @@ pub(crate) fn hover(db: &RootDatabase, position: FilePosition) -> Option<RangeIn
152 152
153 let mut res = HoverResult::new(); 153 let mut res = HoverResult::new();
154 154
155 let mut sb = SourceBinder::new(db);
155 if let Some((range, name_kind)) = match_ast! { 156 if let Some((range, name_kind)) = match_ast! {
156 match (token.value.parent()) { 157 match (token.value.parent()) {
157 ast::NameRef(name_ref) => { 158 ast::NameRef(name_ref) => {
158 classify_name_ref(db, token.with_value(&name_ref)).map(|d| (name_ref.syntax().text_range(), d.kind)) 159 classify_name_ref(&mut sb, token.with_value(&name_ref)).map(|d| (name_ref.syntax().text_range(), d.kind))
159 }, 160 },
160 ast::Name(name) => { 161 ast::Name(name) => {
161 classify_name(db, token.with_value(&name)).map(|d| (name.syntax().text_range(), d.kind)) 162 classify_name(&mut sb, token.with_value(&name)).map(|d| (name.syntax().text_range(), d.kind))
162 }, 163 },
163 _ => None, 164 _ => None,
164 } 165 }
@@ -742,7 +743,7 @@ fn func(foo: i32) { if true { <|>foo; }; }
742 } 743 }
743 fn foo(bar:u32) { 744 fn foo(bar:u32) {
744 let a = id!(ba<|>r); 745 let a = id!(ba<|>r);
745 } 746 }
746 ", 747 ",
747 &["u32"], 748 &["u32"],
748 ); 749 );
diff --git a/crates/ra_ide/src/inlay_hints.rs b/crates/ra_ide/src/inlay_hints.rs
index 977aafc51..1b631c7cd 100644
--- a/crates/ra_ide/src/inlay_hints.rs
+++ b/crates/ra_ide/src/inlay_hints.rs
@@ -1,18 +1,19 @@
1//! FIXME: write short doc here 1//! FIXME: write short doc here
2 2
3use hir::{HirDisplay, SourceAnalyzer}; 3use hir::{HirDisplay, SourceAnalyzer, SourceBinder};
4use once_cell::unsync::Lazy; 4use once_cell::unsync::Lazy;
5use ra_prof::profile; 5use ra_prof::profile;
6use ra_syntax::{ 6use ra_syntax::{
7 ast::{self, AstNode, TypeAscriptionOwner}, 7 ast::{self, ArgListOwner, AstNode, TypeAscriptionOwner},
8 match_ast, SmolStr, SourceFile, SyntaxKind, SyntaxNode, TextRange, 8 match_ast, SmolStr, SourceFile, SyntaxKind, SyntaxNode, TextRange,
9}; 9};
10 10
11use crate::{db::RootDatabase, FileId}; 11use crate::{db::RootDatabase, FileId, FunctionSignature};
12 12
13#[derive(Debug, PartialEq, Eq)] 13#[derive(Debug, PartialEq, Eq)]
14pub enum InlayKind { 14pub enum InlayKind {
15 TypeHint, 15 TypeHint,
16 ParameterHint,
16} 17}
17 18
18#[derive(Debug)] 19#[derive(Debug)]
@@ -28,22 +29,24 @@ pub(crate) fn inlay_hints(
28 file: &SourceFile, 29 file: &SourceFile,
29 max_inlay_hint_length: Option<usize>, 30 max_inlay_hint_length: Option<usize>,
30) -> Vec<InlayHint> { 31) -> Vec<InlayHint> {
31 file.syntax() 32 let mut sb = SourceBinder::new(db);
32 .descendants() 33 let mut res = Vec::new();
33 .flat_map(|node| get_inlay_hints(db, file_id, &node, max_inlay_hint_length)) 34 for node in file.syntax().descendants() {
34 .flatten() 35 get_inlay_hints(&mut res, &mut sb, file_id, &node, max_inlay_hint_length);
35 .collect() 36 }
37 res
36} 38}
37 39
38fn get_inlay_hints( 40fn get_inlay_hints(
39 db: &RootDatabase, 41 acc: &mut Vec<InlayHint>,
42 sb: &mut SourceBinder<RootDatabase>,
40 file_id: FileId, 43 file_id: FileId,
41 node: &SyntaxNode, 44 node: &SyntaxNode,
42 max_inlay_hint_length: Option<usize>, 45 max_inlay_hint_length: Option<usize>,
43) -> Option<Vec<InlayHint>> { 46) -> Option<()> {
44 let _p = profile("get_inlay_hints"); 47 let _p = profile("get_inlay_hints");
45 let analyzer = 48 let db = sb.db;
46 Lazy::new(|| SourceAnalyzer::new(db, hir::InFile::new(file_id.into(), node), None)); 49 let analyzer = Lazy::new(move || sb.analyze(hir::InFile::new(file_id.into(), node), None));
47 match_ast! { 50 match_ast! {
48 match node { 51 match node {
49 ast::LetStmt(it) => { 52 ast::LetStmt(it) => {
@@ -51,7 +54,7 @@ fn get_inlay_hints(
51 return None; 54 return None;
52 } 55 }
53 let pat = it.pat()?; 56 let pat = it.pat()?;
54 Some(get_pat_type_hints(db, &analyzer, pat, false, max_inlay_hint_length)) 57 get_pat_type_hints(acc, db, &analyzer, pat, false, max_inlay_hint_length);
55 }, 58 },
56 ast::LambdaExpr(it) => { 59 ast::LambdaExpr(it) => {
57 it.param_list().map(|param_list| { 60 it.param_list().map(|param_list| {
@@ -59,49 +62,115 @@ fn get_inlay_hints(
59 .params() 62 .params()
60 .filter(|closure_param| closure_param.ascribed_type().is_none()) 63 .filter(|closure_param| closure_param.ascribed_type().is_none())
61 .filter_map(|closure_param| closure_param.pat()) 64 .filter_map(|closure_param| closure_param.pat())
62 .map(|root_pat| get_pat_type_hints(db, &analyzer, root_pat, false, max_inlay_hint_length)) 65 .for_each(|root_pat| get_pat_type_hints(acc, db, &analyzer, root_pat, false, max_inlay_hint_length))
63 .flatten() 66 });
64 .collect()
65 })
66 }, 67 },
67 ast::ForExpr(it) => { 68 ast::ForExpr(it) => {
68 let pat = it.pat()?; 69 let pat = it.pat()?;
69 Some(get_pat_type_hints(db, &analyzer, pat, false, max_inlay_hint_length)) 70 get_pat_type_hints(acc, db, &analyzer, pat, false, max_inlay_hint_length);
70 }, 71 },
71 ast::IfExpr(it) => { 72 ast::IfExpr(it) => {
72 let pat = it.condition()?.pat()?; 73 let pat = it.condition()?.pat()?;
73 Some(get_pat_type_hints(db, &analyzer, pat, true, max_inlay_hint_length)) 74 get_pat_type_hints(acc, db, &analyzer, pat, true, max_inlay_hint_length);
74 }, 75 },
75 ast::WhileExpr(it) => { 76 ast::WhileExpr(it) => {
76 let pat = it.condition()?.pat()?; 77 let pat = it.condition()?.pat()?;
77 Some(get_pat_type_hints(db, &analyzer, pat, true, max_inlay_hint_length)) 78 get_pat_type_hints(acc, db, &analyzer, pat, true, max_inlay_hint_length);
78 }, 79 },
79 ast::MatchArmList(it) => { 80 ast::MatchArmList(it) => {
80 Some( 81 it.arms()
81 it 82 .map(|match_arm| match_arm.pats())
82 .arms() 83 .flatten()
83 .map(|match_arm| match_arm.pats()) 84 .for_each(|root_pat| get_pat_type_hints(acc, db, &analyzer, root_pat, true, max_inlay_hint_length));
84 .flatten() 85 },
85 .map(|root_pat| get_pat_type_hints(db, &analyzer, root_pat, true, max_inlay_hint_length)) 86 ast::CallExpr(it) => {
86 .flatten() 87 get_param_name_hints(acc, db, &analyzer, ast::Expr::from(it));
87 .collect(), 88 },
88 ) 89 ast::MethodCallExpr(it) => {
89 }, 90 get_param_name_hints(acc, db, &analyzer, ast::Expr::from(it));
90 _ => None, 91 },
92 _ => (),
91 } 93 }
94 };
95 Some(())
96}
97
98fn get_param_name_hints(
99 acc: &mut Vec<InlayHint>,
100 db: &RootDatabase,
101 analyzer: &SourceAnalyzer,
102 expr: ast::Expr,
103) -> Option<()> {
104 let args = match &expr {
105 ast::Expr::CallExpr(expr) => expr.arg_list()?.args(),
106 ast::Expr::MethodCallExpr(expr) => expr.arg_list()?.args(),
107 _ => return None,
108 };
109
110 let mut parameters = get_fn_signature(db, analyzer, &expr)?.parameter_names.into_iter();
111
112 if let ast::Expr::MethodCallExpr(_) = &expr {
113 parameters.next();
114 };
115
116 let hints = parameters
117 .zip(args)
118 .filter_map(|(param, arg)| {
119 if arg.syntax().kind() == SyntaxKind::LITERAL {
120 Some((arg.syntax().text_range(), param))
121 } else {
122 None
123 }
124 })
125 .map(|(range, param_name)| InlayHint {
126 range,
127 kind: InlayKind::ParameterHint,
128 label: param_name.into(),
129 });
130
131 acc.extend(hints);
132 Some(())
133}
134
135fn get_fn_signature(
136 db: &RootDatabase,
137 analyzer: &SourceAnalyzer,
138 expr: &ast::Expr,
139) -> Option<FunctionSignature> {
140 match expr {
141 ast::Expr::CallExpr(expr) => {
142 // FIXME: Type::as_callable is broken for closures
143 let callable_def = analyzer.type_of(db, &expr.expr()?)?.as_callable()?;
144 match callable_def {
145 hir::CallableDef::FunctionId(it) => {
146 let fn_def = it.into();
147 Some(FunctionSignature::from_hir(db, fn_def))
148 }
149 hir::CallableDef::StructId(it) => FunctionSignature::from_struct(db, it.into()),
150 hir::CallableDef::EnumVariantId(it) => {
151 FunctionSignature::from_enum_variant(db, it.into())
152 }
153 }
154 }
155 ast::Expr::MethodCallExpr(expr) => {
156 let fn_def = analyzer.resolve_method_call(&expr)?;
157 Some(FunctionSignature::from_hir(db, fn_def))
158 }
159 _ => None,
92 } 160 }
93} 161}
94 162
95fn get_pat_type_hints( 163fn get_pat_type_hints(
164 acc: &mut Vec<InlayHint>,
96 db: &RootDatabase, 165 db: &RootDatabase,
97 analyzer: &SourceAnalyzer, 166 analyzer: &SourceAnalyzer,
98 root_pat: ast::Pat, 167 root_pat: ast::Pat,
99 skip_root_pat_hint: bool, 168 skip_root_pat_hint: bool,
100 max_inlay_hint_length: Option<usize>, 169 max_inlay_hint_length: Option<usize>,
101) -> Vec<InlayHint> { 170) {
102 let original_pat = &root_pat.clone(); 171 let original_pat = &root_pat.clone();
103 172
104 get_leaf_pats(root_pat) 173 let hints = get_leaf_pats(root_pat)
105 .into_iter() 174 .into_iter()
106 .filter(|pat| !skip_root_pat_hint || pat != original_pat) 175 .filter(|pat| !skip_root_pat_hint || pat != original_pat)
107 .filter_map(|pat| { 176 .filter_map(|pat| {
@@ -115,8 +184,9 @@ fn get_pat_type_hints(
115 range, 184 range,
116 kind: InlayKind::TypeHint, 185 kind: InlayKind::TypeHint,
117 label: pat_type.display_truncated(db, max_inlay_hint_length).to_string().into(), 186 label: pat_type.display_truncated(db, max_inlay_hint_length).to_string().into(),
118 }) 187 });
119 .collect() 188
189 acc.extend(hints);
120} 190}
121 191
122fn get_leaf_pats(root_pat: ast::Pat) -> Vec<ast::Pat> { 192fn get_leaf_pats(root_pat: ast::Pat) -> Vec<ast::Pat> {
@@ -605,4 +675,71 @@ fn main() {
605 "### 675 "###
606 ); 676 );
607 } 677 }
678
679 #[test]
680 fn function_call_parameter_hint() {
681 let (analysis, file_id) = single_file(
682 r#"
683struct Test {}
684
685impl Test {
686 fn method(&self, param: i32) -> i32 {
687 param * 2
688 }
689}
690
691fn test_func(foo: i32, bar: i32, msg: &str, _: i32, last: i32) -> i32 {
692 foo + bar
693}
694
695fn main() {
696 let not_literal = 1;
697 let _: i32 = test_func(1, 2, "hello", 3, not_literal);
698 let t: Test = Test {};
699 t.method(123);
700 Test::method(&t, 3456);
701}"#,
702 );
703
704 assert_debug_snapshot!(analysis.inlay_hints(file_id, None).unwrap(), @r###"
705 [
706 InlayHint {
707 range: [207; 218),
708 kind: TypeHint,
709 label: "i32",
710 },
711 InlayHint {
712 range: [251; 252),
713 kind: ParameterHint,
714 label: "foo",
715 },
716 InlayHint {
717 range: [254; 255),
718 kind: ParameterHint,
719 label: "bar",
720 },
721 InlayHint {
722 range: [257; 264),
723 kind: ParameterHint,
724 label: "msg",
725 },
726 InlayHint {
727 range: [266; 267),
728 kind: ParameterHint,
729 label: "_",
730 },
731 InlayHint {
732 range: [323; 326),
733 kind: ParameterHint,
734 label: "param",
735 },
736 InlayHint {
737 range: [350; 354),
738 kind: ParameterHint,
739 label: "param",
740 },
741 ]
742 "###
743 );
744 }
608} 745}
diff --git a/crates/ra_ide/src/references.rs b/crates/ra_ide/src/references.rs
index 2c753dade..5e2fe1905 100644
--- a/crates/ra_ide/src/references.rs
+++ b/crates/ra_ide/src/references.rs
@@ -14,7 +14,7 @@ mod name_definition;
14mod rename; 14mod rename;
15mod search_scope; 15mod search_scope;
16 16
17use hir::InFile; 17use hir::{InFile, SourceBinder};
18use once_cell::unsync::Lazy; 18use once_cell::unsync::Lazy;
19use ra_db::{SourceDatabase, SourceDatabaseExt}; 19use ra_db::{SourceDatabase, SourceDatabaseExt};
20use ra_prof::profile; 20use ra_prof::profile;
@@ -171,13 +171,14 @@ fn find_name(
171 syntax: &SyntaxNode, 171 syntax: &SyntaxNode,
172 position: FilePosition, 172 position: FilePosition,
173) -> Option<RangeInfo<(String, NameDefinition)>> { 173) -> Option<RangeInfo<(String, NameDefinition)>> {
174 let mut sb = SourceBinder::new(db);
174 if let Some(name) = find_node_at_offset::<ast::Name>(&syntax, position.offset) { 175 if let Some(name) = find_node_at_offset::<ast::Name>(&syntax, position.offset) {
175 let def = classify_name(db, InFile::new(position.file_id.into(), &name))?; 176 let def = classify_name(&mut sb, InFile::new(position.file_id.into(), &name))?;
176 let range = name.syntax().text_range(); 177 let range = name.syntax().text_range();
177 return Some(RangeInfo::new(range, (name.text().to_string(), def))); 178 return Some(RangeInfo::new(range, (name.text().to_string(), def)));
178 } 179 }
179 let name_ref = find_node_at_offset::<ast::NameRef>(&syntax, position.offset)?; 180 let name_ref = find_node_at_offset::<ast::NameRef>(&syntax, position.offset)?;
180 let def = classify_name_ref(db, InFile::new(position.file_id.into(), &name_ref))?; 181 let def = classify_name_ref(&mut sb, InFile::new(position.file_id.into(), &name_ref))?;
181 let range = name_ref.syntax().text_range(); 182 let range = name_ref.syntax().text_range();
182 Some(RangeInfo::new(range, (name_ref.text().to_string(), def))) 183 Some(RangeInfo::new(range, (name_ref.text().to_string(), def)))
183} 184}
@@ -195,7 +196,9 @@ fn process_definition(
195 196
196 for (file_id, search_range) in scope { 197 for (file_id, search_range) in scope {
197 let text = db.file_text(file_id); 198 let text = db.file_text(file_id);
199
198 let parse = Lazy::new(|| SourceFile::parse(&text)); 200 let parse = Lazy::new(|| SourceFile::parse(&text));
201 let mut sb = Lazy::new(|| SourceBinder::new(db));
199 202
200 for (idx, _) in text.match_indices(pat) { 203 for (idx, _) in text.match_indices(pat) {
201 let offset = TextUnit::from_usize(idx); 204 let offset = TextUnit::from_usize(idx);
@@ -209,7 +212,11 @@ fn process_definition(
209 continue; 212 continue;
210 } 213 }
211 } 214 }
212 if let Some(d) = classify_name_ref(db, InFile::new(file_id.into(), &name_ref)) { 215 // FIXME: reuse sb
216 // See https://github.com/rust-lang/rust/pull/68198#issuecomment-574269098
217
218 if let Some(d) = classify_name_ref(&mut sb, InFile::new(file_id.into(), &name_ref))
219 {
213 if d == def { 220 if d == def {
214 let kind = if name_ref 221 let kind = if name_ref
215 .syntax() 222 .syntax()
@@ -309,7 +316,7 @@ mod tests {
309 } 316 }
310 impl Foo { 317 impl Foo {
311 fn f() -> i32 { 42 } 318 fn f() -> i32 { 42 }
312 } 319 }
313 fn main() { 320 fn main() {
314 let f: Foo; 321 let f: Foo;
315 f = Foo {a: Foo::f()}; 322 f = Foo {a: Foo::f()};
@@ -319,7 +326,7 @@ mod tests {
319 check_result( 326 check_result(
320 refs, 327 refs,
321 "Foo STRUCT_DEF FileId(1) [5; 39) [12; 15) Other", 328 "Foo STRUCT_DEF FileId(1) [5; 39) [12; 15) Other",
322 &["FileId(1) [142; 145) StructLiteral"], 329 &["FileId(1) [138; 141) StructLiteral"],
323 ); 330 );
324 } 331 }
325 332
diff --git a/crates/ra_ide/src/references/classify.rs b/crates/ra_ide/src/references/classify.rs
index 3483a7176..4a6e11e27 100644
--- a/crates/ra_ide/src/references/classify.rs
+++ b/crates/ra_ide/src/references/classify.rs
@@ -1,6 +1,6 @@
1//! Functions that are used to classify an element from its definition or reference. 1//! Functions that are used to classify an element from its definition or reference.
2 2
3use hir::{FromSource, InFile, Module, ModuleSource, PathResolution, SourceAnalyzer}; 3use hir::{FromSource, InFile, Module, ModuleSource, PathResolution, SourceBinder};
4use ra_prof::profile; 4use ra_prof::profile;
5use ra_syntax::{ast, match_ast, AstNode}; 5use ra_syntax::{ast, match_ast, AstNode};
6use test_utils::tested_by; 6use test_utils::tested_by;
@@ -11,7 +11,10 @@ use super::{
11}; 11};
12use crate::db::RootDatabase; 12use crate::db::RootDatabase;
13 13
14pub(crate) fn classify_name(db: &RootDatabase, name: InFile<&ast::Name>) -> Option<NameDefinition> { 14pub(crate) fn classify_name(
15 sb: &mut SourceBinder<RootDatabase>,
16 name: InFile<&ast::Name>,
17) -> Option<NameDefinition> {
15 let _p = profile("classify_name"); 18 let _p = profile("classify_name");
16 let parent = name.value.syntax().parent()?; 19 let parent = name.value.syntax().parent()?;
17 20
@@ -19,90 +22,89 @@ pub(crate) fn classify_name(db: &RootDatabase, name: InFile<&ast::Name>) -> Opti
19 match parent { 22 match parent {
20 ast::BindPat(it) => { 23 ast::BindPat(it) => {
21 let src = name.with_value(it); 24 let src = name.with_value(it);
22 let local = hir::Local::from_source(db, src)?; 25 let local = hir::Local::from_source(sb.db, src)?;
23 Some(NameDefinition { 26 Some(NameDefinition {
24 visibility: None, 27 visibility: None,
25 container: local.module(db), 28 container: local.module(sb.db),
26 kind: NameKind::Local(local), 29 kind: NameKind::Local(local),
27 }) 30 })
28 }, 31 },
29 ast::RecordFieldDef(it) => { 32 ast::RecordFieldDef(it) => {
30 let ast = hir::FieldSource::Named(it); 33 let src = name.with_value(it);
31 let src = name.with_value(ast); 34 let field: hir::StructField = sb.to_def(src)?;
32 let field = hir::StructField::from_source(db, src)?; 35 Some(from_struct_field(sb.db, field))
33 Some(from_struct_field(db, field))
34 }, 36 },
35 ast::Module(it) => { 37 ast::Module(it) => {
36 let def = { 38 let def = {
37 if !it.has_semi() { 39 if !it.has_semi() {
38 let ast = hir::ModuleSource::Module(it); 40 let ast = hir::ModuleSource::Module(it);
39 let src = name.with_value(ast); 41 let src = name.with_value(ast);
40 hir::Module::from_definition(db, src) 42 hir::Module::from_definition(sb.db, src)
41 } else { 43 } else {
42 let src = name.with_value(it); 44 let src = name.with_value(it);
43 hir::Module::from_declaration(db, src) 45 hir::Module::from_declaration(sb.db, src)
44 } 46 }
45 }?; 47 }?;
46 Some(from_module_def(db, def.into(), None)) 48 Some(from_module_def(sb.db, def.into(), None))
47 }, 49 },
48 ast::StructDef(it) => { 50 ast::StructDef(it) => {
49 let src = name.with_value(it); 51 let src = name.with_value(it);
50 let def = hir::Struct::from_source(db, src)?; 52 let def: hir::Struct = sb.to_def(src)?;
51 Some(from_module_def(db, def.into(), None)) 53 Some(from_module_def(sb.db, def.into(), None))
52 }, 54 },
53 ast::EnumDef(it) => { 55 ast::EnumDef(it) => {
54 let src = name.with_value(it); 56 let src = name.with_value(it);
55 let def = hir::Enum::from_source(db, src)?; 57 let def: hir::Enum = sb.to_def(src)?;
56 Some(from_module_def(db, def.into(), None)) 58 Some(from_module_def(sb.db, def.into(), None))
57 }, 59 },
58 ast::TraitDef(it) => { 60 ast::TraitDef(it) => {
59 let src = name.with_value(it); 61 let src = name.with_value(it);
60 let def = hir::Trait::from_source(db, src)?; 62 let def: hir::Trait = sb.to_def(src)?;
61 Some(from_module_def(db, def.into(), None)) 63 Some(from_module_def(sb.db, def.into(), None))
62 }, 64 },
63 ast::StaticDef(it) => { 65 ast::StaticDef(it) => {
64 let src = name.with_value(it); 66 let src = name.with_value(it);
65 let def = hir::Static::from_source(db, src)?; 67 let def: hir::Static = sb.to_def(src)?;
66 Some(from_module_def(db, def.into(), None)) 68 Some(from_module_def(sb.db, def.into(), None))
67 }, 69 },
68 ast::EnumVariant(it) => { 70 ast::EnumVariant(it) => {
69 let src = name.with_value(it); 71 let src = name.with_value(it);
70 let def = hir::EnumVariant::from_source(db, src)?; 72 let def: hir::EnumVariant = sb.to_def(src)?;
71 Some(from_module_def(db, def.into(), None)) 73 Some(from_module_def(sb.db, def.into(), None))
72 }, 74 },
73 ast::FnDef(it) => { 75 ast::FnDef(it) => {
74 let src = name.with_value(it); 76 let src = name.with_value(it);
75 let def = hir::Function::from_source(db, src)?; 77 let def: hir::Function = sb.to_def(src)?;
76 if parent.parent().and_then(ast::ItemList::cast).is_some() { 78 if parent.parent().and_then(ast::ItemList::cast).is_some() {
77 Some(from_assoc_item(db, def.into())) 79 Some(from_assoc_item(sb.db, def.into()))
78 } else { 80 } else {
79 Some(from_module_def(db, def.into(), None)) 81 Some(from_module_def(sb.db, def.into(), None))
80 } 82 }
81 }, 83 },
82 ast::ConstDef(it) => { 84 ast::ConstDef(it) => {
83 let src = name.with_value(it); 85 let src = name.with_value(it);
84 let def = hir::Const::from_source(db, src)?; 86 let def: hir::Const = sb.to_def(src)?;
85 if parent.parent().and_then(ast::ItemList::cast).is_some() { 87 if parent.parent().and_then(ast::ItemList::cast).is_some() {
86 Some(from_assoc_item(db, def.into())) 88 Some(from_assoc_item(sb.db, def.into()))
87 } else { 89 } else {
88 Some(from_module_def(db, def.into(), None)) 90 Some(from_module_def(sb.db, def.into(), None))
89 } 91 }
90 }, 92 },
91 ast::TypeAliasDef(it) => { 93 ast::TypeAliasDef(it) => {
92 let src = name.with_value(it); 94 let src = name.with_value(it);
93 let def = hir::TypeAlias::from_source(db, src)?; 95 let def: hir::TypeAlias = sb.to_def(src)?;
94 if parent.parent().and_then(ast::ItemList::cast).is_some() { 96 if parent.parent().and_then(ast::ItemList::cast).is_some() {
95 Some(from_assoc_item(db, def.into())) 97 Some(from_assoc_item(sb.db, def.into()))
96 } else { 98 } else {
97 Some(from_module_def(db, def.into(), None)) 99 Some(from_module_def(sb.db, def.into(), None))
98 } 100 }
99 }, 101 },
100 ast::MacroCall(it) => { 102 ast::MacroCall(it) => {
101 let src = name.with_value(it); 103 let src = name.with_value(it);
102 let def = hir::MacroDef::from_source(db, src.clone())?; 104 let def = hir::MacroDef::from_source(sb.db, src.clone())?;
103 105
104 let module_src = ModuleSource::from_child_node(db, src.as_ref().map(|it| it.syntax())); 106 let module_src = ModuleSource::from_child_node(sb.db, src.as_ref().map(|it| it.syntax()));
105 let module = Module::from_definition(db, src.with_value(module_src))?; 107 let module = Module::from_definition(sb.db, src.with_value(module_src))?;
106 108
107 Some(NameDefinition { 109 Some(NameDefinition {
108 visibility: None, 110 visibility: None,
@@ -112,10 +114,10 @@ pub(crate) fn classify_name(db: &RootDatabase, name: InFile<&ast::Name>) -> Opti
112 }, 114 },
113 ast::TypeParam(it) => { 115 ast::TypeParam(it) => {
114 let src = name.with_value(it); 116 let src = name.with_value(it);
115 let def = hir::TypeParam::from_source(db, src)?; 117 let def = hir::TypeParam::from_source(sb.db, src)?;
116 Some(NameDefinition { 118 Some(NameDefinition {
117 visibility: None, 119 visibility: None,
118 container: def.module(db), 120 container: def.module(sb.db),
119 kind: NameKind::TypeParam(def), 121 kind: NameKind::TypeParam(def),
120 }) 122 })
121 }, 123 },
@@ -125,25 +127,25 @@ pub(crate) fn classify_name(db: &RootDatabase, name: InFile<&ast::Name>) -> Opti
125} 127}
126 128
127pub(crate) fn classify_name_ref( 129pub(crate) fn classify_name_ref(
128 db: &RootDatabase, 130 sb: &mut SourceBinder<RootDatabase>,
129 name_ref: InFile<&ast::NameRef>, 131 name_ref: InFile<&ast::NameRef>,
130) -> Option<NameDefinition> { 132) -> Option<NameDefinition> {
131 let _p = profile("classify_name_ref"); 133 let _p = profile("classify_name_ref");
132 134
133 let parent = name_ref.value.syntax().parent()?; 135 let parent = name_ref.value.syntax().parent()?;
134 let analyzer = SourceAnalyzer::new(db, name_ref.map(|it| it.syntax()), None); 136 let analyzer = sb.analyze(name_ref.map(|it| it.syntax()), None);
135 137
136 if let Some(method_call) = ast::MethodCallExpr::cast(parent.clone()) { 138 if let Some(method_call) = ast::MethodCallExpr::cast(parent.clone()) {
137 tested_by!(goto_def_for_methods); 139 tested_by!(goto_def_for_methods);
138 if let Some(func) = analyzer.resolve_method_call(&method_call) { 140 if let Some(func) = analyzer.resolve_method_call(&method_call) {
139 return Some(from_assoc_item(db, func.into())); 141 return Some(from_assoc_item(sb.db, func.into()));
140 } 142 }
141 } 143 }
142 144
143 if let Some(field_expr) = ast::FieldExpr::cast(parent.clone()) { 145 if let Some(field_expr) = ast::FieldExpr::cast(parent.clone()) {
144 tested_by!(goto_def_for_fields); 146 tested_by!(goto_def_for_fields);
145 if let Some(field) = analyzer.resolve_field(&field_expr) { 147 if let Some(field) = analyzer.resolve_field(&field_expr) {
146 return Some(from_struct_field(db, field)); 148 return Some(from_struct_field(sb.db, field));
147 } 149 }
148 } 150 }
149 151
@@ -151,30 +153,32 @@ pub(crate) fn classify_name_ref(
151 tested_by!(goto_def_for_record_fields); 153 tested_by!(goto_def_for_record_fields);
152 tested_by!(goto_def_for_field_init_shorthand); 154 tested_by!(goto_def_for_field_init_shorthand);
153 if let Some(field_def) = analyzer.resolve_record_field(&record_field) { 155 if let Some(field_def) = analyzer.resolve_record_field(&record_field) {
154 return Some(from_struct_field(db, field_def)); 156 return Some(from_struct_field(sb.db, field_def));
155 } 157 }
156 } 158 }
157 159
158 let ast = ModuleSource::from_child_node(db, name_ref.with_value(&parent)); 160 let ast = ModuleSource::from_child_node(sb.db, name_ref.with_value(&parent));
159 // FIXME: find correct container and visibility for each case 161 // FIXME: find correct container and visibility for each case
160 let container = Module::from_definition(db, name_ref.with_value(ast))?; 162 let container = Module::from_definition(sb.db, name_ref.with_value(ast))?;
161 let visibility = None; 163 let visibility = None;
162 164
163 if let Some(macro_call) = parent.ancestors().find_map(ast::MacroCall::cast) { 165 if let Some(macro_call) = parent.ancestors().find_map(ast::MacroCall::cast) {
164 tested_by!(goto_def_for_macros); 166 tested_by!(goto_def_for_macros);
165 if let Some(macro_def) = analyzer.resolve_macro_call(db, name_ref.with_value(&macro_call)) { 167 if let Some(macro_def) =
168 analyzer.resolve_macro_call(sb.db, name_ref.with_value(&macro_call))
169 {
166 let kind = NameKind::Macro(macro_def); 170 let kind = NameKind::Macro(macro_def);
167 return Some(NameDefinition { kind, container, visibility }); 171 return Some(NameDefinition { kind, container, visibility });
168 } 172 }
169 } 173 }
170 174
171 let path = name_ref.value.syntax().ancestors().find_map(ast::Path::cast)?; 175 let path = name_ref.value.syntax().ancestors().find_map(ast::Path::cast)?;
172 let resolved = analyzer.resolve_path(db, &path)?; 176 let resolved = analyzer.resolve_path(sb.db, &path)?;
173 match resolved { 177 match resolved {
174 PathResolution::Def(def) => Some(from_module_def(db, def, Some(container))), 178 PathResolution::Def(def) => Some(from_module_def(sb.db, def, Some(container))),
175 PathResolution::AssocItem(item) => Some(from_assoc_item(db, item)), 179 PathResolution::AssocItem(item) => Some(from_assoc_item(sb.db, item)),
176 PathResolution::Local(local) => { 180 PathResolution::Local(local) => {
177 let container = local.module(db); 181 let container = local.module(sb.db);
178 let kind = NameKind::Local(local); 182 let kind = NameKind::Local(local);
179 Some(NameDefinition { kind, container, visibility: None }) 183 Some(NameDefinition { kind, container, visibility: None })
180 } 184 }
@@ -188,7 +192,7 @@ pub(crate) fn classify_name_ref(
188 } 192 }
189 PathResolution::SelfType(impl_block) => { 193 PathResolution::SelfType(impl_block) => {
190 let kind = NameKind::SelfType(impl_block); 194 let kind = NameKind::SelfType(impl_block);
191 let container = impl_block.module(db); 195 let container = impl_block.module(sb.db);
192 Some(NameDefinition { kind, container, visibility }) 196 Some(NameDefinition { kind, container, visibility })
193 } 197 }
194 } 198 }
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs
index 56a36f587..0411977b9 100644
--- a/crates/ra_ide/src/syntax_highlighting.rs
+++ b/crates/ra_ide/src/syntax_highlighting.rs
@@ -2,7 +2,7 @@
2 2
3use rustc_hash::{FxHashMap, FxHashSet}; 3use rustc_hash::{FxHashMap, FxHashSet};
4 4
5use hir::{InFile, Name}; 5use hir::{InFile, Name, SourceBinder};
6use ra_db::SourceDatabase; 6use ra_db::SourceDatabase;
7use ra_prof::profile; 7use ra_prof::profile;
8use ra_syntax::{ast, AstNode, Direction, SyntaxElement, SyntaxKind, SyntaxKind::*, TextRange, T}; 8use ra_syntax::{ast, AstNode, Direction, SyntaxElement, SyntaxKind, SyntaxKind::*, TextRange, T};
@@ -84,6 +84,8 @@ pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRa
84 hash((file_id, name, shadow_count)) 84 hash((file_id, name, shadow_count))
85 } 85 }
86 86
87 let mut sb = SourceBinder::new(db);
88
87 // Visited nodes to handle highlighting priorities 89 // Visited nodes to handle highlighting priorities
88 // FIXME: retain only ranges here 90 // FIXME: retain only ranges here
89 let mut highlighted: FxHashSet<SyntaxElement> = FxHashSet::default(); 91 let mut highlighted: FxHashSet<SyntaxElement> = FxHashSet::default();
@@ -108,8 +110,8 @@ pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRa
108 NAME_REF if node.ancestors().any(|it| it.kind() == ATTR) => continue, 110 NAME_REF if node.ancestors().any(|it| it.kind() == ATTR) => continue,
109 NAME_REF => { 111 NAME_REF => {
110 let name_ref = node.as_node().cloned().and_then(ast::NameRef::cast).unwrap(); 112 let name_ref = node.as_node().cloned().and_then(ast::NameRef::cast).unwrap();
111 let name_kind = 113 let name_kind = classify_name_ref(&mut sb, InFile::new(file_id.into(), &name_ref))
112 classify_name_ref(db, InFile::new(file_id.into(), &name_ref)).map(|d| d.kind); 114 .map(|d| d.kind);
113 match name_kind { 115 match name_kind {
114 Some(name_kind) => { 116 Some(name_kind) => {
115 if let Local(local) = &name_kind { 117 if let Local(local) = &name_kind {
@@ -129,7 +131,7 @@ pub(crate) fn highlight(db: &RootDatabase, file_id: FileId) -> Vec<HighlightedRa
129 NAME => { 131 NAME => {
130 let name = node.as_node().cloned().and_then(ast::Name::cast).unwrap(); 132 let name = node.as_node().cloned().and_then(ast::Name::cast).unwrap();
131 let name_kind = 133 let name_kind =
132 classify_name(db, InFile::new(file_id.into(), &name)).map(|d| d.kind); 134 classify_name(&mut sb, InFile::new(file_id.into(), &name)).map(|d| d.kind);
133 135
134 if let Some(Local(local)) = &name_kind { 136 if let Some(Local(local)) = &name_kind {
135 if let Some(name) = local.name(db) { 137 if let Some(name) = local.name(db) {
@@ -308,9 +310,12 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
308 310
309#[cfg(test)] 311#[cfg(test)]
310mod tests { 312mod tests {
311 use crate::mock_analysis::single_file; 313 use std::fs;
314
312 use test_utils::{assert_eq_text, project_dir, read_text}; 315 use test_utils::{assert_eq_text, project_dir, read_text};
313 316
317 use crate::mock_analysis::{single_file, MockAnalysis};
318
314 #[test] 319 #[test]
315 fn test_highlighting() { 320 fn test_highlighting() {
316 let (analysis, file_id) = single_file( 321 let (analysis, file_id) = single_file(
@@ -357,7 +362,7 @@ impl<X> E<X> {
357 let dst_file = project_dir().join("crates/ra_ide/src/snapshots/highlighting.html"); 362 let dst_file = project_dir().join("crates/ra_ide/src/snapshots/highlighting.html");
358 let actual_html = &analysis.highlight_as_html(file_id, false).unwrap(); 363 let actual_html = &analysis.highlight_as_html(file_id, false).unwrap();
359 let expected_html = &read_text(&dst_file); 364 let expected_html = &read_text(&dst_file);
360 std::fs::write(dst_file, &actual_html).unwrap(); 365 fs::write(dst_file, &actual_html).unwrap();
361 assert_eq_text!(expected_html, actual_html); 366 assert_eq_text!(expected_html, actual_html);
362 } 367 }
363 368
@@ -383,7 +388,21 @@ fn bar() {
383 let dst_file = project_dir().join("crates/ra_ide/src/snapshots/rainbow_highlighting.html"); 388 let dst_file = project_dir().join("crates/ra_ide/src/snapshots/rainbow_highlighting.html");
384 let actual_html = &analysis.highlight_as_html(file_id, true).unwrap(); 389 let actual_html = &analysis.highlight_as_html(file_id, true).unwrap();
385 let expected_html = &read_text(&dst_file); 390 let expected_html = &read_text(&dst_file);
386 std::fs::write(dst_file, &actual_html).unwrap(); 391 fs::write(dst_file, &actual_html).unwrap();
387 assert_eq_text!(expected_html, actual_html); 392 assert_eq_text!(expected_html, actual_html);
388 } 393 }
394
395 #[test]
396 fn accidentally_quadratic() {
397 let file = project_dir().join("crates/ra_syntax/test_data/accidentally_quadratic");
398 let src = fs::read_to_string(file).unwrap();
399
400 let mut mock = MockAnalysis::new();
401 let file_id = mock.add_file("/main.rs", &src);
402 let host = mock.analysis_host();
403
404 // let t = std::time::Instant::now();
405 let _ = host.analysis().highlight(file_id).unwrap();
406 // eprintln!("elapsed: {:?}", t.elapsed());
407 }
389} 408}
diff --git a/crates/ra_lsp_server/Cargo.toml b/crates/ra_lsp_server/Cargo.toml
index cdde5122e..579158780 100644
--- a/crates/ra_lsp_server/Cargo.toml
+++ b/crates/ra_lsp_server/Cargo.toml
@@ -14,7 +14,7 @@ serde_json = "1.0.34"
14serde = { version = "1.0.83", features = ["derive"] } 14serde = { version = "1.0.83", features = ["derive"] }
15crossbeam-channel = "0.4" 15crossbeam-channel = "0.4"
16log = "0.4.3" 16log = "0.4.3"
17lsp-types = { version = "0.68.0", features = ["proposed"] } 17lsp-types = { version = "0.69.0", features = ["proposed"] }
18rustc-hash = "1.0" 18rustc-hash = "1.0"
19parking_lot = "0.10.0" 19parking_lot = "0.10.0"
20jod-thread = "0.1.0" 20jod-thread = "0.1.0"
@@ -28,6 +28,7 @@ ra_prof = { path = "../ra_prof" }
28ra_vfs_glob = { path = "../ra_vfs_glob" } 28ra_vfs_glob = { path = "../ra_vfs_glob" }
29env_logger = { version = "0.7.1", default-features = false, features = ["humantime"] } 29env_logger = { version = "0.7.1", default-features = false, features = ["humantime"] }
30ra_cargo_watch = { path = "../ra_cargo_watch" } 30ra_cargo_watch = { path = "../ra_cargo_watch" }
31either = "1.5"
31 32
32[dev-dependencies] 33[dev-dependencies]
33tempfile = "3" 34tempfile = "3"
diff --git a/crates/ra_lsp_server/src/cargo_target_spec.rs b/crates/ra_lsp_server/src/cargo_target_spec.rs
index c4a9e7101..594caffe2 100644
--- a/crates/ra_lsp_server/src/cargo_target_spec.rs
+++ b/crates/ra_lsp_server/src/cargo_target_spec.rs
@@ -63,7 +63,7 @@ impl CargoTargetSpec {
63 None => return Ok(None), 63 None => return Ok(None),
64 }; 64 };
65 let file_id = world.analysis().crate_root(crate_id)?; 65 let file_id = world.analysis().crate_root(crate_id)?;
66 let path = world.vfs.read().file2path(ra_vfs::VfsFile(file_id.0)); 66 let path = world.file_id_to_path(file_id);
67 let res = world.workspaces.iter().find_map(|ws| match ws { 67 let res = world.workspaces.iter().find_map(|ws| match ws {
68 ProjectWorkspace::Cargo { cargo, .. } => { 68 ProjectWorkspace::Cargo { cargo, .. } => {
69 let tgt = cargo.target_by_root(&path)?; 69 let tgt = cargo.target_by_root(&path)?;
diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs
index 84012b99d..7822be2e2 100644
--- a/crates/ra_lsp_server/src/main_loop.rs
+++ b/crates/ra_lsp_server/src/main_loop.rs
@@ -9,7 +9,7 @@ use std::{error::Error, fmt, panic, path::PathBuf, sync::Arc, time::Instant};
9 9
10use crossbeam_channel::{select, unbounded, RecvError, Sender}; 10use crossbeam_channel::{select, unbounded, RecvError, Sender};
11use lsp_server::{Connection, ErrorCode, Message, Notification, Request, RequestId, Response}; 11use lsp_server::{Connection, ErrorCode, Message, Notification, Request, RequestId, Response};
12use lsp_types::{ClientCapabilities, NumberOrString}; 12use lsp_types::{ClientCapabilities, NumberOrString, Url};
13use ra_cargo_watch::{CheckOptions, CheckTask}; 13use ra_cargo_watch::{CheckOptions, CheckTask};
14use ra_ide::{Canceled, FeatureFlags, FileId, LibraryData, SourceRootId}; 14use ra_ide::{Canceled, FeatureFlags, FileId, LibraryData, SourceRootId};
15use ra_prof::profile; 15use ra_prof::profile;
@@ -336,28 +336,7 @@ fn loop_turn(
336 world_state.maybe_collect_garbage(); 336 world_state.maybe_collect_garbage();
337 loop_state.in_flight_libraries -= 1; 337 loop_state.in_flight_libraries -= 1;
338 } 338 }
339 Event::CheckWatcher(task) => match task { 339 Event::CheckWatcher(task) => on_check_task(task, world_state, task_sender)?,
340 CheckTask::Update(uri) => {
341 // We manually send a diagnostic update when the watcher asks
342 // us to, to avoid the issue of having to change the file to
343 // receive updated diagnostics.
344 let path = uri.to_file_path().map_err(|()| format!("invalid uri: {}", uri))?;
345 if let Some(file_id) = world_state.vfs.read().path2file(&path) {
346 let params =
347 handlers::publish_diagnostics(&world_state.snapshot(), FileId(file_id.0))?;
348 let not = notification_new::<req::PublishDiagnostics>(params);
349 task_sender.send(Task::Notify(not)).unwrap();
350 }
351 }
352 CheckTask::Status(progress) => {
353 let params = req::ProgressParams {
354 token: req::ProgressToken::String("rustAnalyzer/cargoWatcher".to_string()),
355 value: req::ProgressParamsValue::WorkDone(progress),
356 };
357 let not = notification_new::<req::Progress>(params);
358 task_sender.send(Task::Notify(not)).unwrap();
359 }
360 },
361 Event::Msg(msg) => match msg { 340 Event::Msg(msg) => match msg {
362 Message::Request(req) => on_request( 341 Message::Request(req) => on_request(
363 world_state, 342 world_state,
@@ -605,6 +584,60 @@ fn on_notification(
605 Ok(()) 584 Ok(())
606} 585}
607 586
587fn on_check_task(
588 task: CheckTask,
589 world_state: &WorldState,
590 task_sender: &Sender<Task>,
591) -> Result<()> {
592 match task {
593 CheckTask::ClearDiagnostics => {
594 let cleared_files = world_state.check_watcher.state.write().clear();
595
596 // Send updated diagnostics for each cleared file
597 for url in cleared_files {
598 publish_diagnostics_for_url(&url, world_state, task_sender)?;
599 }
600 }
601
602 CheckTask::AddDiagnostic(url, diagnostic) => {
603 world_state
604 .check_watcher
605 .state
606 .write()
607 .add_diagnostic_with_fixes(url.clone(), diagnostic);
608
609 // We manually send a diagnostic update when the watcher asks
610 // us to, to avoid the issue of having to change the file to
611 // receive updated diagnostics.
612 publish_diagnostics_for_url(&url, world_state, task_sender)?;
613 }
614
615 CheckTask::Status(progress) => {
616 let params = req::ProgressParams {
617 token: req::ProgressToken::String("rustAnalyzer/cargoWatcher".to_string()),
618 value: req::ProgressParamsValue::WorkDone(progress),
619 };
620 let not = notification_new::<req::Progress>(params);
621 task_sender.send(Task::Notify(not)).unwrap();
622 }
623 }
624 Ok(())
625}
626
627fn publish_diagnostics_for_url(
628 url: &Url,
629 world_state: &WorldState,
630 task_sender: &Sender<Task>,
631) -> Result<()> {
632 let path = url.to_file_path().map_err(|()| format!("invalid uri: {}", url))?;
633 if let Some(file_id) = world_state.vfs.read().path2file(&path) {
634 let params = handlers::publish_diagnostics(&world_state.snapshot(), FileId(file_id.0))?;
635 let not = notification_new::<req::PublishDiagnostics>(params);
636 task_sender.send(Task::Notify(not)).unwrap();
637 }
638 Ok(())
639}
640
608struct PoolDispatcher<'a> { 641struct PoolDispatcher<'a> {
609 req: Option<Request>, 642 req: Option<Request>,
610 pool: &'a ThreadPool, 643 pool: &'a ThreadPool,
diff --git a/crates/ra_lsp_server/src/main_loop/handlers.rs b/crates/ra_lsp_server/src/main_loop/handlers.rs
index d5a8bbe4d..8e43f0575 100644
--- a/crates/ra_lsp_server/src/main_loop/handlers.rs
+++ b/crates/ra_lsp_server/src/main_loop/handlers.rs
@@ -3,6 +3,7 @@
3 3
4use std::{fmt::Write as _, io::Write as _}; 4use std::{fmt::Write as _, io::Write as _};
5 5
6use either::Either;
6use lsp_server::ErrorCode; 7use lsp_server::ErrorCode;
7use lsp_types::{ 8use lsp_types::{
8 CallHierarchyIncomingCall, CallHierarchyIncomingCallsParams, CallHierarchyItem, 9 CallHierarchyIncomingCall, CallHierarchyIncomingCallsParams, CallHierarchyItem,
@@ -644,7 +645,6 @@ pub fn handle_code_action(
644 let line_index = world.analysis().file_line_index(file_id)?; 645 let line_index = world.analysis().file_line_index(file_id)?;
645 let range = params.range.conv_with(&line_index); 646 let range = params.range.conv_with(&line_index);
646 647
647 let assists = world.analysis().assists(FileRange { file_id, range })?.into_iter();
648 let diagnostics = world.analysis().diagnostics(file_id)?; 648 let diagnostics = world.analysis().diagnostics(file_id)?;
649 let mut res = CodeActionResponse::default(); 649 let mut res = CodeActionResponse::default();
650 650
@@ -681,10 +681,12 @@ pub fn handle_code_action(
681 continue; 681 continue;
682 } 682 }
683 683
684 let edits = vec![TextEdit::new(fix.location.range, fix.replacement.clone())]; 684 let edit = {
685 let mut edit_map = std::collections::HashMap::new(); 685 let edits = vec![TextEdit::new(fix.location.range, fix.replacement.clone())];
686 edit_map.insert(fix.location.uri.clone(), edits); 686 let mut edit_map = std::collections::HashMap::new();
687 let edit = WorkspaceEdit::new(edit_map); 687 edit_map.insert(fix.location.uri.clone(), edits);
688 WorkspaceEdit::new(edit_map)
689 };
688 690
689 let action = CodeAction { 691 let action = CodeAction {
690 title: fix.title.clone(), 692 title: fix.title.clone(),
@@ -697,15 +699,27 @@ pub fn handle_code_action(
697 res.push(action.into()); 699 res.push(action.into());
698 } 700 }
699 701
700 for assist in assists { 702 for assist in world.analysis().assists(FileRange { file_id, range })?.into_iter() {
701 let title = assist.change.label.clone(); 703 let title = assist.label.clone();
702 let edit = assist.change.try_conv_with(&world)?;
703 704
704 let command = Command { 705 let command = match assist.change_data {
705 title, 706 Either::Left(change) => Command {
706 command: "rust-analyzer.applySourceChange".to_string(), 707 title,
707 arguments: Some(vec![to_value(edit).unwrap()]), 708 command: "rust-analyzer.applySourceChange".to_string(),
709 arguments: Some(vec![to_value(change.try_conv_with(&world)?)?]),
710 },
711 Either::Right(changes) => Command {
712 title,
713 command: "rust-analyzer.selectAndApplySourceChange".to_string(),
714 arguments: Some(vec![to_value(
715 changes
716 .into_iter()
717 .map(|change| change.try_conv_with(&world))
718 .collect::<Result<Vec<_>>>()?,
719 )?]),
720 },
708 }; 721 };
722
709 let action = CodeAction { 723 let action = CodeAction {
710 title: command.title.clone(), 724 title: command.title.clone(),
711 kind: match assist.id { 725 kind: match assist.id {
@@ -953,6 +967,7 @@ pub fn handle_inlay_hints(
953 range: api_type.range.conv_with(&line_index), 967 range: api_type.range.conv_with(&line_index),
954 kind: match api_type.kind { 968 kind: match api_type.kind {
955 ra_ide::InlayKind::TypeHint => InlayKind::TypeHint, 969 ra_ide::InlayKind::TypeHint => InlayKind::TypeHint,
970 ra_ide::InlayKind::ParameterHint => InlayKind::ParameterHint,
956 }, 971 },
957 }) 972 })
958 .collect()) 973 .collect())
diff --git a/crates/ra_lsp_server/src/req.rs b/crates/ra_lsp_server/src/req.rs
index 8098ff31d..dc327f53d 100644
--- a/crates/ra_lsp_server/src/req.rs
+++ b/crates/ra_lsp_server/src/req.rs
@@ -197,6 +197,7 @@ pub struct InlayHintsParams {
197#[derive(Debug, PartialEq, Eq, Deserialize, Serialize)] 197#[derive(Debug, PartialEq, Eq, Deserialize, Serialize)]
198pub enum InlayKind { 198pub enum InlayKind {
199 TypeHint, 199 TypeHint,
200 ParameterHint,
200} 201}
201 202
202#[derive(Debug, Deserialize, Serialize)] 203#[derive(Debug, Deserialize, Serialize)]
diff --git a/crates/ra_lsp_server/src/world.rs b/crates/ra_lsp_server/src/world.rs
index c0175c726..e7a0acfc7 100644
--- a/crates/ra_lsp_server/src/world.rs
+++ b/crates/ra_lsp_server/src/world.rs
@@ -13,7 +13,7 @@ use lsp_server::ErrorCode;
13use lsp_types::Url; 13use lsp_types::Url;
14use parking_lot::RwLock; 14use parking_lot::RwLock;
15use ra_cargo_watch::{ 15use ra_cargo_watch::{
16 url_from_path_with_drive_lowercasing, CheckOptions, CheckWatcher, CheckWatcherSharedState, 16 url_from_path_with_drive_lowercasing, CheckOptions, CheckState, CheckWatcher,
17}; 17};
18use ra_ide::{ 18use ra_ide::{
19 Analysis, AnalysisChange, AnalysisHost, CrateGraph, FeatureFlags, FileId, LibraryData, 19 Analysis, AnalysisChange, AnalysisHost, CrateGraph, FeatureFlags, FileId, LibraryData,
@@ -62,9 +62,9 @@ pub struct WorldSnapshot {
62 pub options: Options, 62 pub options: Options,
63 pub workspaces: Arc<Vec<ProjectWorkspace>>, 63 pub workspaces: Arc<Vec<ProjectWorkspace>>,
64 pub analysis: Analysis, 64 pub analysis: Analysis,
65 pub vfs: Arc<RwLock<Vfs>>,
66 pub latest_requests: Arc<RwLock<LatestRequests>>, 65 pub latest_requests: Arc<RwLock<LatestRequests>>,
67 pub check_watcher: Arc<RwLock<CheckWatcherSharedState>>, 66 pub check_watcher: Arc<RwLock<CheckState>>,
67 vfs: Arc<RwLock<Vfs>>,
68} 68}
69 69
70impl WorldState { 70impl WorldState {
@@ -220,7 +220,7 @@ impl WorldState {
220 analysis: self.analysis_host.analysis(), 220 analysis: self.analysis_host.analysis(),
221 vfs: Arc::clone(&self.vfs), 221 vfs: Arc::clone(&self.vfs),
222 latest_requests: Arc::clone(&self.latest_requests), 222 latest_requests: Arc::clone(&self.latest_requests),
223 check_watcher: self.check_watcher.shared.clone(), 223 check_watcher: self.check_watcher.state.clone(),
224 } 224 }
225 } 225 }
226 226
@@ -265,6 +265,10 @@ impl WorldSnapshot {
265 Ok(url) 265 Ok(url)
266 } 266 }
267 267
268 pub fn file_id_to_path(&self, id: FileId) -> PathBuf {
269 self.vfs.read().file2path(VfsFile(id.0))
270 }
271
268 pub fn file_line_endings(&self, id: FileId) -> LineEndings { 272 pub fn file_line_endings(&self, id: FileId) -> LineEndings {
269 self.vfs.read().file_line_endings(VfsFile(id.0)) 273 self.vfs.read().file_line_endings(VfsFile(id.0))
270 } 274 }
diff --git a/crates/ra_syntax/src/ast/edit.rs b/crates/ra_syntax/src/ast/edit.rs
index b736098ac..0e78d8b63 100644
--- a/crates/ra_syntax/src/ast/edit.rs
+++ b/crates/ra_syntax/src/ast/edit.rs
@@ -22,9 +22,8 @@ impl ast::BinExpr {
22 #[must_use] 22 #[must_use]
23 pub fn replace_op(&self, op: SyntaxKind) -> Option<ast::BinExpr> { 23 pub fn replace_op(&self, op: SyntaxKind) -> Option<ast::BinExpr> {
24 let op_node: SyntaxElement = self.op_details()?.0.into(); 24 let op_node: SyntaxElement = self.op_details()?.0.into();
25 let to_insert: Option<SyntaxElement> = Some(tokens::op(op).into()); 25 let to_insert: Option<SyntaxElement> = Some(make::token(op).into());
26 let replace_range = RangeInclusive::new(op_node.clone(), op_node); 26 Some(replace_children(self, single_node(op_node), to_insert))
27 Some(replace_children(self, replace_range, to_insert.into_iter()))
28 } 27 }
29} 28}
30 29
@@ -40,11 +39,10 @@ impl ast::FnDef {
40 } else { 39 } else {
41 to_insert.push(make::tokens::single_space().into()); 40 to_insert.push(make::tokens::single_space().into());
42 to_insert.push(body.syntax().clone().into()); 41 to_insert.push(body.syntax().clone().into());
43 return insert_children(self, InsertPosition::Last, to_insert.into_iter()); 42 return insert_children(self, InsertPosition::Last, to_insert);
44 }; 43 };
45 to_insert.push(body.syntax().clone().into()); 44 to_insert.push(body.syntax().clone().into());
46 let replace_range = RangeInclusive::new(old_body_or_semi.clone(), old_body_or_semi); 45 replace_children(self, single_node(old_body_or_semi), to_insert)
47 replace_children(self, replace_range, to_insert.into_iter())
48 } 46 }
49} 47}
50 48
@@ -77,7 +75,7 @@ impl ast::ItemList {
77 let ws = tokens::WsBuilder::new(&format!("\n{}", indent)); 75 let ws = tokens::WsBuilder::new(&format!("\n{}", indent));
78 let to_insert: ArrayVec<[SyntaxElement; 2]> = 76 let to_insert: ArrayVec<[SyntaxElement; 2]> =
79 [ws.ws().into(), item.syntax().clone().into()].into(); 77 [ws.ws().into(), item.syntax().clone().into()].into();
80 insert_children(self, position, to_insert.into_iter()) 78 insert_children(self, position, to_insert)
81 } 79 }
82 80
83 fn l_curly(&self) -> Option<SyntaxElement> { 81 fn l_curly(&self) -> Option<SyntaxElement> {
@@ -109,9 +107,7 @@ impl ast::ItemList {
109 let to_insert = iter::once(ws.ws().into()); 107 let to_insert = iter::once(ws.ws().into());
110 match existing_ws { 108 match existing_ws {
111 None => insert_children(self, InsertPosition::After(l_curly), to_insert), 109 None => insert_children(self, InsertPosition::After(l_curly), to_insert),
112 Some(ws) => { 110 Some(ws) => replace_children(self, single_node(ws), to_insert),
113 replace_children(self, RangeInclusive::new(ws.clone().into(), ws.into()), to_insert)
114 }
115 } 111 }
116 } 112 }
117} 113}
@@ -188,7 +184,7 @@ impl ast::RecordFieldList {
188 InsertPosition::After(anchor) => after_field!(anchor), 184 InsertPosition::After(anchor) => after_field!(anchor),
189 }; 185 };
190 186
191 insert_children(self, position, to_insert.iter().cloned()) 187 insert_children(self, position, to_insert)
192 } 188 }
193 189
194 fn l_curly(&self) -> Option<SyntaxElement> { 190 fn l_curly(&self) -> Option<SyntaxElement> {
@@ -207,7 +203,49 @@ impl ast::TypeParam {
207 Some(it) => it.syntax().clone().into(), 203 Some(it) => it.syntax().clone().into(),
208 None => colon.clone().into(), 204 None => colon.clone().into(),
209 }; 205 };
210 replace_children(self, RangeInclusive::new(colon.into(), end), iter::empty()) 206 replace_children(self, colon.into()..=end, iter::empty())
207 }
208}
209
210impl ast::Path {
211 #[must_use]
212 pub fn with_segment(&self, segment: ast::PathSegment) -> ast::Path {
213 if let Some(old) = self.segment() {
214 return replace_children(
215 self,
216 single_node(old.syntax().clone()),
217 iter::once(segment.syntax().clone().into()),
218 );
219 }
220 self.clone()
221 }
222}
223
224impl ast::PathSegment {
225 #[must_use]
226 pub fn with_type_args(&self, type_args: ast::TypeArgList) -> ast::PathSegment {
227 self._with_type_args(type_args, false)
228 }
229
230 #[must_use]
231 pub fn with_turbo_fish(&self, type_args: ast::TypeArgList) -> ast::PathSegment {
232 self._with_type_args(type_args, true)
233 }
234
235 fn _with_type_args(&self, type_args: ast::TypeArgList, turbo: bool) -> ast::PathSegment {
236 if let Some(old) = self.type_arg_list() {
237 return replace_children(
238 self,
239 single_node(old.syntax().clone()),
240 iter::once(type_args.syntax().clone().into()),
241 );
242 }
243 let mut to_insert: ArrayVec<[SyntaxElement; 2]> = ArrayVec::new();
244 if turbo {
245 to_insert.push(make::token(T![::]).into());
246 }
247 to_insert.push(type_args.syntax().clone().into());
248 insert_children(self, InsertPosition::Last, to_insert)
211 } 249 }
212} 250}
213 251
@@ -224,7 +262,7 @@ fn strip_attrs_and_docs_inner(mut node: SyntaxNode) -> SyntaxNode {
224 Some(el) if el.kind() == WHITESPACE => el.clone(), 262 Some(el) if el.kind() == WHITESPACE => el.clone(),
225 Some(_) | None => start.clone(), 263 Some(_) | None => start.clone(),
226 }; 264 };
227 node = algo::replace_children(&node, RangeInclusive::new(start, end), &mut iter::empty()); 265 node = algo::replace_children(&node, start..=end, &mut iter::empty());
228 } 266 }
229 node 267 node
230} 268}
@@ -232,9 +270,10 @@ fn strip_attrs_and_docs_inner(mut node: SyntaxNode) -> SyntaxNode {
232#[must_use] 270#[must_use]
233pub fn replace_descendants<N: AstNode, D: AstNode>( 271pub fn replace_descendants<N: AstNode, D: AstNode>(
234 parent: &N, 272 parent: &N,
235 replacement_map: impl Iterator<Item = (D, D)>, 273 replacement_map: impl IntoIterator<Item = (D, D)>,
236) -> N { 274) -> N {
237 let map = replacement_map 275 let map = replacement_map
276 .into_iter()
238 .map(|(from, to)| (from.syntax().clone().into(), to.syntax().clone().into())) 277 .map(|(from, to)| (from.syntax().clone().into(), to.syntax().clone().into()))
239 .collect::<FxHashMap<SyntaxElement, _>>(); 278 .collect::<FxHashMap<SyntaxElement, _>>();
240 let new_syntax = algo::replace_descendants(parent.syntax(), &|n| map.get(n).cloned()); 279 let new_syntax = algo::replace_descendants(parent.syntax(), &|n| map.get(n).cloned());
@@ -348,19 +387,25 @@ fn prev_tokens(token: SyntaxToken) -> impl Iterator<Item = SyntaxToken> {
348fn insert_children<N: AstNode>( 387fn insert_children<N: AstNode>(
349 parent: &N, 388 parent: &N,
350 position: InsertPosition<SyntaxElement>, 389 position: InsertPosition<SyntaxElement>,
351 mut to_insert: impl Iterator<Item = SyntaxElement>, 390 to_insert: impl IntoIterator<Item = SyntaxElement>,
352) -> N { 391) -> N {
353 let new_syntax = algo::insert_children(parent.syntax(), position, &mut to_insert); 392 let new_syntax = algo::insert_children(parent.syntax(), position, &mut to_insert.into_iter());
354 N::cast(new_syntax).unwrap() 393 N::cast(new_syntax).unwrap()
355} 394}
356 395
396fn single_node(element: impl Into<SyntaxElement>) -> RangeInclusive<SyntaxElement> {
397 let element = element.into();
398 element.clone()..=element
399}
400
357#[must_use] 401#[must_use]
358fn replace_children<N: AstNode>( 402fn replace_children<N: AstNode>(
359 parent: &N, 403 parent: &N,
360 to_replace: RangeInclusive<SyntaxElement>, 404 to_replace: RangeInclusive<SyntaxElement>,
361 mut to_insert: impl Iterator<Item = SyntaxElement>, 405 to_insert: impl IntoIterator<Item = SyntaxElement>,
362) -> N { 406) -> N {
363 let new_syntax = algo::replace_children(parent.syntax(), to_replace, &mut to_insert); 407 let new_syntax =
408 algo::replace_children(parent.syntax(), to_replace, &mut to_insert.into_iter());
364 N::cast(new_syntax).unwrap() 409 N::cast(new_syntax).unwrap()
365} 410}
366 411
diff --git a/crates/ra_syntax/src/ast/make.rs b/crates/ra_syntax/src/ast/make.rs
index eef45090d..36e648180 100644
--- a/crates/ra_syntax/src/ast/make.rs
+++ b/crates/ra_syntax/src/ast/make.rs
@@ -2,7 +2,7 @@
2//! of smaller pieces. 2//! of smaller pieces.
3use itertools::Itertools; 3use itertools::Itertools;
4 4
5use crate::{algo, ast, AstNode, SourceFile}; 5use crate::{ast, AstNode, SourceFile, SyntaxKind, SyntaxToken};
6 6
7pub fn name(text: &str) -> ast::Name { 7pub fn name(text: &str) -> ast::Name {
8 ast_from_text(&format!("mod {};", text)) 8 ast_from_text(&format!("mod {};", text))
@@ -21,20 +21,6 @@ pub fn path_qualified(qual: ast::Path, name_ref: ast::NameRef) -> ast::Path {
21fn path_from_text(text: &str) -> ast::Path { 21fn path_from_text(text: &str) -> ast::Path {
22 ast_from_text(text) 22 ast_from_text(text)
23} 23}
24pub fn path_with_type_arg_list(path: ast::Path, args: Option<ast::TypeArgList>) -> ast::Path {
25 if let Some(args) = args {
26 let syntax = path.syntax();
27 // FIXME: remove existing type args
28 let new_syntax = algo::insert_children(
29 syntax,
30 crate::algo::InsertPosition::Last,
31 &mut Some(args).into_iter().map(|n| n.syntax().clone().into()),
32 );
33 ast::Path::cast(new_syntax).unwrap()
34 } else {
35 path
36 }
37}
38 24
39pub fn record_field(name: ast::NameRef, expr: Option<ast::Expr>) -> ast::RecordField { 25pub fn record_field(name: ast::NameRef, expr: Option<ast::Expr>) -> ast::RecordField {
40 return match expr { 26 return match expr {
@@ -181,27 +167,27 @@ pub fn let_stmt(pattern: ast::Pat, initializer: Option<ast::Expr>) -> ast::LetSt
181 ast_from_text(&format!("fn f() {{ {} }}", text)) 167 ast_from_text(&format!("fn f() {{ {} }}", text))
182} 168}
183 169
170pub fn token(kind: SyntaxKind) -> SyntaxToken {
171 tokens::SOURCE_FILE
172 .tree()
173 .syntax()
174 .descendants_with_tokens()
175 .filter_map(|it| it.into_token())
176 .find(|it| it.kind() == kind)
177 .unwrap_or_else(|| panic!("unhandled token: {:?}", kind))
178}
179
184fn ast_from_text<N: AstNode>(text: &str) -> N { 180fn ast_from_text<N: AstNode>(text: &str) -> N {
185 let parse = SourceFile::parse(text); 181 let parse = SourceFile::parse(text);
186 parse.tree().syntax().descendants().find_map(N::cast).unwrap() 182 parse.tree().syntax().descendants().find_map(N::cast).unwrap()
187} 183}
188 184
189pub mod tokens { 185pub mod tokens {
190 use crate::{AstNode, Parse, SourceFile, SyntaxKind, SyntaxKind::*, SyntaxToken, T}; 186 use crate::{AstNode, Parse, SourceFile, SyntaxKind::*, SyntaxToken, T};
191 use once_cell::sync::Lazy; 187 use once_cell::sync::Lazy;
192 188
193 static SOURCE_FILE: Lazy<Parse<SourceFile>> = 189 pub(super) static SOURCE_FILE: Lazy<Parse<SourceFile>> =
194 Lazy::new(|| SourceFile::parse("const C: () = (1 != 1, 2 == 2)\n;")); 190 Lazy::new(|| SourceFile::parse("const C: <()>::Item = (1 != 1, 2 == 2)\n;"));
195
196 pub fn op(op: SyntaxKind) -> SyntaxToken {
197 SOURCE_FILE
198 .tree()
199 .syntax()
200 .descendants_with_tokens()
201 .filter_map(|it| it.into_token())
202 .find(|it| it.kind() == op)
203 .unwrap()
204 }
205 191
206 pub fn comma() -> SyntaxToken { 192 pub fn comma() -> SyntaxToken {
207 SOURCE_FILE 193 SOURCE_FILE
diff --git a/crates/ra_syntax/test_data/accidentally_quadratic b/crates/ra_syntax/test_data/accidentally_quadratic
new file mode 100644
index 000000000..428f83a62
--- /dev/null
+++ b/crates/ra_syntax/test_data/accidentally_quadratic
@@ -0,0 +1,3980 @@
1#[doc = r" Register block"]
2#[repr(C)]
3pub struct RegisterBlock {
4 #[doc = "0x00 - Control Register"]
5 pub cr: CR,
6 #[doc = "0x04 - Error Status Register"]
7 pub es: ES,
8 _reserved0: [u8; 4usize],
9 #[doc = "0x0c - Enable Request Register"]
10 pub erq: ERQ,
11 _reserved1: [u8; 4usize],
12 #[doc = "0x14 - Enable Error Interrupt Register"]
13 pub eei: EEI,
14 #[doc = "0x18 - Clear Enable Error Interrupt Register"]
15 pub ceei: CEEI,
16 #[doc = "0x19 - Set Enable Error Interrupt Register"]
17 pub seei: SEEI,
18 #[doc = "0x1a - Clear Enable Request Register"]
19 pub cerq: CERQ,
20 #[doc = "0x1b - Set Enable Request Register"]
21 pub serq: SERQ,
22 #[doc = "0x1c - Clear DONE Status Bit Register"]
23 pub cdne: CDNE,
24 #[doc = "0x1d - Set START Bit Register"]
25 pub ssrt: SSRT,
26 #[doc = "0x1e - Clear Error Register"]
27 pub cerr: CERR,
28 #[doc = "0x1f - Clear Interrupt Request Register"]
29 pub cint: CINT,
30 _reserved2: [u8; 4usize],
31 #[doc = "0x24 - Interrupt Request Register"]
32 pub int: INT,
33 _reserved3: [u8; 4usize],
34 #[doc = "0x2c - Error Register"]
35 pub err: ERR,
36 _reserved4: [u8; 4usize],
37 #[doc = "0x34 - Hardware Request Status Register"]
38 pub hrs: HRS,
39 _reserved5: [u8; 12usize],
40 #[doc = "0x44 - Enable Asynchronous Request in Stop Register"]
41 pub ears: EARS,
42 _reserved6: [u8; 184usize],
43 #[doc = "0x100 - Channel n Priority Register"]
44 pub dchpri3: DCHPRI3,
45 #[doc = "0x101 - Channel n Priority Register"]
46 pub dchpri2: DCHPRI2,
47 #[doc = "0x102 - Channel n Priority Register"]
48 pub dchpri1: DCHPRI1,
49 #[doc = "0x103 - Channel n Priority Register"]
50 pub dchpri0: DCHPRI0,
51 #[doc = "0x104 - Channel n Priority Register"]
52 pub dchpri7: DCHPRI7,
53 #[doc = "0x105 - Channel n Priority Register"]
54 pub dchpri6: DCHPRI6,
55 #[doc = "0x106 - Channel n Priority Register"]
56 pub dchpri5: DCHPRI5,
57 #[doc = "0x107 - Channel n Priority Register"]
58 pub dchpri4: DCHPRI4,
59 #[doc = "0x108 - Channel n Priority Register"]
60 pub dchpri11: DCHPRI11,
61 #[doc = "0x109 - Channel n Priority Register"]
62 pub dchpri10: DCHPRI10,
63 #[doc = "0x10a - Channel n Priority Register"]
64 pub dchpri9: DCHPRI9,
65 #[doc = "0x10b - Channel n Priority Register"]
66 pub dchpri8: DCHPRI8,
67 #[doc = "0x10c - Channel n Priority Register"]
68 pub dchpri15: DCHPRI15,
69 #[doc = "0x10d - Channel n Priority Register"]
70 pub dchpri14: DCHPRI14,
71 #[doc = "0x10e - Channel n Priority Register"]
72 pub dchpri13: DCHPRI13,
73 #[doc = "0x10f - Channel n Priority Register"]
74 pub dchpri12: DCHPRI12,
75 #[doc = "0x110 - Channel n Priority Register"]
76 pub dchpri19: DCHPRI19,
77 #[doc = "0x111 - Channel n Priority Register"]
78 pub dchpri18: DCHPRI18,
79 #[doc = "0x112 - Channel n Priority Register"]
80 pub dchpri17: DCHPRI17,
81 #[doc = "0x113 - Channel n Priority Register"]
82 pub dchpri16: DCHPRI16,
83 #[doc = "0x114 - Channel n Priority Register"]
84 pub dchpri23: DCHPRI23,
85 #[doc = "0x115 - Channel n Priority Register"]
86 pub dchpri22: DCHPRI22,
87 #[doc = "0x116 - Channel n Priority Register"]
88 pub dchpri21: DCHPRI21,
89 #[doc = "0x117 - Channel n Priority Register"]
90 pub dchpri20: DCHPRI20,
91 #[doc = "0x118 - Channel n Priority Register"]
92 pub dchpri27: DCHPRI27,
93 #[doc = "0x119 - Channel n Priority Register"]
94 pub dchpri26: DCHPRI26,
95 #[doc = "0x11a - Channel n Priority Register"]
96 pub dchpri25: DCHPRI25,
97 #[doc = "0x11b - Channel n Priority Register"]
98 pub dchpri24: DCHPRI24,
99 #[doc = "0x11c - Channel n Priority Register"]
100 pub dchpri31: DCHPRI31,
101 #[doc = "0x11d - Channel n Priority Register"]
102 pub dchpri30: DCHPRI30,
103 #[doc = "0x11e - Channel n Priority Register"]
104 pub dchpri29: DCHPRI29,
105 #[doc = "0x11f - Channel n Priority Register"]
106 pub dchpri28: DCHPRI28,
107 _reserved7: [u8; 3808usize],
108 #[doc = "0x1000 - TCD Source Address"]
109 pub tcd0_saddr: TCD0_SADDR,
110 #[doc = "0x1004 - TCD Signed Source Address Offset"]
111 pub tcd0_soff: TCD0_SOFF,
112 #[doc = "0x1006 - TCD Transfer Attributes"]
113 pub tcd0_attr: TCD0_ATTR,
114 #[doc = "0x1008 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
115 pub tcd0_nbytes_mlno: TCD0_NBYTES_MLNO,
116 #[doc = "0x100c - TCD Last Source Address Adjustment"]
117 pub tcd0_slast: TCD0_SLAST,
118 #[doc = "0x1010 - TCD Destination Address"]
119 pub tcd0_daddr: TCD0_DADDR,
120 #[doc = "0x1014 - TCD Signed Destination Address Offset"]
121 pub tcd0_doff: TCD0_DOFF,
122 #[doc = "0x1016 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
123 pub tcd0_citer_elinkno: TCD0_CITER_ELINKNO,
124 #[doc = "0x1018 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
125 pub tcd0_dlastsga: TCD0_DLASTSGA,
126 #[doc = "0x101c - TCD Control and Status"]
127 pub tcd0_csr: TCD0_CSR,
128 #[doc = "0x101e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
129 pub tcd0_biter_elinkno: TCD0_BITER_ELINKNO,
130 #[doc = "0x1020 - TCD Source Address"]
131 pub tcd1_saddr: TCD1_SADDR,
132 #[doc = "0x1024 - TCD Signed Source Address Offset"]
133 pub tcd1_soff: TCD1_SOFF,
134 #[doc = "0x1026 - TCD Transfer Attributes"]
135 pub tcd1_attr: TCD1_ATTR,
136 #[doc = "0x1028 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
137 pub tcd1_nbytes_mlno: TCD1_NBYTES_MLNO,
138 #[doc = "0x102c - TCD Last Source Address Adjustment"]
139 pub tcd1_slast: TCD1_SLAST,
140 #[doc = "0x1030 - TCD Destination Address"]
141 pub tcd1_daddr: TCD1_DADDR,
142 #[doc = "0x1034 - TCD Signed Destination Address Offset"]
143 pub tcd1_doff: TCD1_DOFF,
144 #[doc = "0x1036 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
145 pub tcd1_citer_elinkno: TCD1_CITER_ELINKNO,
146 #[doc = "0x1038 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
147 pub tcd1_dlastsga: TCD1_DLASTSGA,
148 #[doc = "0x103c - TCD Control and Status"]
149 pub tcd1_csr: TCD1_CSR,
150 #[doc = "0x103e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
151 pub tcd1_biter_elinkno: TCD1_BITER_ELINKNO,
152 #[doc = "0x1040 - TCD Source Address"]
153 pub tcd2_saddr: TCD2_SADDR,
154 #[doc = "0x1044 - TCD Signed Source Address Offset"]
155 pub tcd2_soff: TCD2_SOFF,
156 #[doc = "0x1046 - TCD Transfer Attributes"]
157 pub tcd2_attr: TCD2_ATTR,
158 #[doc = "0x1048 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
159 pub tcd2_nbytes_mlno: TCD2_NBYTES_MLNO,
160 #[doc = "0x104c - TCD Last Source Address Adjustment"]
161 pub tcd2_slast: TCD2_SLAST,
162 #[doc = "0x1050 - TCD Destination Address"]
163 pub tcd2_daddr: TCD2_DADDR,
164 #[doc = "0x1054 - TCD Signed Destination Address Offset"]
165 pub tcd2_doff: TCD2_DOFF,
166 #[doc = "0x1056 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
167 pub tcd2_citer_elinkno: TCD2_CITER_ELINKNO,
168 #[doc = "0x1058 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
169 pub tcd2_dlastsga: TCD2_DLASTSGA,
170 #[doc = "0x105c - TCD Control and Status"]
171 pub tcd2_csr: TCD2_CSR,
172 #[doc = "0x105e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
173 pub tcd2_biter_elinkno: TCD2_BITER_ELINKNO,
174 #[doc = "0x1060 - TCD Source Address"]
175 pub tcd3_saddr: TCD3_SADDR,
176 #[doc = "0x1064 - TCD Signed Source Address Offset"]
177 pub tcd3_soff: TCD3_SOFF,
178 #[doc = "0x1066 - TCD Transfer Attributes"]
179 pub tcd3_attr: TCD3_ATTR,
180 #[doc = "0x1068 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
181 pub tcd3_nbytes_mlno: TCD3_NBYTES_MLNO,
182 #[doc = "0x106c - TCD Last Source Address Adjustment"]
183 pub tcd3_slast: TCD3_SLAST,
184 #[doc = "0x1070 - TCD Destination Address"]
185 pub tcd3_daddr: TCD3_DADDR,
186 #[doc = "0x1074 - TCD Signed Destination Address Offset"]
187 pub tcd3_doff: TCD3_DOFF,
188 #[doc = "0x1076 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
189 pub tcd3_citer_elinkno: TCD3_CITER_ELINKNO,
190 #[doc = "0x1078 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
191 pub tcd3_dlastsga: TCD3_DLASTSGA,
192 #[doc = "0x107c - TCD Control and Status"]
193 pub tcd3_csr: TCD3_CSR,
194 #[doc = "0x107e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
195 pub tcd3_biter_elinkno: TCD3_BITER_ELINKNO,
196 #[doc = "0x1080 - TCD Source Address"]
197 pub tcd4_saddr: TCD4_SADDR,
198 #[doc = "0x1084 - TCD Signed Source Address Offset"]
199 pub tcd4_soff: TCD4_SOFF,
200 #[doc = "0x1086 - TCD Transfer Attributes"]
201 pub tcd4_attr: TCD4_ATTR,
202 #[doc = "0x1088 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
203 pub tcd4_nbytes_mlno: TCD4_NBYTES_MLNO,
204 #[doc = "0x108c - TCD Last Source Address Adjustment"]
205 pub tcd4_slast: TCD4_SLAST,
206 #[doc = "0x1090 - TCD Destination Address"]
207 pub tcd4_daddr: TCD4_DADDR,
208 #[doc = "0x1094 - TCD Signed Destination Address Offset"]
209 pub tcd4_doff: TCD4_DOFF,
210 #[doc = "0x1096 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
211 pub tcd4_citer_elinkno: TCD4_CITER_ELINKNO,
212 #[doc = "0x1098 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
213 pub tcd4_dlastsga: TCD4_DLASTSGA,
214 #[doc = "0x109c - TCD Control and Status"]
215 pub tcd4_csr: TCD4_CSR,
216 #[doc = "0x109e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
217 pub tcd4_biter_elinkno: TCD4_BITER_ELINKNO,
218 #[doc = "0x10a0 - TCD Source Address"]
219 pub tcd5_saddr: TCD5_SADDR,
220 #[doc = "0x10a4 - TCD Signed Source Address Offset"]
221 pub tcd5_soff: TCD5_SOFF,
222 #[doc = "0x10a6 - TCD Transfer Attributes"]
223 pub tcd5_attr: TCD5_ATTR,
224 #[doc = "0x10a8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
225 pub tcd5_nbytes_mlno: TCD5_NBYTES_MLNO,
226 #[doc = "0x10ac - TCD Last Source Address Adjustment"]
227 pub tcd5_slast: TCD5_SLAST,
228 #[doc = "0x10b0 - TCD Destination Address"]
229 pub tcd5_daddr: TCD5_DADDR,
230 #[doc = "0x10b4 - TCD Signed Destination Address Offset"]
231 pub tcd5_doff: TCD5_DOFF,
232 #[doc = "0x10b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
233 pub tcd5_citer_elinkno: TCD5_CITER_ELINKNO,
234 #[doc = "0x10b8 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
235 pub tcd5_dlastsga: TCD5_DLASTSGA,
236 #[doc = "0x10bc - TCD Control and Status"]
237 pub tcd5_csr: TCD5_CSR,
238 #[doc = "0x10be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
239 pub tcd5_biter_elinkno: TCD5_BITER_ELINKNO,
240 #[doc = "0x10c0 - TCD Source Address"]
241 pub tcd6_saddr: TCD6_SADDR,
242 #[doc = "0x10c4 - TCD Signed Source Address Offset"]
243 pub tcd6_soff: TCD6_SOFF,
244 #[doc = "0x10c6 - TCD Transfer Attributes"]
245 pub tcd6_attr: TCD6_ATTR,
246 #[doc = "0x10c8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
247 pub tcd6_nbytes_mlno: TCD6_NBYTES_MLNO,
248 #[doc = "0x10cc - TCD Last Source Address Adjustment"]
249 pub tcd6_slast: TCD6_SLAST,
250 #[doc = "0x10d0 - TCD Destination Address"]
251 pub tcd6_daddr: TCD6_DADDR,
252 #[doc = "0x10d4 - TCD Signed Destination Address Offset"]
253 pub tcd6_doff: TCD6_DOFF,
254 #[doc = "0x10d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
255 pub tcd6_citer_elinkno: TCD6_CITER_ELINKNO,
256 #[doc = "0x10d8 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
257 pub tcd6_dlastsga: TCD6_DLASTSGA,
258 #[doc = "0x10dc - TCD Control and Status"]
259 pub tcd6_csr: TCD6_CSR,
260 #[doc = "0x10de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
261 pub tcd6_biter_elinkno: TCD6_BITER_ELINKNO,
262 #[doc = "0x10e0 - TCD Source Address"]
263 pub tcd7_saddr: TCD7_SADDR,
264 #[doc = "0x10e4 - TCD Signed Source Address Offset"]
265 pub tcd7_soff: TCD7_SOFF,
266 #[doc = "0x10e6 - TCD Transfer Attributes"]
267 pub tcd7_attr: TCD7_ATTR,
268 #[doc = "0x10e8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
269 pub tcd7_nbytes_mlno: TCD7_NBYTES_MLNO,
270 #[doc = "0x10ec - TCD Last Source Address Adjustment"]
271 pub tcd7_slast: TCD7_SLAST,
272 #[doc = "0x10f0 - TCD Destination Address"]
273 pub tcd7_daddr: TCD7_DADDR,
274 #[doc = "0x10f4 - TCD Signed Destination Address Offset"]
275 pub tcd7_doff: TCD7_DOFF,
276 #[doc = "0x10f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
277 pub tcd7_citer_elinkno: TCD7_CITER_ELINKNO,
278 #[doc = "0x10f8 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
279 pub tcd7_dlastsga: TCD7_DLASTSGA,
280 #[doc = "0x10fc - TCD Control and Status"]
281 pub tcd7_csr: TCD7_CSR,
282 #[doc = "0x10fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
283 pub tcd7_biter_elinkno: TCD7_BITER_ELINKNO,
284 #[doc = "0x1100 - TCD Source Address"]
285 pub tcd8_saddr: TCD8_SADDR,
286 #[doc = "0x1104 - TCD Signed Source Address Offset"]
287 pub tcd8_soff: TCD8_SOFF,
288 #[doc = "0x1106 - TCD Transfer Attributes"]
289 pub tcd8_attr: TCD8_ATTR,
290 #[doc = "0x1108 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
291 pub tcd8_nbytes_mlno: TCD8_NBYTES_MLNO,
292 #[doc = "0x110c - TCD Last Source Address Adjustment"]
293 pub tcd8_slast: TCD8_SLAST,
294 #[doc = "0x1110 - TCD Destination Address"]
295 pub tcd8_daddr: TCD8_DADDR,
296 #[doc = "0x1114 - TCD Signed Destination Address Offset"]
297 pub tcd8_doff: TCD8_DOFF,
298 #[doc = "0x1116 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
299 pub tcd8_citer_elinkno: TCD8_CITER_ELINKNO,
300 #[doc = "0x1118 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
301 pub tcd8_dlastsga: TCD8_DLASTSGA,
302 #[doc = "0x111c - TCD Control and Status"]
303 pub tcd8_csr: TCD8_CSR,
304 #[doc = "0x111e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
305 pub tcd8_biter_elinkno: TCD8_BITER_ELINKNO,
306 #[doc = "0x1120 - TCD Source Address"]
307 pub tcd9_saddr: TCD9_SADDR,
308 #[doc = "0x1124 - TCD Signed Source Address Offset"]
309 pub tcd9_soff: TCD9_SOFF,
310 #[doc = "0x1126 - TCD Transfer Attributes"]
311 pub tcd9_attr: TCD9_ATTR,
312 #[doc = "0x1128 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
313 pub tcd9_nbytes_mlno: TCD9_NBYTES_MLNO,
314 #[doc = "0x112c - TCD Last Source Address Adjustment"]
315 pub tcd9_slast: TCD9_SLAST,
316 #[doc = "0x1130 - TCD Destination Address"]
317 pub tcd9_daddr: TCD9_DADDR,
318 #[doc = "0x1134 - TCD Signed Destination Address Offset"]
319 pub tcd9_doff: TCD9_DOFF,
320 #[doc = "0x1136 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
321 pub tcd9_citer_elinkno: TCD9_CITER_ELINKNO,
322 #[doc = "0x1138 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
323 pub tcd9_dlastsga: TCD9_DLASTSGA,
324 #[doc = "0x113c - TCD Control and Status"]
325 pub tcd9_csr: TCD9_CSR,
326 #[doc = "0x113e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
327 pub tcd9_biter_elinkno: TCD9_BITER_ELINKNO,
328 #[doc = "0x1140 - TCD Source Address"]
329 pub tcd10_saddr: TCD10_SADDR,
330 #[doc = "0x1144 - TCD Signed Source Address Offset"]
331 pub tcd10_soff: TCD10_SOFF,
332 #[doc = "0x1146 - TCD Transfer Attributes"]
333 pub tcd10_attr: TCD10_ATTR,
334 #[doc = "0x1148 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
335 pub tcd10_nbytes_mlno: TCD10_NBYTES_MLNO,
336 #[doc = "0x114c - TCD Last Source Address Adjustment"]
337 pub tcd10_slast: TCD10_SLAST,
338 #[doc = "0x1150 - TCD Destination Address"]
339 pub tcd10_daddr: TCD10_DADDR,
340 #[doc = "0x1154 - TCD Signed Destination Address Offset"]
341 pub tcd10_doff: TCD10_DOFF,
342 #[doc = "0x1156 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
343 pub tcd10_citer_elinkno: TCD10_CITER_ELINKNO,
344 #[doc = "0x1158 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
345 pub tcd10_dlastsga: TCD10_DLASTSGA,
346 #[doc = "0x115c - TCD Control and Status"]
347 pub tcd10_csr: TCD10_CSR,
348 #[doc = "0x115e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
349 pub tcd10_biter_elinkno: TCD10_BITER_ELINKNO,
350 #[doc = "0x1160 - TCD Source Address"]
351 pub tcd11_saddr: TCD11_SADDR,
352 #[doc = "0x1164 - TCD Signed Source Address Offset"]
353 pub tcd11_soff: TCD11_SOFF,
354 #[doc = "0x1166 - TCD Transfer Attributes"]
355 pub tcd11_attr: TCD11_ATTR,
356 #[doc = "0x1168 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
357 pub tcd11_nbytes_mlno: TCD11_NBYTES_MLNO,
358 #[doc = "0x116c - TCD Last Source Address Adjustment"]
359 pub tcd11_slast: TCD11_SLAST,
360 #[doc = "0x1170 - TCD Destination Address"]
361 pub tcd11_daddr: TCD11_DADDR,
362 #[doc = "0x1174 - TCD Signed Destination Address Offset"]
363 pub tcd11_doff: TCD11_DOFF,
364 #[doc = "0x1176 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
365 pub tcd11_citer_elinkno: TCD11_CITER_ELINKNO,
366 #[doc = "0x1178 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
367 pub tcd11_dlastsga: TCD11_DLASTSGA,
368 #[doc = "0x117c - TCD Control and Status"]
369 pub tcd11_csr: TCD11_CSR,
370 #[doc = "0x117e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
371 pub tcd11_biter_elinkno: TCD11_BITER_ELINKNO,
372 #[doc = "0x1180 - TCD Source Address"]
373 pub tcd12_saddr: TCD12_SADDR,
374 #[doc = "0x1184 - TCD Signed Source Address Offset"]
375 pub tcd12_soff: TCD12_SOFF,
376 #[doc = "0x1186 - TCD Transfer Attributes"]
377 pub tcd12_attr: TCD12_ATTR,
378 #[doc = "0x1188 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
379 pub tcd12_nbytes_mlno: TCD12_NBYTES_MLNO,
380 #[doc = "0x118c - TCD Last Source Address Adjustment"]
381 pub tcd12_slast: TCD12_SLAST,
382 #[doc = "0x1190 - TCD Destination Address"]
383 pub tcd12_daddr: TCD12_DADDR,
384 #[doc = "0x1194 - TCD Signed Destination Address Offset"]
385 pub tcd12_doff: TCD12_DOFF,
386 #[doc = "0x1196 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
387 pub tcd12_citer_elinkno: TCD12_CITER_ELINKNO,
388 #[doc = "0x1198 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
389 pub tcd12_dlastsga: TCD12_DLASTSGA,
390 #[doc = "0x119c - TCD Control and Status"]
391 pub tcd12_csr: TCD12_CSR,
392 #[doc = "0x119e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
393 pub tcd12_biter_elinkno: TCD12_BITER_ELINKNO,
394 #[doc = "0x11a0 - TCD Source Address"]
395 pub tcd13_saddr: TCD13_SADDR,
396 #[doc = "0x11a4 - TCD Signed Source Address Offset"]
397 pub tcd13_soff: TCD13_SOFF,
398 #[doc = "0x11a6 - TCD Transfer Attributes"]
399 pub tcd13_attr: TCD13_ATTR,
400 #[doc = "0x11a8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
401 pub tcd13_nbytes_mlno: TCD13_NBYTES_MLNO,
402 #[doc = "0x11ac - TCD Last Source Address Adjustment"]
403 pub tcd13_slast: TCD13_SLAST,
404 #[doc = "0x11b0 - TCD Destination Address"]
405 pub tcd13_daddr: TCD13_DADDR,
406 #[doc = "0x11b4 - TCD Signed Destination Address Offset"]
407 pub tcd13_doff: TCD13_DOFF,
408 #[doc = "0x11b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
409 pub tcd13_citer_elinkno: TCD13_CITER_ELINKNO,
410 #[doc = "0x11b8 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
411 pub tcd13_dlastsga: TCD13_DLASTSGA,
412 #[doc = "0x11bc - TCD Control and Status"]
413 pub tcd13_csr: TCD13_CSR,
414 #[doc = "0x11be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
415 pub tcd13_biter_elinkno: TCD13_BITER_ELINKNO,
416 #[doc = "0x11c0 - TCD Source Address"]
417 pub tcd14_saddr: TCD14_SADDR,
418 #[doc = "0x11c4 - TCD Signed Source Address Offset"]
419 pub tcd14_soff: TCD14_SOFF,
420 #[doc = "0x11c6 - TCD Transfer Attributes"]
421 pub tcd14_attr: TCD14_ATTR,
422 #[doc = "0x11c8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
423 pub tcd14_nbytes_mlno: TCD14_NBYTES_MLNO,
424 #[doc = "0x11cc - TCD Last Source Address Adjustment"]
425 pub tcd14_slast: TCD14_SLAST,
426 #[doc = "0x11d0 - TCD Destination Address"]
427 pub tcd14_daddr: TCD14_DADDR,
428 #[doc = "0x11d4 - TCD Signed Destination Address Offset"]
429 pub tcd14_doff: TCD14_DOFF,
430 #[doc = "0x11d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
431 pub tcd14_citer_elinkno: TCD14_CITER_ELINKNO,
432 #[doc = "0x11d8 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
433 pub tcd14_dlastsga: TCD14_DLASTSGA,
434 #[doc = "0x11dc - TCD Control and Status"]
435 pub tcd14_csr: TCD14_CSR,
436 #[doc = "0x11de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
437 pub tcd14_biter_elinkno: TCD14_BITER_ELINKNO,
438 #[doc = "0x11e0 - TCD Source Address"]
439 pub tcd15_saddr: TCD15_SADDR,
440 #[doc = "0x11e4 - TCD Signed Source Address Offset"]
441 pub tcd15_soff: TCD15_SOFF,
442 #[doc = "0x11e6 - TCD Transfer Attributes"]
443 pub tcd15_attr: TCD15_ATTR,
444 #[doc = "0x11e8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
445 pub tcd15_nbytes_mlno: TCD15_NBYTES_MLNO,
446 #[doc = "0x11ec - TCD Last Source Address Adjustment"]
447 pub tcd15_slast: TCD15_SLAST,
448 #[doc = "0x11f0 - TCD Destination Address"]
449 pub tcd15_daddr: TCD15_DADDR,
450 #[doc = "0x11f4 - TCD Signed Destination Address Offset"]
451 pub tcd15_doff: TCD15_DOFF,
452 #[doc = "0x11f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
453 pub tcd15_citer_elinkno: TCD15_CITER_ELINKNO,
454 #[doc = "0x11f8 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
455 pub tcd15_dlastsga: TCD15_DLASTSGA,
456 #[doc = "0x11fc - TCD Control and Status"]
457 pub tcd15_csr: TCD15_CSR,
458 #[doc = "0x11fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
459 pub tcd15_biter_elinkno: TCD15_BITER_ELINKNO,
460 #[doc = "0x1200 - TCD Source Address"]
461 pub tcd16_saddr: TCD16_SADDR,
462 #[doc = "0x1204 - TCD Signed Source Address Offset"]
463 pub tcd16_soff: TCD16_SOFF,
464 #[doc = "0x1206 - TCD Transfer Attributes"]
465 pub tcd16_attr: TCD16_ATTR,
466 #[doc = "0x1208 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
467 pub tcd16_nbytes_mlno: TCD16_NBYTES_MLNO,
468 #[doc = "0x120c - TCD Last Source Address Adjustment"]
469 pub tcd16_slast: TCD16_SLAST,
470 #[doc = "0x1210 - TCD Destination Address"]
471 pub tcd16_daddr: TCD16_DADDR,
472 #[doc = "0x1214 - TCD Signed Destination Address Offset"]
473 pub tcd16_doff: TCD16_DOFF,
474 #[doc = "0x1216 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
475 pub tcd16_citer_elinkno: TCD16_CITER_ELINKNO,
476 #[doc = "0x1218 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
477 pub tcd16_dlastsga: TCD16_DLASTSGA,
478 #[doc = "0x121c - TCD Control and Status"]
479 pub tcd16_csr: TCD16_CSR,
480 #[doc = "0x121e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
481 pub tcd16_biter_elinkno: TCD16_BITER_ELINKNO,
482 #[doc = "0x1220 - TCD Source Address"]
483 pub tcd17_saddr: TCD17_SADDR,
484 #[doc = "0x1224 - TCD Signed Source Address Offset"]
485 pub tcd17_soff: TCD17_SOFF,
486 #[doc = "0x1226 - TCD Transfer Attributes"]
487 pub tcd17_attr: TCD17_ATTR,
488 #[doc = "0x1228 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
489 pub tcd17_nbytes_mlno: TCD17_NBYTES_MLNO,
490 #[doc = "0x122c - TCD Last Source Address Adjustment"]
491 pub tcd17_slast: TCD17_SLAST,
492 #[doc = "0x1230 - TCD Destination Address"]
493 pub tcd17_daddr: TCD17_DADDR,
494 #[doc = "0x1234 - TCD Signed Destination Address Offset"]
495 pub tcd17_doff: TCD17_DOFF,
496 #[doc = "0x1236 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
497 pub tcd17_citer_elinkno: TCD17_CITER_ELINKNO,
498 #[doc = "0x1238 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
499 pub tcd17_dlastsga: TCD17_DLASTSGA,
500 #[doc = "0x123c - TCD Control and Status"]
501 pub tcd17_csr: TCD17_CSR,
502 #[doc = "0x123e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
503 pub tcd17_biter_elinkno: TCD17_BITER_ELINKNO,
504 #[doc = "0x1240 - TCD Source Address"]
505 pub tcd18_saddr: TCD18_SADDR,
506 #[doc = "0x1244 - TCD Signed Source Address Offset"]
507 pub tcd18_soff: TCD18_SOFF,
508 #[doc = "0x1246 - TCD Transfer Attributes"]
509 pub tcd18_attr: TCD18_ATTR,
510 #[doc = "0x1248 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
511 pub tcd18_nbytes_mlno: TCD18_NBYTES_MLNO,
512 #[doc = "0x124c - TCD Last Source Address Adjustment"]
513 pub tcd18_slast: TCD18_SLAST,
514 #[doc = "0x1250 - TCD Destination Address"]
515 pub tcd18_daddr: TCD18_DADDR,
516 #[doc = "0x1254 - TCD Signed Destination Address Offset"]
517 pub tcd18_doff: TCD18_DOFF,
518 #[doc = "0x1256 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
519 pub tcd18_citer_elinkno: TCD18_CITER_ELINKNO,
520 #[doc = "0x1258 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
521 pub tcd18_dlastsga: TCD18_DLASTSGA,
522 #[doc = "0x125c - TCD Control and Status"]
523 pub tcd18_csr: TCD18_CSR,
524 #[doc = "0x125e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
525 pub tcd18_biter_elinkno: TCD18_BITER_ELINKNO,
526 #[doc = "0x1260 - TCD Source Address"]
527 pub tcd19_saddr: TCD19_SADDR,
528 #[doc = "0x1264 - TCD Signed Source Address Offset"]
529 pub tcd19_soff: TCD19_SOFF,
530 #[doc = "0x1266 - TCD Transfer Attributes"]
531 pub tcd19_attr: TCD19_ATTR,
532 #[doc = "0x1268 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
533 pub tcd19_nbytes_mlno: TCD19_NBYTES_MLNO,
534 #[doc = "0x126c - TCD Last Source Address Adjustment"]
535 pub tcd19_slast: TCD19_SLAST,
536 #[doc = "0x1270 - TCD Destination Address"]
537 pub tcd19_daddr: TCD19_DADDR,
538 #[doc = "0x1274 - TCD Signed Destination Address Offset"]
539 pub tcd19_doff: TCD19_DOFF,
540 #[doc = "0x1276 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
541 pub tcd19_citer_elinkno: TCD19_CITER_ELINKNO,
542 #[doc = "0x1278 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
543 pub tcd19_dlastsga: TCD19_DLASTSGA,
544 #[doc = "0x127c - TCD Control and Status"]
545 pub tcd19_csr: TCD19_CSR,
546 #[doc = "0x127e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
547 pub tcd19_biter_elinkno: TCD19_BITER_ELINKNO,
548 #[doc = "0x1280 - TCD Source Address"]
549 pub tcd20_saddr: TCD20_SADDR,
550 #[doc = "0x1284 - TCD Signed Source Address Offset"]
551 pub tcd20_soff: TCD20_SOFF,
552 #[doc = "0x1286 - TCD Transfer Attributes"]
553 pub tcd20_attr: TCD20_ATTR,
554 #[doc = "0x1288 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
555 pub tcd20_nbytes_mlno: TCD20_NBYTES_MLNO,
556 #[doc = "0x128c - TCD Last Source Address Adjustment"]
557 pub tcd20_slast: TCD20_SLAST,
558 #[doc = "0x1290 - TCD Destination Address"]
559 pub tcd20_daddr: TCD20_DADDR,
560 #[doc = "0x1294 - TCD Signed Destination Address Offset"]
561 pub tcd20_doff: TCD20_DOFF,
562 #[doc = "0x1296 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
563 pub tcd20_citer_elinkno: TCD20_CITER_ELINKNO,
564 #[doc = "0x1298 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
565 pub tcd20_dlastsga: TCD20_DLASTSGA,
566 #[doc = "0x129c - TCD Control and Status"]
567 pub tcd20_csr: TCD20_CSR,
568 #[doc = "0x129e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
569 pub tcd20_biter_elinkno: TCD20_BITER_ELINKNO,
570 #[doc = "0x12a0 - TCD Source Address"]
571 pub tcd21_saddr: TCD21_SADDR,
572 #[doc = "0x12a4 - TCD Signed Source Address Offset"]
573 pub tcd21_soff: TCD21_SOFF,
574 #[doc = "0x12a6 - TCD Transfer Attributes"]
575 pub tcd21_attr: TCD21_ATTR,
576 #[doc = "0x12a8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
577 pub tcd21_nbytes_mlno: TCD21_NBYTES_MLNO,
578 #[doc = "0x12ac - TCD Last Source Address Adjustment"]
579 pub tcd21_slast: TCD21_SLAST,
580 #[doc = "0x12b0 - TCD Destination Address"]
581 pub tcd21_daddr: TCD21_DADDR,
582 #[doc = "0x12b4 - TCD Signed Destination Address Offset"]
583 pub tcd21_doff: TCD21_DOFF,
584 #[doc = "0x12b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
585 pub tcd21_citer_elinkno: TCD21_CITER_ELINKNO,
586 #[doc = "0x12b8 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
587 pub tcd21_dlastsga: TCD21_DLASTSGA,
588 #[doc = "0x12bc - TCD Control and Status"]
589 pub tcd21_csr: TCD21_CSR,
590 #[doc = "0x12be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
591 pub tcd21_biter_elinkno: TCD21_BITER_ELINKNO,
592 #[doc = "0x12c0 - TCD Source Address"]
593 pub tcd22_saddr: TCD22_SADDR,
594 #[doc = "0x12c4 - TCD Signed Source Address Offset"]
595 pub tcd22_soff: TCD22_SOFF,
596 #[doc = "0x12c6 - TCD Transfer Attributes"]
597 pub tcd22_attr: TCD22_ATTR,
598 #[doc = "0x12c8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
599 pub tcd22_nbytes_mlno: TCD22_NBYTES_MLNO,
600 #[doc = "0x12cc - TCD Last Source Address Adjustment"]
601 pub tcd22_slast: TCD22_SLAST,
602 #[doc = "0x12d0 - TCD Destination Address"]
603 pub tcd22_daddr: TCD22_DADDR,
604 #[doc = "0x12d4 - TCD Signed Destination Address Offset"]
605 pub tcd22_doff: TCD22_DOFF,
606 #[doc = "0x12d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
607 pub tcd22_citer_elinkno: TCD22_CITER_ELINKNO,
608 #[doc = "0x12d8 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
609 pub tcd22_dlastsga: TCD22_DLASTSGA,
610 #[doc = "0x12dc - TCD Control and Status"]
611 pub tcd22_csr: TCD22_CSR,
612 #[doc = "0x12de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
613 pub tcd22_biter_elinkno: TCD22_BITER_ELINKNO,
614 #[doc = "0x12e0 - TCD Source Address"]
615 pub tcd23_saddr: TCD23_SADDR,
616 #[doc = "0x12e4 - TCD Signed Source Address Offset"]
617 pub tcd23_soff: TCD23_SOFF,
618 #[doc = "0x12e6 - TCD Transfer Attributes"]
619 pub tcd23_attr: TCD23_ATTR,
620 #[doc = "0x12e8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
621 pub tcd23_nbytes_mlno: TCD23_NBYTES_MLNO,
622 #[doc = "0x12ec - TCD Last Source Address Adjustment"]
623 pub tcd23_slast: TCD23_SLAST,
624 #[doc = "0x12f0 - TCD Destination Address"]
625 pub tcd23_daddr: TCD23_DADDR,
626 #[doc = "0x12f4 - TCD Signed Destination Address Offset"]
627 pub tcd23_doff: TCD23_DOFF,
628 #[doc = "0x12f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
629 pub tcd23_citer_elinkno: TCD23_CITER_ELINKNO,
630 #[doc = "0x12f8 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
631 pub tcd23_dlastsga: TCD23_DLASTSGA,
632 #[doc = "0x12fc - TCD Control and Status"]
633 pub tcd23_csr: TCD23_CSR,
634 #[doc = "0x12fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
635 pub tcd23_biter_elinkno: TCD23_BITER_ELINKNO,
636 #[doc = "0x1300 - TCD Source Address"]
637 pub tcd24_saddr: TCD24_SADDR,
638 #[doc = "0x1304 - TCD Signed Source Address Offset"]
639 pub tcd24_soff: TCD24_SOFF,
640 #[doc = "0x1306 - TCD Transfer Attributes"]
641 pub tcd24_attr: TCD24_ATTR,
642 #[doc = "0x1308 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
643 pub tcd24_nbytes_mlno: TCD24_NBYTES_MLNO,
644 #[doc = "0x130c - TCD Last Source Address Adjustment"]
645 pub tcd24_slast: TCD24_SLAST,
646 #[doc = "0x1310 - TCD Destination Address"]
647 pub tcd24_daddr: TCD24_DADDR,
648 #[doc = "0x1314 - TCD Signed Destination Address Offset"]
649 pub tcd24_doff: TCD24_DOFF,
650 #[doc = "0x1316 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
651 pub tcd24_citer_elinkno: TCD24_CITER_ELINKNO,
652 #[doc = "0x1318 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
653 pub tcd24_dlastsga: TCD24_DLASTSGA,
654 #[doc = "0x131c - TCD Control and Status"]
655 pub tcd24_csr: TCD24_CSR,
656 #[doc = "0x131e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
657 pub tcd24_biter_elinkno: TCD24_BITER_ELINKNO,
658 #[doc = "0x1320 - TCD Source Address"]
659 pub tcd25_saddr: TCD25_SADDR,
660 #[doc = "0x1324 - TCD Signed Source Address Offset"]
661 pub tcd25_soff: TCD25_SOFF,
662 #[doc = "0x1326 - TCD Transfer Attributes"]
663 pub tcd25_attr: TCD25_ATTR,
664 #[doc = "0x1328 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
665 pub tcd25_nbytes_mlno: TCD25_NBYTES_MLNO,
666 #[doc = "0x132c - TCD Last Source Address Adjustment"]
667 pub tcd25_slast: TCD25_SLAST,
668 #[doc = "0x1330 - TCD Destination Address"]
669 pub tcd25_daddr: TCD25_DADDR,
670 #[doc = "0x1334 - TCD Signed Destination Address Offset"]
671 pub tcd25_doff: TCD25_DOFF,
672 #[doc = "0x1336 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
673 pub tcd25_citer_elinkno: TCD25_CITER_ELINKNO,
674 #[doc = "0x1338 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
675 pub tcd25_dlastsga: TCD25_DLASTSGA,
676 #[doc = "0x133c - TCD Control and Status"]
677 pub tcd25_csr: TCD25_CSR,
678 #[doc = "0x133e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
679 pub tcd25_biter_elinkno: TCD25_BITER_ELINKNO,
680 #[doc = "0x1340 - TCD Source Address"]
681 pub tcd26_saddr: TCD26_SADDR,
682 #[doc = "0x1344 - TCD Signed Source Address Offset"]
683 pub tcd26_soff: TCD26_SOFF,
684 #[doc = "0x1346 - TCD Transfer Attributes"]
685 pub tcd26_attr: TCD26_ATTR,
686 #[doc = "0x1348 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
687 pub tcd26_nbytes_mlno: TCD26_NBYTES_MLNO,
688 #[doc = "0x134c - TCD Last Source Address Adjustment"]
689 pub tcd26_slast: TCD26_SLAST,
690 #[doc = "0x1350 - TCD Destination Address"]
691 pub tcd26_daddr: TCD26_DADDR,
692 #[doc = "0x1354 - TCD Signed Destination Address Offset"]
693 pub tcd26_doff: TCD26_DOFF,
694 #[doc = "0x1356 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
695 pub tcd26_citer_elinkno: TCD26_CITER_ELINKNO,
696 #[doc = "0x1358 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
697 pub tcd26_dlastsga: TCD26_DLASTSGA,
698 #[doc = "0x135c - TCD Control and Status"]
699 pub tcd26_csr: TCD26_CSR,
700 #[doc = "0x135e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
701 pub tcd26_biter_elinkno: TCD26_BITER_ELINKNO,
702 #[doc = "0x1360 - TCD Source Address"]
703 pub tcd27_saddr: TCD27_SADDR,
704 #[doc = "0x1364 - TCD Signed Source Address Offset"]
705 pub tcd27_soff: TCD27_SOFF,
706 #[doc = "0x1366 - TCD Transfer Attributes"]
707 pub tcd27_attr: TCD27_ATTR,
708 #[doc = "0x1368 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
709 pub tcd27_nbytes_mlno: TCD27_NBYTES_MLNO,
710 #[doc = "0x136c - TCD Last Source Address Adjustment"]
711 pub tcd27_slast: TCD27_SLAST,
712 #[doc = "0x1370 - TCD Destination Address"]
713 pub tcd27_daddr: TCD27_DADDR,
714 #[doc = "0x1374 - TCD Signed Destination Address Offset"]
715 pub tcd27_doff: TCD27_DOFF,
716 #[doc = "0x1376 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
717 pub tcd27_citer_elinkno: TCD27_CITER_ELINKNO,
718 #[doc = "0x1378 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
719 pub tcd27_dlastsga: TCD27_DLASTSGA,
720 #[doc = "0x137c - TCD Control and Status"]
721 pub tcd27_csr: TCD27_CSR,
722 #[doc = "0x137e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
723 pub tcd27_biter_elinkno: TCD27_BITER_ELINKNO,
724 #[doc = "0x1380 - TCD Source Address"]
725 pub tcd28_saddr: TCD28_SADDR,
726 #[doc = "0x1384 - TCD Signed Source Address Offset"]
727 pub tcd28_soff: TCD28_SOFF,
728 #[doc = "0x1386 - TCD Transfer Attributes"]
729 pub tcd28_attr: TCD28_ATTR,
730 #[doc = "0x1388 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
731 pub tcd28_nbytes_mlno: TCD28_NBYTES_MLNO,
732 #[doc = "0x138c - TCD Last Source Address Adjustment"]
733 pub tcd28_slast: TCD28_SLAST,
734 #[doc = "0x1390 - TCD Destination Address"]
735 pub tcd28_daddr: TCD28_DADDR,
736 #[doc = "0x1394 - TCD Signed Destination Address Offset"]
737 pub tcd28_doff: TCD28_DOFF,
738 #[doc = "0x1396 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
739 pub tcd28_citer_elinkno: TCD28_CITER_ELINKNO,
740 #[doc = "0x1398 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
741 pub tcd28_dlastsga: TCD28_DLASTSGA,
742 #[doc = "0x139c - TCD Control and Status"]
743 pub tcd28_csr: TCD28_CSR,
744 #[doc = "0x139e - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
745 pub tcd28_biter_elinkno: TCD28_BITER_ELINKNO,
746 #[doc = "0x13a0 - TCD Source Address"]
747 pub tcd29_saddr: TCD29_SADDR,
748 #[doc = "0x13a4 - TCD Signed Source Address Offset"]
749 pub tcd29_soff: TCD29_SOFF,
750 #[doc = "0x13a6 - TCD Transfer Attributes"]
751 pub tcd29_attr: TCD29_ATTR,
752 #[doc = "0x13a8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
753 pub tcd29_nbytes_mlno: TCD29_NBYTES_MLNO,
754 #[doc = "0x13ac - TCD Last Source Address Adjustment"]
755 pub tcd29_slast: TCD29_SLAST,
756 #[doc = "0x13b0 - TCD Destination Address"]
757 pub tcd29_daddr: TCD29_DADDR,
758 #[doc = "0x13b4 - TCD Signed Destination Address Offset"]
759 pub tcd29_doff: TCD29_DOFF,
760 #[doc = "0x13b6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
761 pub tcd29_citer_elinkno: TCD29_CITER_ELINKNO,
762 #[doc = "0x13b8 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
763 pub tcd29_dlastsga: TCD29_DLASTSGA,
764 #[doc = "0x13bc - TCD Control and Status"]
765 pub tcd29_csr: TCD29_CSR,
766 #[doc = "0x13be - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
767 pub tcd29_biter_elinkno: TCD29_BITER_ELINKNO,
768 #[doc = "0x13c0 - TCD Source Address"]
769 pub tcd30_saddr: TCD30_SADDR,
770 #[doc = "0x13c4 - TCD Signed Source Address Offset"]
771 pub tcd30_soff: TCD30_SOFF,
772 #[doc = "0x13c6 - TCD Transfer Attributes"]
773 pub tcd30_attr: TCD30_ATTR,
774 #[doc = "0x13c8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
775 pub tcd30_nbytes_mlno: TCD30_NBYTES_MLNO,
776 #[doc = "0x13cc - TCD Last Source Address Adjustment"]
777 pub tcd30_slast: TCD30_SLAST,
778 #[doc = "0x13d0 - TCD Destination Address"]
779 pub tcd30_daddr: TCD30_DADDR,
780 #[doc = "0x13d4 - TCD Signed Destination Address Offset"]
781 pub tcd30_doff: TCD30_DOFF,
782 #[doc = "0x13d6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
783 pub tcd30_citer_elinkno: TCD30_CITER_ELINKNO,
784 #[doc = "0x13d8 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
785 pub tcd30_dlastsga: TCD30_DLASTSGA,
786 #[doc = "0x13dc - TCD Control and Status"]
787 pub tcd30_csr: TCD30_CSR,
788 #[doc = "0x13de - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
789 pub tcd30_biter_elinkno: TCD30_BITER_ELINKNO,
790 #[doc = "0x13e0 - TCD Source Address"]
791 pub tcd31_saddr: TCD31_SADDR,
792 #[doc = "0x13e4 - TCD Signed Source Address Offset"]
793 pub tcd31_soff: TCD31_SOFF,
794 #[doc = "0x13e6 - TCD Transfer Attributes"]
795 pub tcd31_attr: TCD31_ATTR,
796 #[doc = "0x13e8 - TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
797 pub tcd31_nbytes_mlno: TCD31_NBYTES_MLNO,
798 #[doc = "0x13ec - TCD Last Source Address Adjustment"]
799 pub tcd31_slast: TCD31_SLAST,
800 #[doc = "0x13f0 - TCD Destination Address"]
801 pub tcd31_daddr: TCD31_DADDR,
802 #[doc = "0x13f4 - TCD Signed Destination Address Offset"]
803 pub tcd31_doff: TCD31_DOFF,
804 #[doc = "0x13f6 - TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
805 pub tcd31_citer_elinkno: TCD31_CITER_ELINKNO,
806 #[doc = "0x13f8 - TCD Last Destination Address Adjustment/Scatter Gather Address"]
807 pub tcd31_dlastsga: TCD31_DLASTSGA,
808 #[doc = "0x13fc - TCD Control and Status"]
809 pub tcd31_csr: TCD31_CSR,
810 #[doc = "0x13fe - TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
811 pub tcd31_biter_elinkno: TCD31_BITER_ELINKNO,
812}
813#[doc = "Control Register"]
814pub struct CR {
815 register: VolatileCell<u32>,
816}
817#[doc = "Control Register"]
818pub mod cr;
819#[doc = "Error Status Register"]
820pub struct ES {
821 register: VolatileCell<u32>,
822}
823#[doc = "Error Status Register"]
824pub mod es;
825#[doc = "Enable Request Register"]
826pub struct ERQ {
827 register: VolatileCell<u32>,
828}
829#[doc = "Enable Request Register"]
830pub mod erq;
831#[doc = "Enable Error Interrupt Register"]
832pub struct EEI {
833 register: VolatileCell<u32>,
834}
835#[doc = "Enable Error Interrupt Register"]
836pub mod eei;
837#[doc = "Clear Enable Error Interrupt Register"]
838pub struct CEEI {
839 register: VolatileCell<u8>,
840}
841#[doc = "Clear Enable Error Interrupt Register"]
842pub mod ceei;
843#[doc = "Set Enable Error Interrupt Register"]
844pub struct SEEI {
845 register: VolatileCell<u8>,
846}
847#[doc = "Set Enable Error Interrupt Register"]
848pub mod seei;
849#[doc = "Clear Enable Request Register"]
850pub struct CERQ {
851 register: VolatileCell<u8>,
852}
853#[doc = "Clear Enable Request Register"]
854pub mod cerq;
855#[doc = "Set Enable Request Register"]
856pub struct SERQ {
857 register: VolatileCell<u8>,
858}
859#[doc = "Set Enable Request Register"]
860pub mod serq;
861#[doc = "Clear DONE Status Bit Register"]
862pub struct CDNE {
863 register: VolatileCell<u8>,
864}
865#[doc = "Clear DONE Status Bit Register"]
866pub mod cdne;
867#[doc = "Set START Bit Register"]
868pub struct SSRT {
869 register: VolatileCell<u8>,
870}
871#[doc = "Set START Bit Register"]
872pub mod ssrt;
873#[doc = "Clear Error Register"]
874pub struct CERR {
875 register: VolatileCell<u8>,
876}
877#[doc = "Clear Error Register"]
878pub mod cerr;
879#[doc = "Clear Interrupt Request Register"]
880pub struct CINT {
881 register: VolatileCell<u8>,
882}
883#[doc = "Clear Interrupt Request Register"]
884pub mod cint;
885#[doc = "Interrupt Request Register"]
886pub struct INT {
887 register: VolatileCell<u32>,
888}
889#[doc = "Interrupt Request Register"]
890pub mod int;
891#[doc = "Error Register"]
892pub struct ERR {
893 register: VolatileCell<u32>,
894}
895#[doc = "Error Register"]
896pub mod err;
897#[doc = "Hardware Request Status Register"]
898pub struct HRS {
899 register: VolatileCell<u32>,
900}
901#[doc = "Hardware Request Status Register"]
902pub mod hrs;
903#[doc = "Enable Asynchronous Request in Stop Register"]
904pub struct EARS {
905 register: VolatileCell<u32>,
906}
907#[doc = "Enable Asynchronous Request in Stop Register"]
908pub mod ears;
909#[doc = "Channel n Priority Register"]
910pub struct DCHPRI3 {
911 register: VolatileCell<u8>,
912}
913#[doc = "Channel n Priority Register"]
914pub mod dchpri3;
915#[doc = "Channel n Priority Register"]
916pub struct DCHPRI2 {
917 register: VolatileCell<u8>,
918}
919#[doc = "Channel n Priority Register"]
920pub mod dchpri2;
921#[doc = "Channel n Priority Register"]
922pub struct DCHPRI1 {
923 register: VolatileCell<u8>,
924}
925#[doc = "Channel n Priority Register"]
926pub mod dchpri1;
927#[doc = "Channel n Priority Register"]
928pub struct DCHPRI0 {
929 register: VolatileCell<u8>,
930}
931#[doc = "Channel n Priority Register"]
932pub mod dchpri0;
933#[doc = "Channel n Priority Register"]
934pub struct DCHPRI7 {
935 register: VolatileCell<u8>,
936}
937#[doc = "Channel n Priority Register"]
938pub mod dchpri7;
939#[doc = "Channel n Priority Register"]
940pub struct DCHPRI6 {
941 register: VolatileCell<u8>,
942}
943#[doc = "Channel n Priority Register"]
944pub mod dchpri6;
945#[doc = "Channel n Priority Register"]
946pub struct DCHPRI5 {
947 register: VolatileCell<u8>,
948}
949#[doc = "Channel n Priority Register"]
950pub mod dchpri5;
951#[doc = "Channel n Priority Register"]
952pub struct DCHPRI4 {
953 register: VolatileCell<u8>,
954}
955#[doc = "Channel n Priority Register"]
956pub mod dchpri4;
957#[doc = "Channel n Priority Register"]
958pub struct DCHPRI11 {
959 register: VolatileCell<u8>,
960}
961#[doc = "Channel n Priority Register"]
962pub mod dchpri11;
963#[doc = "Channel n Priority Register"]
964pub struct DCHPRI10 {
965 register: VolatileCell<u8>,
966}
967#[doc = "Channel n Priority Register"]
968pub mod dchpri10;
969#[doc = "Channel n Priority Register"]
970pub struct DCHPRI9 {
971 register: VolatileCell<u8>,
972}
973#[doc = "Channel n Priority Register"]
974pub mod dchpri9;
975#[doc = "Channel n Priority Register"]
976pub struct DCHPRI8 {
977 register: VolatileCell<u8>,
978}
979#[doc = "Channel n Priority Register"]
980pub mod dchpri8;
981#[doc = "Channel n Priority Register"]
982pub struct DCHPRI15 {
983 register: VolatileCell<u8>,
984}
985#[doc = "Channel n Priority Register"]
986pub mod dchpri15;
987#[doc = "Channel n Priority Register"]
988pub struct DCHPRI14 {
989 register: VolatileCell<u8>,
990}
991#[doc = "Channel n Priority Register"]
992pub mod dchpri14;
993#[doc = "Channel n Priority Register"]
994pub struct DCHPRI13 {
995 register: VolatileCell<u8>,
996}
997#[doc = "Channel n Priority Register"]
998pub mod dchpri13;
999#[doc = "Channel n Priority Register"]
1000pub struct DCHPRI12 {
1001 register: VolatileCell<u8>,
1002}
1003#[doc = "Channel n Priority Register"]
1004pub mod dchpri12;
1005#[doc = "Channel n Priority Register"]
1006pub struct DCHPRI19 {
1007 register: VolatileCell<u8>,
1008}
1009#[doc = "Channel n Priority Register"]
1010pub mod dchpri19;
1011#[doc = "Channel n Priority Register"]
1012pub struct DCHPRI18 {
1013 register: VolatileCell<u8>,
1014}
1015#[doc = "Channel n Priority Register"]
1016pub mod dchpri18;
1017#[doc = "Channel n Priority Register"]
1018pub struct DCHPRI17 {
1019 register: VolatileCell<u8>,
1020}
1021#[doc = "Channel n Priority Register"]
1022pub mod dchpri17;
1023#[doc = "Channel n Priority Register"]
1024pub struct DCHPRI16 {
1025 register: VolatileCell<u8>,
1026}
1027#[doc = "Channel n Priority Register"]
1028pub mod dchpri16;
1029#[doc = "Channel n Priority Register"]
1030pub struct DCHPRI23 {
1031 register: VolatileCell<u8>,
1032}
1033#[doc = "Channel n Priority Register"]
1034pub mod dchpri23;
1035#[doc = "Channel n Priority Register"]
1036pub struct DCHPRI22 {
1037 register: VolatileCell<u8>,
1038}
1039#[doc = "Channel n Priority Register"]
1040pub mod dchpri22;
1041#[doc = "Channel n Priority Register"]
1042pub struct DCHPRI21 {
1043 register: VolatileCell<u8>,
1044}
1045#[doc = "Channel n Priority Register"]
1046pub mod dchpri21;
1047#[doc = "Channel n Priority Register"]
1048pub struct DCHPRI20 {
1049 register: VolatileCell<u8>,
1050}
1051#[doc = "Channel n Priority Register"]
1052pub mod dchpri20;
1053#[doc = "Channel n Priority Register"]
1054pub struct DCHPRI27 {
1055 register: VolatileCell<u8>,
1056}
1057#[doc = "Channel n Priority Register"]
1058pub mod dchpri27;
1059#[doc = "Channel n Priority Register"]
1060pub struct DCHPRI26 {
1061 register: VolatileCell<u8>,
1062}
1063#[doc = "Channel n Priority Register"]
1064pub mod dchpri26;
1065#[doc = "Channel n Priority Register"]
1066pub struct DCHPRI25 {
1067 register: VolatileCell<u8>,
1068}
1069#[doc = "Channel n Priority Register"]
1070pub mod dchpri25;
1071#[doc = "Channel n Priority Register"]
1072pub struct DCHPRI24 {
1073 register: VolatileCell<u8>,
1074}
1075#[doc = "Channel n Priority Register"]
1076pub mod dchpri24;
1077#[doc = "Channel n Priority Register"]
1078pub struct DCHPRI31 {
1079 register: VolatileCell<u8>,
1080}
1081#[doc = "Channel n Priority Register"]
1082pub mod dchpri31;
1083#[doc = "Channel n Priority Register"]
1084pub struct DCHPRI30 {
1085 register: VolatileCell<u8>,
1086}
1087#[doc = "Channel n Priority Register"]
1088pub mod dchpri30;
1089#[doc = "Channel n Priority Register"]
1090pub struct DCHPRI29 {
1091 register: VolatileCell<u8>,
1092}
1093#[doc = "Channel n Priority Register"]
1094pub mod dchpri29;
1095#[doc = "Channel n Priority Register"]
1096pub struct DCHPRI28 {
1097 register: VolatileCell<u8>,
1098}
1099#[doc = "Channel n Priority Register"]
1100pub mod dchpri28;
1101#[doc = "TCD Source Address"]
1102pub struct TCD0_SADDR {
1103 register: VolatileCell<u32>,
1104}
1105#[doc = "TCD Source Address"]
1106pub mod tcd0_saddr;
1107#[doc = "TCD Signed Source Address Offset"]
1108pub struct TCD0_SOFF {
1109 register: VolatileCell<u16>,
1110}
1111#[doc = "TCD Signed Source Address Offset"]
1112pub mod tcd0_soff;
1113#[doc = "TCD Transfer Attributes"]
1114pub struct TCD0_ATTR {
1115 register: VolatileCell<u16>,
1116}
1117#[doc = "TCD Transfer Attributes"]
1118pub mod tcd0_attr;
1119#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1120pub struct TCD0_NBYTES_MLNO {
1121 register: VolatileCell<u32>,
1122}
1123#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1124pub mod tcd0_nbytes_mlno;
1125#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1126pub struct TCD0_NBYTES_MLOFFNO {
1127 register: VolatileCell<u32>,
1128}
1129#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1130pub mod tcd0_nbytes_mloffno;
1131#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1132pub struct TCD0_NBYTES_MLOFFYES {
1133 register: VolatileCell<u32>,
1134}
1135#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1136pub mod tcd0_nbytes_mloffyes;
1137#[doc = "TCD Last Source Address Adjustment"]
1138pub struct TCD0_SLAST {
1139 register: VolatileCell<u32>,
1140}
1141#[doc = "TCD Last Source Address Adjustment"]
1142pub mod tcd0_slast;
1143#[doc = "TCD Destination Address"]
1144pub struct TCD0_DADDR {
1145 register: VolatileCell<u32>,
1146}
1147#[doc = "TCD Destination Address"]
1148pub mod tcd0_daddr;
1149#[doc = "TCD Signed Destination Address Offset"]
1150pub struct TCD0_DOFF {
1151 register: VolatileCell<u16>,
1152}
1153#[doc = "TCD Signed Destination Address Offset"]
1154pub mod tcd0_doff;
1155#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1156pub struct TCD0_CITER_ELINKNO {
1157 register: VolatileCell<u16>,
1158}
1159#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1160pub mod tcd0_citer_elinkno;
1161#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1162pub struct TCD0_CITER_ELINKYES {
1163 register: VolatileCell<u16>,
1164}
1165#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1166pub mod tcd0_citer_elinkyes;
1167#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1168pub struct TCD0_DLASTSGA {
1169 register: VolatileCell<u32>,
1170}
1171#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1172pub mod tcd0_dlastsga;
1173#[doc = "TCD Control and Status"]
1174pub struct TCD0_CSR {
1175 register: VolatileCell<u16>,
1176}
1177#[doc = "TCD Control and Status"]
1178pub mod tcd0_csr;
1179#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1180pub struct TCD0_BITER_ELINKNO {
1181 register: VolatileCell<u16>,
1182}
1183#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1184pub mod tcd0_biter_elinkno;
1185#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1186pub struct TCD0_BITER_ELINKYES {
1187 register: VolatileCell<u16>,
1188}
1189#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1190pub mod tcd0_biter_elinkyes;
1191#[doc = "TCD Source Address"]
1192pub struct TCD1_SADDR {
1193 register: VolatileCell<u32>,
1194}
1195#[doc = "TCD Source Address"]
1196pub mod tcd1_saddr;
1197#[doc = "TCD Signed Source Address Offset"]
1198pub struct TCD1_SOFF {
1199 register: VolatileCell<u16>,
1200}
1201#[doc = "TCD Signed Source Address Offset"]
1202pub mod tcd1_soff;
1203#[doc = "TCD Transfer Attributes"]
1204pub struct TCD1_ATTR {
1205 register: VolatileCell<u16>,
1206}
1207#[doc = "TCD Transfer Attributes"]
1208pub mod tcd1_attr;
1209#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1210pub struct TCD1_NBYTES_MLNO {
1211 register: VolatileCell<u32>,
1212}
1213#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1214pub mod tcd1_nbytes_mlno;
1215#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1216pub struct TCD1_NBYTES_MLOFFNO {
1217 register: VolatileCell<u32>,
1218}
1219#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1220pub mod tcd1_nbytes_mloffno;
1221#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1222pub struct TCD1_NBYTES_MLOFFYES {
1223 register: VolatileCell<u32>,
1224}
1225#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1226pub mod tcd1_nbytes_mloffyes;
1227#[doc = "TCD Last Source Address Adjustment"]
1228pub struct TCD1_SLAST {
1229 register: VolatileCell<u32>,
1230}
1231#[doc = "TCD Last Source Address Adjustment"]
1232pub mod tcd1_slast;
1233#[doc = "TCD Destination Address"]
1234pub struct TCD1_DADDR {
1235 register: VolatileCell<u32>,
1236}
1237#[doc = "TCD Destination Address"]
1238pub mod tcd1_daddr;
1239#[doc = "TCD Signed Destination Address Offset"]
1240pub struct TCD1_DOFF {
1241 register: VolatileCell<u16>,
1242}
1243#[doc = "TCD Signed Destination Address Offset"]
1244pub mod tcd1_doff;
1245#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1246pub struct TCD1_CITER_ELINKNO {
1247 register: VolatileCell<u16>,
1248}
1249#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1250pub mod tcd1_citer_elinkno;
1251#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1252pub struct TCD1_CITER_ELINKYES {
1253 register: VolatileCell<u16>,
1254}
1255#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1256pub mod tcd1_citer_elinkyes;
1257#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1258pub struct TCD1_DLASTSGA {
1259 register: VolatileCell<u32>,
1260}
1261#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1262pub mod tcd1_dlastsga;
1263#[doc = "TCD Control and Status"]
1264pub struct TCD1_CSR {
1265 register: VolatileCell<u16>,
1266}
1267#[doc = "TCD Control and Status"]
1268pub mod tcd1_csr;
1269#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1270pub struct TCD1_BITER_ELINKNO {
1271 register: VolatileCell<u16>,
1272}
1273#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1274pub mod tcd1_biter_elinkno;
1275#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1276pub struct TCD1_BITER_ELINKYES {
1277 register: VolatileCell<u16>,
1278}
1279#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1280pub mod tcd1_biter_elinkyes;
1281#[doc = "TCD Source Address"]
1282pub struct TCD2_SADDR {
1283 register: VolatileCell<u32>,
1284}
1285#[doc = "TCD Source Address"]
1286pub mod tcd2_saddr;
1287#[doc = "TCD Signed Source Address Offset"]
1288pub struct TCD2_SOFF {
1289 register: VolatileCell<u16>,
1290}
1291#[doc = "TCD Signed Source Address Offset"]
1292pub mod tcd2_soff;
1293#[doc = "TCD Transfer Attributes"]
1294pub struct TCD2_ATTR {
1295 register: VolatileCell<u16>,
1296}
1297#[doc = "TCD Transfer Attributes"]
1298pub mod tcd2_attr;
1299#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1300pub struct TCD2_NBYTES_MLNO {
1301 register: VolatileCell<u32>,
1302}
1303#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1304pub mod tcd2_nbytes_mlno;
1305#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1306pub struct TCD2_NBYTES_MLOFFNO {
1307 register: VolatileCell<u32>,
1308}
1309#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1310pub mod tcd2_nbytes_mloffno;
1311#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1312pub struct TCD2_NBYTES_MLOFFYES {
1313 register: VolatileCell<u32>,
1314}
1315#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1316pub mod tcd2_nbytes_mloffyes;
1317#[doc = "TCD Last Source Address Adjustment"]
1318pub struct TCD2_SLAST {
1319 register: VolatileCell<u32>,
1320}
1321#[doc = "TCD Last Source Address Adjustment"]
1322pub mod tcd2_slast;
1323#[doc = "TCD Destination Address"]
1324pub struct TCD2_DADDR {
1325 register: VolatileCell<u32>,
1326}
1327#[doc = "TCD Destination Address"]
1328pub mod tcd2_daddr;
1329#[doc = "TCD Signed Destination Address Offset"]
1330pub struct TCD2_DOFF {
1331 register: VolatileCell<u16>,
1332}
1333#[doc = "TCD Signed Destination Address Offset"]
1334pub mod tcd2_doff;
1335#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1336pub struct TCD2_CITER_ELINKNO {
1337 register: VolatileCell<u16>,
1338}
1339#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1340pub mod tcd2_citer_elinkno;
1341#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1342pub struct TCD2_CITER_ELINKYES {
1343 register: VolatileCell<u16>,
1344}
1345#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1346pub mod tcd2_citer_elinkyes;
1347#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1348pub struct TCD2_DLASTSGA {
1349 register: VolatileCell<u32>,
1350}
1351#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1352pub mod tcd2_dlastsga;
1353#[doc = "TCD Control and Status"]
1354pub struct TCD2_CSR {
1355 register: VolatileCell<u16>,
1356}
1357#[doc = "TCD Control and Status"]
1358pub mod tcd2_csr;
1359#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1360pub struct TCD2_BITER_ELINKNO {
1361 register: VolatileCell<u16>,
1362}
1363#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1364pub mod tcd2_biter_elinkno;
1365#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1366pub struct TCD2_BITER_ELINKYES {
1367 register: VolatileCell<u16>,
1368}
1369#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1370pub mod tcd2_biter_elinkyes;
1371#[doc = "TCD Source Address"]
1372pub struct TCD3_SADDR {
1373 register: VolatileCell<u32>,
1374}
1375#[doc = "TCD Source Address"]
1376pub mod tcd3_saddr;
1377#[doc = "TCD Signed Source Address Offset"]
1378pub struct TCD3_SOFF {
1379 register: VolatileCell<u16>,
1380}
1381#[doc = "TCD Signed Source Address Offset"]
1382pub mod tcd3_soff;
1383#[doc = "TCD Transfer Attributes"]
1384pub struct TCD3_ATTR {
1385 register: VolatileCell<u16>,
1386}
1387#[doc = "TCD Transfer Attributes"]
1388pub mod tcd3_attr;
1389#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1390pub struct TCD3_NBYTES_MLNO {
1391 register: VolatileCell<u32>,
1392}
1393#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1394pub mod tcd3_nbytes_mlno;
1395#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1396pub struct TCD3_NBYTES_MLOFFNO {
1397 register: VolatileCell<u32>,
1398}
1399#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1400pub mod tcd3_nbytes_mloffno;
1401#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1402pub struct TCD3_NBYTES_MLOFFYES {
1403 register: VolatileCell<u32>,
1404}
1405#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1406pub mod tcd3_nbytes_mloffyes;
1407#[doc = "TCD Last Source Address Adjustment"]
1408pub struct TCD3_SLAST {
1409 register: VolatileCell<u32>,
1410}
1411#[doc = "TCD Last Source Address Adjustment"]
1412pub mod tcd3_slast;
1413#[doc = "TCD Destination Address"]
1414pub struct TCD3_DADDR {
1415 register: VolatileCell<u32>,
1416}
1417#[doc = "TCD Destination Address"]
1418pub mod tcd3_daddr;
1419#[doc = "TCD Signed Destination Address Offset"]
1420pub struct TCD3_DOFF {
1421 register: VolatileCell<u16>,
1422}
1423#[doc = "TCD Signed Destination Address Offset"]
1424pub mod tcd3_doff;
1425#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1426pub struct TCD3_CITER_ELINKNO {
1427 register: VolatileCell<u16>,
1428}
1429#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1430pub mod tcd3_citer_elinkno;
1431#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1432pub struct TCD3_CITER_ELINKYES {
1433 register: VolatileCell<u16>,
1434}
1435#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1436pub mod tcd3_citer_elinkyes;
1437#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1438pub struct TCD3_DLASTSGA {
1439 register: VolatileCell<u32>,
1440}
1441#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1442pub mod tcd3_dlastsga;
1443#[doc = "TCD Control and Status"]
1444pub struct TCD3_CSR {
1445 register: VolatileCell<u16>,
1446}
1447#[doc = "TCD Control and Status"]
1448pub mod tcd3_csr;
1449#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1450pub struct TCD3_BITER_ELINKNO {
1451 register: VolatileCell<u16>,
1452}
1453#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1454pub mod tcd3_biter_elinkno;
1455#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1456pub struct TCD3_BITER_ELINKYES {
1457 register: VolatileCell<u16>,
1458}
1459#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1460pub mod tcd3_biter_elinkyes;
1461#[doc = "TCD Source Address"]
1462pub struct TCD4_SADDR {
1463 register: VolatileCell<u32>,
1464}
1465#[doc = "TCD Source Address"]
1466pub mod tcd4_saddr;
1467#[doc = "TCD Signed Source Address Offset"]
1468pub struct TCD4_SOFF {
1469 register: VolatileCell<u16>,
1470}
1471#[doc = "TCD Signed Source Address Offset"]
1472pub mod tcd4_soff;
1473#[doc = "TCD Transfer Attributes"]
1474pub struct TCD4_ATTR {
1475 register: VolatileCell<u16>,
1476}
1477#[doc = "TCD Transfer Attributes"]
1478pub mod tcd4_attr;
1479#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1480pub struct TCD4_NBYTES_MLNO {
1481 register: VolatileCell<u32>,
1482}
1483#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1484pub mod tcd4_nbytes_mlno;
1485#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1486pub struct TCD4_NBYTES_MLOFFNO {
1487 register: VolatileCell<u32>,
1488}
1489#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1490pub mod tcd4_nbytes_mloffno;
1491#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1492pub struct TCD4_NBYTES_MLOFFYES {
1493 register: VolatileCell<u32>,
1494}
1495#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1496pub mod tcd4_nbytes_mloffyes;
1497#[doc = "TCD Last Source Address Adjustment"]
1498pub struct TCD4_SLAST {
1499 register: VolatileCell<u32>,
1500}
1501#[doc = "TCD Last Source Address Adjustment"]
1502pub mod tcd4_slast;
1503#[doc = "TCD Destination Address"]
1504pub struct TCD4_DADDR {
1505 register: VolatileCell<u32>,
1506}
1507#[doc = "TCD Destination Address"]
1508pub mod tcd4_daddr;
1509#[doc = "TCD Signed Destination Address Offset"]
1510pub struct TCD4_DOFF {
1511 register: VolatileCell<u16>,
1512}
1513#[doc = "TCD Signed Destination Address Offset"]
1514pub mod tcd4_doff;
1515#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1516pub struct TCD4_CITER_ELINKNO {
1517 register: VolatileCell<u16>,
1518}
1519#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1520pub mod tcd4_citer_elinkno;
1521#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1522pub struct TCD4_CITER_ELINKYES {
1523 register: VolatileCell<u16>,
1524}
1525#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1526pub mod tcd4_citer_elinkyes;
1527#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1528pub struct TCD4_DLASTSGA {
1529 register: VolatileCell<u32>,
1530}
1531#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1532pub mod tcd4_dlastsga;
1533#[doc = "TCD Control and Status"]
1534pub struct TCD4_CSR {
1535 register: VolatileCell<u16>,
1536}
1537#[doc = "TCD Control and Status"]
1538pub mod tcd4_csr;
1539#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1540pub struct TCD4_BITER_ELINKNO {
1541 register: VolatileCell<u16>,
1542}
1543#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1544pub mod tcd4_biter_elinkno;
1545#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1546pub struct TCD4_BITER_ELINKYES {
1547 register: VolatileCell<u16>,
1548}
1549#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1550pub mod tcd4_biter_elinkyes;
1551#[doc = "TCD Source Address"]
1552pub struct TCD5_SADDR {
1553 register: VolatileCell<u32>,
1554}
1555#[doc = "TCD Source Address"]
1556pub mod tcd5_saddr;
1557#[doc = "TCD Signed Source Address Offset"]
1558pub struct TCD5_SOFF {
1559 register: VolatileCell<u16>,
1560}
1561#[doc = "TCD Signed Source Address Offset"]
1562pub mod tcd5_soff;
1563#[doc = "TCD Transfer Attributes"]
1564pub struct TCD5_ATTR {
1565 register: VolatileCell<u16>,
1566}
1567#[doc = "TCD Transfer Attributes"]
1568pub mod tcd5_attr;
1569#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1570pub struct TCD5_NBYTES_MLNO {
1571 register: VolatileCell<u32>,
1572}
1573#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1574pub mod tcd5_nbytes_mlno;
1575#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1576pub struct TCD5_NBYTES_MLOFFNO {
1577 register: VolatileCell<u32>,
1578}
1579#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1580pub mod tcd5_nbytes_mloffno;
1581#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1582pub struct TCD5_NBYTES_MLOFFYES {
1583 register: VolatileCell<u32>,
1584}
1585#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1586pub mod tcd5_nbytes_mloffyes;
1587#[doc = "TCD Last Source Address Adjustment"]
1588pub struct TCD5_SLAST {
1589 register: VolatileCell<u32>,
1590}
1591#[doc = "TCD Last Source Address Adjustment"]
1592pub mod tcd5_slast;
1593#[doc = "TCD Destination Address"]
1594pub struct TCD5_DADDR {
1595 register: VolatileCell<u32>,
1596}
1597#[doc = "TCD Destination Address"]
1598pub mod tcd5_daddr;
1599#[doc = "TCD Signed Destination Address Offset"]
1600pub struct TCD5_DOFF {
1601 register: VolatileCell<u16>,
1602}
1603#[doc = "TCD Signed Destination Address Offset"]
1604pub mod tcd5_doff;
1605#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1606pub struct TCD5_CITER_ELINKNO {
1607 register: VolatileCell<u16>,
1608}
1609#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1610pub mod tcd5_citer_elinkno;
1611#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1612pub struct TCD5_CITER_ELINKYES {
1613 register: VolatileCell<u16>,
1614}
1615#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1616pub mod tcd5_citer_elinkyes;
1617#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1618pub struct TCD5_DLASTSGA {
1619 register: VolatileCell<u32>,
1620}
1621#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1622pub mod tcd5_dlastsga;
1623#[doc = "TCD Control and Status"]
1624pub struct TCD5_CSR {
1625 register: VolatileCell<u16>,
1626}
1627#[doc = "TCD Control and Status"]
1628pub mod tcd5_csr;
1629#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1630pub struct TCD5_BITER_ELINKNO {
1631 register: VolatileCell<u16>,
1632}
1633#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1634pub mod tcd5_biter_elinkno;
1635#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1636pub struct TCD5_BITER_ELINKYES {
1637 register: VolatileCell<u16>,
1638}
1639#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1640pub mod tcd5_biter_elinkyes;
1641#[doc = "TCD Source Address"]
1642pub struct TCD6_SADDR {
1643 register: VolatileCell<u32>,
1644}
1645#[doc = "TCD Source Address"]
1646pub mod tcd6_saddr;
1647#[doc = "TCD Signed Source Address Offset"]
1648pub struct TCD6_SOFF {
1649 register: VolatileCell<u16>,
1650}
1651#[doc = "TCD Signed Source Address Offset"]
1652pub mod tcd6_soff;
1653#[doc = "TCD Transfer Attributes"]
1654pub struct TCD6_ATTR {
1655 register: VolatileCell<u16>,
1656}
1657#[doc = "TCD Transfer Attributes"]
1658pub mod tcd6_attr;
1659#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1660pub struct TCD6_NBYTES_MLNO {
1661 register: VolatileCell<u32>,
1662}
1663#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1664pub mod tcd6_nbytes_mlno;
1665#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1666pub struct TCD6_NBYTES_MLOFFNO {
1667 register: VolatileCell<u32>,
1668}
1669#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1670pub mod tcd6_nbytes_mloffno;
1671#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1672pub struct TCD6_NBYTES_MLOFFYES {
1673 register: VolatileCell<u32>,
1674}
1675#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1676pub mod tcd6_nbytes_mloffyes;
1677#[doc = "TCD Last Source Address Adjustment"]
1678pub struct TCD6_SLAST {
1679 register: VolatileCell<u32>,
1680}
1681#[doc = "TCD Last Source Address Adjustment"]
1682pub mod tcd6_slast;
1683#[doc = "TCD Destination Address"]
1684pub struct TCD6_DADDR {
1685 register: VolatileCell<u32>,
1686}
1687#[doc = "TCD Destination Address"]
1688pub mod tcd6_daddr;
1689#[doc = "TCD Signed Destination Address Offset"]
1690pub struct TCD6_DOFF {
1691 register: VolatileCell<u16>,
1692}
1693#[doc = "TCD Signed Destination Address Offset"]
1694pub mod tcd6_doff;
1695#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1696pub struct TCD6_CITER_ELINKNO {
1697 register: VolatileCell<u16>,
1698}
1699#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1700pub mod tcd6_citer_elinkno;
1701#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1702pub struct TCD6_CITER_ELINKYES {
1703 register: VolatileCell<u16>,
1704}
1705#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1706pub mod tcd6_citer_elinkyes;
1707#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1708pub struct TCD6_DLASTSGA {
1709 register: VolatileCell<u32>,
1710}
1711#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1712pub mod tcd6_dlastsga;
1713#[doc = "TCD Control and Status"]
1714pub struct TCD6_CSR {
1715 register: VolatileCell<u16>,
1716}
1717#[doc = "TCD Control and Status"]
1718pub mod tcd6_csr;
1719#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1720pub struct TCD6_BITER_ELINKNO {
1721 register: VolatileCell<u16>,
1722}
1723#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1724pub mod tcd6_biter_elinkno;
1725#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1726pub struct TCD6_BITER_ELINKYES {
1727 register: VolatileCell<u16>,
1728}
1729#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1730pub mod tcd6_biter_elinkyes;
1731#[doc = "TCD Source Address"]
1732pub struct TCD7_SADDR {
1733 register: VolatileCell<u32>,
1734}
1735#[doc = "TCD Source Address"]
1736pub mod tcd7_saddr;
1737#[doc = "TCD Signed Source Address Offset"]
1738pub struct TCD7_SOFF {
1739 register: VolatileCell<u16>,
1740}
1741#[doc = "TCD Signed Source Address Offset"]
1742pub mod tcd7_soff;
1743#[doc = "TCD Transfer Attributes"]
1744pub struct TCD7_ATTR {
1745 register: VolatileCell<u16>,
1746}
1747#[doc = "TCD Transfer Attributes"]
1748pub mod tcd7_attr;
1749#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1750pub struct TCD7_NBYTES_MLNO {
1751 register: VolatileCell<u32>,
1752}
1753#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1754pub mod tcd7_nbytes_mlno;
1755#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1756pub struct TCD7_NBYTES_MLOFFNO {
1757 register: VolatileCell<u32>,
1758}
1759#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1760pub mod tcd7_nbytes_mloffno;
1761#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1762pub struct TCD7_NBYTES_MLOFFYES {
1763 register: VolatileCell<u32>,
1764}
1765#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1766pub mod tcd7_nbytes_mloffyes;
1767#[doc = "TCD Last Source Address Adjustment"]
1768pub struct TCD7_SLAST {
1769 register: VolatileCell<u32>,
1770}
1771#[doc = "TCD Last Source Address Adjustment"]
1772pub mod tcd7_slast;
1773#[doc = "TCD Destination Address"]
1774pub struct TCD7_DADDR {
1775 register: VolatileCell<u32>,
1776}
1777#[doc = "TCD Destination Address"]
1778pub mod tcd7_daddr;
1779#[doc = "TCD Signed Destination Address Offset"]
1780pub struct TCD7_DOFF {
1781 register: VolatileCell<u16>,
1782}
1783#[doc = "TCD Signed Destination Address Offset"]
1784pub mod tcd7_doff;
1785#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1786pub struct TCD7_CITER_ELINKNO {
1787 register: VolatileCell<u16>,
1788}
1789#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1790pub mod tcd7_citer_elinkno;
1791#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1792pub struct TCD7_CITER_ELINKYES {
1793 register: VolatileCell<u16>,
1794}
1795#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1796pub mod tcd7_citer_elinkyes;
1797#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1798pub struct TCD7_DLASTSGA {
1799 register: VolatileCell<u32>,
1800}
1801#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1802pub mod tcd7_dlastsga;
1803#[doc = "TCD Control and Status"]
1804pub struct TCD7_CSR {
1805 register: VolatileCell<u16>,
1806}
1807#[doc = "TCD Control and Status"]
1808pub mod tcd7_csr;
1809#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1810pub struct TCD7_BITER_ELINKNO {
1811 register: VolatileCell<u16>,
1812}
1813#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1814pub mod tcd7_biter_elinkno;
1815#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1816pub struct TCD7_BITER_ELINKYES {
1817 register: VolatileCell<u16>,
1818}
1819#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1820pub mod tcd7_biter_elinkyes;
1821#[doc = "TCD Source Address"]
1822pub struct TCD8_SADDR {
1823 register: VolatileCell<u32>,
1824}
1825#[doc = "TCD Source Address"]
1826pub mod tcd8_saddr;
1827#[doc = "TCD Signed Source Address Offset"]
1828pub struct TCD8_SOFF {
1829 register: VolatileCell<u16>,
1830}
1831#[doc = "TCD Signed Source Address Offset"]
1832pub mod tcd8_soff;
1833#[doc = "TCD Transfer Attributes"]
1834pub struct TCD8_ATTR {
1835 register: VolatileCell<u16>,
1836}
1837#[doc = "TCD Transfer Attributes"]
1838pub mod tcd8_attr;
1839#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1840pub struct TCD8_NBYTES_MLNO {
1841 register: VolatileCell<u32>,
1842}
1843#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1844pub mod tcd8_nbytes_mlno;
1845#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1846pub struct TCD8_NBYTES_MLOFFNO {
1847 register: VolatileCell<u32>,
1848}
1849#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1850pub mod tcd8_nbytes_mloffno;
1851#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1852pub struct TCD8_NBYTES_MLOFFYES {
1853 register: VolatileCell<u32>,
1854}
1855#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1856pub mod tcd8_nbytes_mloffyes;
1857#[doc = "TCD Last Source Address Adjustment"]
1858pub struct TCD8_SLAST {
1859 register: VolatileCell<u32>,
1860}
1861#[doc = "TCD Last Source Address Adjustment"]
1862pub mod tcd8_slast;
1863#[doc = "TCD Destination Address"]
1864pub struct TCD8_DADDR {
1865 register: VolatileCell<u32>,
1866}
1867#[doc = "TCD Destination Address"]
1868pub mod tcd8_daddr;
1869#[doc = "TCD Signed Destination Address Offset"]
1870pub struct TCD8_DOFF {
1871 register: VolatileCell<u16>,
1872}
1873#[doc = "TCD Signed Destination Address Offset"]
1874pub mod tcd8_doff;
1875#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1876pub struct TCD8_CITER_ELINKNO {
1877 register: VolatileCell<u16>,
1878}
1879#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1880pub mod tcd8_citer_elinkno;
1881#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1882pub struct TCD8_CITER_ELINKYES {
1883 register: VolatileCell<u16>,
1884}
1885#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1886pub mod tcd8_citer_elinkyes;
1887#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1888pub struct TCD8_DLASTSGA {
1889 register: VolatileCell<u32>,
1890}
1891#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1892pub mod tcd8_dlastsga;
1893#[doc = "TCD Control and Status"]
1894pub struct TCD8_CSR {
1895 register: VolatileCell<u16>,
1896}
1897#[doc = "TCD Control and Status"]
1898pub mod tcd8_csr;
1899#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1900pub struct TCD8_BITER_ELINKNO {
1901 register: VolatileCell<u16>,
1902}
1903#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1904pub mod tcd8_biter_elinkno;
1905#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1906pub struct TCD8_BITER_ELINKYES {
1907 register: VolatileCell<u16>,
1908}
1909#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1910pub mod tcd8_biter_elinkyes;
1911#[doc = "TCD Source Address"]
1912pub struct TCD9_SADDR {
1913 register: VolatileCell<u32>,
1914}
1915#[doc = "TCD Source Address"]
1916pub mod tcd9_saddr;
1917#[doc = "TCD Signed Source Address Offset"]
1918pub struct TCD9_SOFF {
1919 register: VolatileCell<u16>,
1920}
1921#[doc = "TCD Signed Source Address Offset"]
1922pub mod tcd9_soff;
1923#[doc = "TCD Transfer Attributes"]
1924pub struct TCD9_ATTR {
1925 register: VolatileCell<u16>,
1926}
1927#[doc = "TCD Transfer Attributes"]
1928pub mod tcd9_attr;
1929#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1930pub struct TCD9_NBYTES_MLNO {
1931 register: VolatileCell<u32>,
1932}
1933#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
1934pub mod tcd9_nbytes_mlno;
1935#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1936pub struct TCD9_NBYTES_MLOFFNO {
1937 register: VolatileCell<u32>,
1938}
1939#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
1940pub mod tcd9_nbytes_mloffno;
1941#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1942pub struct TCD9_NBYTES_MLOFFYES {
1943 register: VolatileCell<u32>,
1944}
1945#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
1946pub mod tcd9_nbytes_mloffyes;
1947#[doc = "TCD Last Source Address Adjustment"]
1948pub struct TCD9_SLAST {
1949 register: VolatileCell<u32>,
1950}
1951#[doc = "TCD Last Source Address Adjustment"]
1952pub mod tcd9_slast;
1953#[doc = "TCD Destination Address"]
1954pub struct TCD9_DADDR {
1955 register: VolatileCell<u32>,
1956}
1957#[doc = "TCD Destination Address"]
1958pub mod tcd9_daddr;
1959#[doc = "TCD Signed Destination Address Offset"]
1960pub struct TCD9_DOFF {
1961 register: VolatileCell<u16>,
1962}
1963#[doc = "TCD Signed Destination Address Offset"]
1964pub mod tcd9_doff;
1965#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1966pub struct TCD9_CITER_ELINKNO {
1967 register: VolatileCell<u16>,
1968}
1969#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1970pub mod tcd9_citer_elinkno;
1971#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1972pub struct TCD9_CITER_ELINKYES {
1973 register: VolatileCell<u16>,
1974}
1975#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1976pub mod tcd9_citer_elinkyes;
1977#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1978pub struct TCD9_DLASTSGA {
1979 register: VolatileCell<u32>,
1980}
1981#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
1982pub mod tcd9_dlastsga;
1983#[doc = "TCD Control and Status"]
1984pub struct TCD9_CSR {
1985 register: VolatileCell<u16>,
1986}
1987#[doc = "TCD Control and Status"]
1988pub mod tcd9_csr;
1989#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1990pub struct TCD9_BITER_ELINKNO {
1991 register: VolatileCell<u16>,
1992}
1993#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
1994pub mod tcd9_biter_elinkno;
1995#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
1996pub struct TCD9_BITER_ELINKYES {
1997 register: VolatileCell<u16>,
1998}
1999#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2000pub mod tcd9_biter_elinkyes;
2001#[doc = "TCD Source Address"]
2002pub struct TCD10_SADDR {
2003 register: VolatileCell<u32>,
2004}
2005#[doc = "TCD Source Address"]
2006pub mod tcd10_saddr;
2007#[doc = "TCD Signed Source Address Offset"]
2008pub struct TCD10_SOFF {
2009 register: VolatileCell<u16>,
2010}
2011#[doc = "TCD Signed Source Address Offset"]
2012pub mod tcd10_soff;
2013#[doc = "TCD Transfer Attributes"]
2014pub struct TCD10_ATTR {
2015 register: VolatileCell<u16>,
2016}
2017#[doc = "TCD Transfer Attributes"]
2018pub mod tcd10_attr;
2019#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2020pub struct TCD10_NBYTES_MLNO {
2021 register: VolatileCell<u32>,
2022}
2023#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2024pub mod tcd10_nbytes_mlno;
2025#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2026pub struct TCD10_NBYTES_MLOFFNO {
2027 register: VolatileCell<u32>,
2028}
2029#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2030pub mod tcd10_nbytes_mloffno;
2031#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2032pub struct TCD10_NBYTES_MLOFFYES {
2033 register: VolatileCell<u32>,
2034}
2035#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2036pub mod tcd10_nbytes_mloffyes;
2037#[doc = "TCD Last Source Address Adjustment"]
2038pub struct TCD10_SLAST {
2039 register: VolatileCell<u32>,
2040}
2041#[doc = "TCD Last Source Address Adjustment"]
2042pub mod tcd10_slast;
2043#[doc = "TCD Destination Address"]
2044pub struct TCD10_DADDR {
2045 register: VolatileCell<u32>,
2046}
2047#[doc = "TCD Destination Address"]
2048pub mod tcd10_daddr;
2049#[doc = "TCD Signed Destination Address Offset"]
2050pub struct TCD10_DOFF {
2051 register: VolatileCell<u16>,
2052}
2053#[doc = "TCD Signed Destination Address Offset"]
2054pub mod tcd10_doff;
2055#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2056pub struct TCD10_CITER_ELINKNO {
2057 register: VolatileCell<u16>,
2058}
2059#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2060pub mod tcd10_citer_elinkno;
2061#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2062pub struct TCD10_CITER_ELINKYES {
2063 register: VolatileCell<u16>,
2064}
2065#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2066pub mod tcd10_citer_elinkyes;
2067#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2068pub struct TCD10_DLASTSGA {
2069 register: VolatileCell<u32>,
2070}
2071#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2072pub mod tcd10_dlastsga;
2073#[doc = "TCD Control and Status"]
2074pub struct TCD10_CSR {
2075 register: VolatileCell<u16>,
2076}
2077#[doc = "TCD Control and Status"]
2078pub mod tcd10_csr;
2079#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2080pub struct TCD10_BITER_ELINKNO {
2081 register: VolatileCell<u16>,
2082}
2083#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2084pub mod tcd10_biter_elinkno;
2085#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2086pub struct TCD10_BITER_ELINKYES {
2087 register: VolatileCell<u16>,
2088}
2089#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2090pub mod tcd10_biter_elinkyes;
2091#[doc = "TCD Source Address"]
2092pub struct TCD11_SADDR {
2093 register: VolatileCell<u32>,
2094}
2095#[doc = "TCD Source Address"]
2096pub mod tcd11_saddr;
2097#[doc = "TCD Signed Source Address Offset"]
2098pub struct TCD11_SOFF {
2099 register: VolatileCell<u16>,
2100}
2101#[doc = "TCD Signed Source Address Offset"]
2102pub mod tcd11_soff;
2103#[doc = "TCD Transfer Attributes"]
2104pub struct TCD11_ATTR {
2105 register: VolatileCell<u16>,
2106}
2107#[doc = "TCD Transfer Attributes"]
2108pub mod tcd11_attr;
2109#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2110pub struct TCD11_NBYTES_MLNO {
2111 register: VolatileCell<u32>,
2112}
2113#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2114pub mod tcd11_nbytes_mlno;
2115#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2116pub struct TCD11_NBYTES_MLOFFNO {
2117 register: VolatileCell<u32>,
2118}
2119#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2120pub mod tcd11_nbytes_mloffno;
2121#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2122pub struct TCD11_NBYTES_MLOFFYES {
2123 register: VolatileCell<u32>,
2124}
2125#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2126pub mod tcd11_nbytes_mloffyes;
2127#[doc = "TCD Last Source Address Adjustment"]
2128pub struct TCD11_SLAST {
2129 register: VolatileCell<u32>,
2130}
2131#[doc = "TCD Last Source Address Adjustment"]
2132pub mod tcd11_slast;
2133#[doc = "TCD Destination Address"]
2134pub struct TCD11_DADDR {
2135 register: VolatileCell<u32>,
2136}
2137#[doc = "TCD Destination Address"]
2138pub mod tcd11_daddr;
2139#[doc = "TCD Signed Destination Address Offset"]
2140pub struct TCD11_DOFF {
2141 register: VolatileCell<u16>,
2142}
2143#[doc = "TCD Signed Destination Address Offset"]
2144pub mod tcd11_doff;
2145#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2146pub struct TCD11_CITER_ELINKNO {
2147 register: VolatileCell<u16>,
2148}
2149#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2150pub mod tcd11_citer_elinkno;
2151#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2152pub struct TCD11_CITER_ELINKYES {
2153 register: VolatileCell<u16>,
2154}
2155#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2156pub mod tcd11_citer_elinkyes;
2157#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2158pub struct TCD11_DLASTSGA {
2159 register: VolatileCell<u32>,
2160}
2161#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2162pub mod tcd11_dlastsga;
2163#[doc = "TCD Control and Status"]
2164pub struct TCD11_CSR {
2165 register: VolatileCell<u16>,
2166}
2167#[doc = "TCD Control and Status"]
2168pub mod tcd11_csr;
2169#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2170pub struct TCD11_BITER_ELINKNO {
2171 register: VolatileCell<u16>,
2172}
2173#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2174pub mod tcd11_biter_elinkno;
2175#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2176pub struct TCD11_BITER_ELINKYES {
2177 register: VolatileCell<u16>,
2178}
2179#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2180pub mod tcd11_biter_elinkyes;
2181#[doc = "TCD Source Address"]
2182pub struct TCD12_SADDR {
2183 register: VolatileCell<u32>,
2184}
2185#[doc = "TCD Source Address"]
2186pub mod tcd12_saddr;
2187#[doc = "TCD Signed Source Address Offset"]
2188pub struct TCD12_SOFF {
2189 register: VolatileCell<u16>,
2190}
2191#[doc = "TCD Signed Source Address Offset"]
2192pub mod tcd12_soff;
2193#[doc = "TCD Transfer Attributes"]
2194pub struct TCD12_ATTR {
2195 register: VolatileCell<u16>,
2196}
2197#[doc = "TCD Transfer Attributes"]
2198pub mod tcd12_attr;
2199#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2200pub struct TCD12_NBYTES_MLNO {
2201 register: VolatileCell<u32>,
2202}
2203#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2204pub mod tcd12_nbytes_mlno;
2205#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2206pub struct TCD12_NBYTES_MLOFFNO {
2207 register: VolatileCell<u32>,
2208}
2209#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2210pub mod tcd12_nbytes_mloffno;
2211#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2212pub struct TCD12_NBYTES_MLOFFYES {
2213 register: VolatileCell<u32>,
2214}
2215#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2216pub mod tcd12_nbytes_mloffyes;
2217#[doc = "TCD Last Source Address Adjustment"]
2218pub struct TCD12_SLAST {
2219 register: VolatileCell<u32>,
2220}
2221#[doc = "TCD Last Source Address Adjustment"]
2222pub mod tcd12_slast;
2223#[doc = "TCD Destination Address"]
2224pub struct TCD12_DADDR {
2225 register: VolatileCell<u32>,
2226}
2227#[doc = "TCD Destination Address"]
2228pub mod tcd12_daddr;
2229#[doc = "TCD Signed Destination Address Offset"]
2230pub struct TCD12_DOFF {
2231 register: VolatileCell<u16>,
2232}
2233#[doc = "TCD Signed Destination Address Offset"]
2234pub mod tcd12_doff;
2235#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2236pub struct TCD12_CITER_ELINKNO {
2237 register: VolatileCell<u16>,
2238}
2239#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2240pub mod tcd12_citer_elinkno;
2241#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2242pub struct TCD12_CITER_ELINKYES {
2243 register: VolatileCell<u16>,
2244}
2245#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2246pub mod tcd12_citer_elinkyes;
2247#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2248pub struct TCD12_DLASTSGA {
2249 register: VolatileCell<u32>,
2250}
2251#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2252pub mod tcd12_dlastsga;
2253#[doc = "TCD Control and Status"]
2254pub struct TCD12_CSR {
2255 register: VolatileCell<u16>,
2256}
2257#[doc = "TCD Control and Status"]
2258pub mod tcd12_csr;
2259#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2260pub struct TCD12_BITER_ELINKNO {
2261 register: VolatileCell<u16>,
2262}
2263#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2264pub mod tcd12_biter_elinkno;
2265#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2266pub struct TCD12_BITER_ELINKYES {
2267 register: VolatileCell<u16>,
2268}
2269#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2270pub mod tcd12_biter_elinkyes;
2271#[doc = "TCD Source Address"]
2272pub struct TCD13_SADDR {
2273 register: VolatileCell<u32>,
2274}
2275#[doc = "TCD Source Address"]
2276pub mod tcd13_saddr;
2277#[doc = "TCD Signed Source Address Offset"]
2278pub struct TCD13_SOFF {
2279 register: VolatileCell<u16>,
2280}
2281#[doc = "TCD Signed Source Address Offset"]
2282pub mod tcd13_soff;
2283#[doc = "TCD Transfer Attributes"]
2284pub struct TCD13_ATTR {
2285 register: VolatileCell<u16>,
2286}
2287#[doc = "TCD Transfer Attributes"]
2288pub mod tcd13_attr;
2289#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2290pub struct TCD13_NBYTES_MLNO {
2291 register: VolatileCell<u32>,
2292}
2293#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2294pub mod tcd13_nbytes_mlno;
2295#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2296pub struct TCD13_NBYTES_MLOFFNO {
2297 register: VolatileCell<u32>,
2298}
2299#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2300pub mod tcd13_nbytes_mloffno;
2301#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2302pub struct TCD13_NBYTES_MLOFFYES {
2303 register: VolatileCell<u32>,
2304}
2305#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2306pub mod tcd13_nbytes_mloffyes;
2307#[doc = "TCD Last Source Address Adjustment"]
2308pub struct TCD13_SLAST {
2309 register: VolatileCell<u32>,
2310}
2311#[doc = "TCD Last Source Address Adjustment"]
2312pub mod tcd13_slast;
2313#[doc = "TCD Destination Address"]
2314pub struct TCD13_DADDR {
2315 register: VolatileCell<u32>,
2316}
2317#[doc = "TCD Destination Address"]
2318pub mod tcd13_daddr;
2319#[doc = "TCD Signed Destination Address Offset"]
2320pub struct TCD13_DOFF {
2321 register: VolatileCell<u16>,
2322}
2323#[doc = "TCD Signed Destination Address Offset"]
2324pub mod tcd13_doff;
2325#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2326pub struct TCD13_CITER_ELINKNO {
2327 register: VolatileCell<u16>,
2328}
2329#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2330pub mod tcd13_citer_elinkno;
2331#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2332pub struct TCD13_CITER_ELINKYES {
2333 register: VolatileCell<u16>,
2334}
2335#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2336pub mod tcd13_citer_elinkyes;
2337#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2338pub struct TCD13_DLASTSGA {
2339 register: VolatileCell<u32>,
2340}
2341#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2342pub mod tcd13_dlastsga;
2343#[doc = "TCD Control and Status"]
2344pub struct TCD13_CSR {
2345 register: VolatileCell<u16>,
2346}
2347#[doc = "TCD Control and Status"]
2348pub mod tcd13_csr;
2349#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2350pub struct TCD13_BITER_ELINKNO {
2351 register: VolatileCell<u16>,
2352}
2353#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2354pub mod tcd13_biter_elinkno;
2355#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2356pub struct TCD13_BITER_ELINKYES {
2357 register: VolatileCell<u16>,
2358}
2359#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2360pub mod tcd13_biter_elinkyes;
2361#[doc = "TCD Source Address"]
2362pub struct TCD14_SADDR {
2363 register: VolatileCell<u32>,
2364}
2365#[doc = "TCD Source Address"]
2366pub mod tcd14_saddr;
2367#[doc = "TCD Signed Source Address Offset"]
2368pub struct TCD14_SOFF {
2369 register: VolatileCell<u16>,
2370}
2371#[doc = "TCD Signed Source Address Offset"]
2372pub mod tcd14_soff;
2373#[doc = "TCD Transfer Attributes"]
2374pub struct TCD14_ATTR {
2375 register: VolatileCell<u16>,
2376}
2377#[doc = "TCD Transfer Attributes"]
2378pub mod tcd14_attr;
2379#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2380pub struct TCD14_NBYTES_MLNO {
2381 register: VolatileCell<u32>,
2382}
2383#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2384pub mod tcd14_nbytes_mlno;
2385#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2386pub struct TCD14_NBYTES_MLOFFNO {
2387 register: VolatileCell<u32>,
2388}
2389#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2390pub mod tcd14_nbytes_mloffno;
2391#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2392pub struct TCD14_NBYTES_MLOFFYES {
2393 register: VolatileCell<u32>,
2394}
2395#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2396pub mod tcd14_nbytes_mloffyes;
2397#[doc = "TCD Last Source Address Adjustment"]
2398pub struct TCD14_SLAST {
2399 register: VolatileCell<u32>,
2400}
2401#[doc = "TCD Last Source Address Adjustment"]
2402pub mod tcd14_slast;
2403#[doc = "TCD Destination Address"]
2404pub struct TCD14_DADDR {
2405 register: VolatileCell<u32>,
2406}
2407#[doc = "TCD Destination Address"]
2408pub mod tcd14_daddr;
2409#[doc = "TCD Signed Destination Address Offset"]
2410pub struct TCD14_DOFF {
2411 register: VolatileCell<u16>,
2412}
2413#[doc = "TCD Signed Destination Address Offset"]
2414pub mod tcd14_doff;
2415#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2416pub struct TCD14_CITER_ELINKNO {
2417 register: VolatileCell<u16>,
2418}
2419#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2420pub mod tcd14_citer_elinkno;
2421#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2422pub struct TCD14_CITER_ELINKYES {
2423 register: VolatileCell<u16>,
2424}
2425#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2426pub mod tcd14_citer_elinkyes;
2427#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2428pub struct TCD14_DLASTSGA {
2429 register: VolatileCell<u32>,
2430}
2431#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2432pub mod tcd14_dlastsga;
2433#[doc = "TCD Control and Status"]
2434pub struct TCD14_CSR {
2435 register: VolatileCell<u16>,
2436}
2437#[doc = "TCD Control and Status"]
2438pub mod tcd14_csr;
2439#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2440pub struct TCD14_BITER_ELINKNO {
2441 register: VolatileCell<u16>,
2442}
2443#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2444pub mod tcd14_biter_elinkno;
2445#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2446pub struct TCD14_BITER_ELINKYES {
2447 register: VolatileCell<u16>,
2448}
2449#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2450pub mod tcd14_biter_elinkyes;
2451#[doc = "TCD Source Address"]
2452pub struct TCD15_SADDR {
2453 register: VolatileCell<u32>,
2454}
2455#[doc = "TCD Source Address"]
2456pub mod tcd15_saddr;
2457#[doc = "TCD Signed Source Address Offset"]
2458pub struct TCD15_SOFF {
2459 register: VolatileCell<u16>,
2460}
2461#[doc = "TCD Signed Source Address Offset"]
2462pub mod tcd15_soff;
2463#[doc = "TCD Transfer Attributes"]
2464pub struct TCD15_ATTR {
2465 register: VolatileCell<u16>,
2466}
2467#[doc = "TCD Transfer Attributes"]
2468pub mod tcd15_attr;
2469#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2470pub struct TCD15_NBYTES_MLNO {
2471 register: VolatileCell<u32>,
2472}
2473#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2474pub mod tcd15_nbytes_mlno;
2475#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2476pub struct TCD15_NBYTES_MLOFFNO {
2477 register: VolatileCell<u32>,
2478}
2479#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2480pub mod tcd15_nbytes_mloffno;
2481#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2482pub struct TCD15_NBYTES_MLOFFYES {
2483 register: VolatileCell<u32>,
2484}
2485#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2486pub mod tcd15_nbytes_mloffyes;
2487#[doc = "TCD Last Source Address Adjustment"]
2488pub struct TCD15_SLAST {
2489 register: VolatileCell<u32>,
2490}
2491#[doc = "TCD Last Source Address Adjustment"]
2492pub mod tcd15_slast;
2493#[doc = "TCD Destination Address"]
2494pub struct TCD15_DADDR {
2495 register: VolatileCell<u32>,
2496}
2497#[doc = "TCD Destination Address"]
2498pub mod tcd15_daddr;
2499#[doc = "TCD Signed Destination Address Offset"]
2500pub struct TCD15_DOFF {
2501 register: VolatileCell<u16>,
2502}
2503#[doc = "TCD Signed Destination Address Offset"]
2504pub mod tcd15_doff;
2505#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2506pub struct TCD15_CITER_ELINKNO {
2507 register: VolatileCell<u16>,
2508}
2509#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2510pub mod tcd15_citer_elinkno;
2511#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2512pub struct TCD15_CITER_ELINKYES {
2513 register: VolatileCell<u16>,
2514}
2515#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2516pub mod tcd15_citer_elinkyes;
2517#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2518pub struct TCD15_DLASTSGA {
2519 register: VolatileCell<u32>,
2520}
2521#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2522pub mod tcd15_dlastsga;
2523#[doc = "TCD Control and Status"]
2524pub struct TCD15_CSR {
2525 register: VolatileCell<u16>,
2526}
2527#[doc = "TCD Control and Status"]
2528pub mod tcd15_csr;
2529#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2530pub struct TCD15_BITER_ELINKNO {
2531 register: VolatileCell<u16>,
2532}
2533#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2534pub mod tcd15_biter_elinkno;
2535#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2536pub struct TCD15_BITER_ELINKYES {
2537 register: VolatileCell<u16>,
2538}
2539#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2540pub mod tcd15_biter_elinkyes;
2541#[doc = "TCD Source Address"]
2542pub struct TCD16_SADDR {
2543 register: VolatileCell<u32>,
2544}
2545#[doc = "TCD Source Address"]
2546pub mod tcd16_saddr;
2547#[doc = "TCD Signed Source Address Offset"]
2548pub struct TCD16_SOFF {
2549 register: VolatileCell<u16>,
2550}
2551#[doc = "TCD Signed Source Address Offset"]
2552pub mod tcd16_soff;
2553#[doc = "TCD Transfer Attributes"]
2554pub struct TCD16_ATTR {
2555 register: VolatileCell<u16>,
2556}
2557#[doc = "TCD Transfer Attributes"]
2558pub mod tcd16_attr;
2559#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2560pub struct TCD16_NBYTES_MLNO {
2561 register: VolatileCell<u32>,
2562}
2563#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2564pub mod tcd16_nbytes_mlno;
2565#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2566pub struct TCD16_NBYTES_MLOFFNO {
2567 register: VolatileCell<u32>,
2568}
2569#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2570pub mod tcd16_nbytes_mloffno;
2571#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2572pub struct TCD16_NBYTES_MLOFFYES {
2573 register: VolatileCell<u32>,
2574}
2575#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2576pub mod tcd16_nbytes_mloffyes;
2577#[doc = "TCD Last Source Address Adjustment"]
2578pub struct TCD16_SLAST {
2579 register: VolatileCell<u32>,
2580}
2581#[doc = "TCD Last Source Address Adjustment"]
2582pub mod tcd16_slast;
2583#[doc = "TCD Destination Address"]
2584pub struct TCD16_DADDR {
2585 register: VolatileCell<u32>,
2586}
2587#[doc = "TCD Destination Address"]
2588pub mod tcd16_daddr;
2589#[doc = "TCD Signed Destination Address Offset"]
2590pub struct TCD16_DOFF {
2591 register: VolatileCell<u16>,
2592}
2593#[doc = "TCD Signed Destination Address Offset"]
2594pub mod tcd16_doff;
2595#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2596pub struct TCD16_CITER_ELINKNO {
2597 register: VolatileCell<u16>,
2598}
2599#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2600pub mod tcd16_citer_elinkno;
2601#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2602pub struct TCD16_CITER_ELINKYES {
2603 register: VolatileCell<u16>,
2604}
2605#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2606pub mod tcd16_citer_elinkyes;
2607#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2608pub struct TCD16_DLASTSGA {
2609 register: VolatileCell<u32>,
2610}
2611#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2612pub mod tcd16_dlastsga;
2613#[doc = "TCD Control and Status"]
2614pub struct TCD16_CSR {
2615 register: VolatileCell<u16>,
2616}
2617#[doc = "TCD Control and Status"]
2618pub mod tcd16_csr;
2619#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2620pub struct TCD16_BITER_ELINKNO {
2621 register: VolatileCell<u16>,
2622}
2623#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2624pub mod tcd16_biter_elinkno;
2625#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2626pub struct TCD16_BITER_ELINKYES {
2627 register: VolatileCell<u16>,
2628}
2629#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2630pub mod tcd16_biter_elinkyes;
2631#[doc = "TCD Source Address"]
2632pub struct TCD17_SADDR {
2633 register: VolatileCell<u32>,
2634}
2635#[doc = "TCD Source Address"]
2636pub mod tcd17_saddr;
2637#[doc = "TCD Signed Source Address Offset"]
2638pub struct TCD17_SOFF {
2639 register: VolatileCell<u16>,
2640}
2641#[doc = "TCD Signed Source Address Offset"]
2642pub mod tcd17_soff;
2643#[doc = "TCD Transfer Attributes"]
2644pub struct TCD17_ATTR {
2645 register: VolatileCell<u16>,
2646}
2647#[doc = "TCD Transfer Attributes"]
2648pub mod tcd17_attr;
2649#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2650pub struct TCD17_NBYTES_MLNO {
2651 register: VolatileCell<u32>,
2652}
2653#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2654pub mod tcd17_nbytes_mlno;
2655#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2656pub struct TCD17_NBYTES_MLOFFNO {
2657 register: VolatileCell<u32>,
2658}
2659#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2660pub mod tcd17_nbytes_mloffno;
2661#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2662pub struct TCD17_NBYTES_MLOFFYES {
2663 register: VolatileCell<u32>,
2664}
2665#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2666pub mod tcd17_nbytes_mloffyes;
2667#[doc = "TCD Last Source Address Adjustment"]
2668pub struct TCD17_SLAST {
2669 register: VolatileCell<u32>,
2670}
2671#[doc = "TCD Last Source Address Adjustment"]
2672pub mod tcd17_slast;
2673#[doc = "TCD Destination Address"]
2674pub struct TCD17_DADDR {
2675 register: VolatileCell<u32>,
2676}
2677#[doc = "TCD Destination Address"]
2678pub mod tcd17_daddr;
2679#[doc = "TCD Signed Destination Address Offset"]
2680pub struct TCD17_DOFF {
2681 register: VolatileCell<u16>,
2682}
2683#[doc = "TCD Signed Destination Address Offset"]
2684pub mod tcd17_doff;
2685#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2686pub struct TCD17_CITER_ELINKNO {
2687 register: VolatileCell<u16>,
2688}
2689#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2690pub mod tcd17_citer_elinkno;
2691#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2692pub struct TCD17_CITER_ELINKYES {
2693 register: VolatileCell<u16>,
2694}
2695#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2696pub mod tcd17_citer_elinkyes;
2697#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2698pub struct TCD17_DLASTSGA {
2699 register: VolatileCell<u32>,
2700}
2701#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2702pub mod tcd17_dlastsga;
2703#[doc = "TCD Control and Status"]
2704pub struct TCD17_CSR {
2705 register: VolatileCell<u16>,
2706}
2707#[doc = "TCD Control and Status"]
2708pub mod tcd17_csr;
2709#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2710pub struct TCD17_BITER_ELINKNO {
2711 register: VolatileCell<u16>,
2712}
2713#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2714pub mod tcd17_biter_elinkno;
2715#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2716pub struct TCD17_BITER_ELINKYES {
2717 register: VolatileCell<u16>,
2718}
2719#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2720pub mod tcd17_biter_elinkyes;
2721#[doc = "TCD Source Address"]
2722pub struct TCD18_SADDR {
2723 register: VolatileCell<u32>,
2724}
2725#[doc = "TCD Source Address"]
2726pub mod tcd18_saddr;
2727#[doc = "TCD Signed Source Address Offset"]
2728pub struct TCD18_SOFF {
2729 register: VolatileCell<u16>,
2730}
2731#[doc = "TCD Signed Source Address Offset"]
2732pub mod tcd18_soff;
2733#[doc = "TCD Transfer Attributes"]
2734pub struct TCD18_ATTR {
2735 register: VolatileCell<u16>,
2736}
2737#[doc = "TCD Transfer Attributes"]
2738pub mod tcd18_attr;
2739#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2740pub struct TCD18_NBYTES_MLNO {
2741 register: VolatileCell<u32>,
2742}
2743#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2744pub mod tcd18_nbytes_mlno;
2745#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2746pub struct TCD18_NBYTES_MLOFFNO {
2747 register: VolatileCell<u32>,
2748}
2749#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2750pub mod tcd18_nbytes_mloffno;
2751#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2752pub struct TCD18_NBYTES_MLOFFYES {
2753 register: VolatileCell<u32>,
2754}
2755#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2756pub mod tcd18_nbytes_mloffyes;
2757#[doc = "TCD Last Source Address Adjustment"]
2758pub struct TCD18_SLAST {
2759 register: VolatileCell<u32>,
2760}
2761#[doc = "TCD Last Source Address Adjustment"]
2762pub mod tcd18_slast;
2763#[doc = "TCD Destination Address"]
2764pub struct TCD18_DADDR {
2765 register: VolatileCell<u32>,
2766}
2767#[doc = "TCD Destination Address"]
2768pub mod tcd18_daddr;
2769#[doc = "TCD Signed Destination Address Offset"]
2770pub struct TCD18_DOFF {
2771 register: VolatileCell<u16>,
2772}
2773#[doc = "TCD Signed Destination Address Offset"]
2774pub mod tcd18_doff;
2775#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2776pub struct TCD18_CITER_ELINKNO {
2777 register: VolatileCell<u16>,
2778}
2779#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2780pub mod tcd18_citer_elinkno;
2781#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2782pub struct TCD18_CITER_ELINKYES {
2783 register: VolatileCell<u16>,
2784}
2785#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2786pub mod tcd18_citer_elinkyes;
2787#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2788pub struct TCD18_DLASTSGA {
2789 register: VolatileCell<u32>,
2790}
2791#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2792pub mod tcd18_dlastsga;
2793#[doc = "TCD Control and Status"]
2794pub struct TCD18_CSR {
2795 register: VolatileCell<u16>,
2796}
2797#[doc = "TCD Control and Status"]
2798pub mod tcd18_csr;
2799#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2800pub struct TCD18_BITER_ELINKNO {
2801 register: VolatileCell<u16>,
2802}
2803#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2804pub mod tcd18_biter_elinkno;
2805#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2806pub struct TCD18_BITER_ELINKYES {
2807 register: VolatileCell<u16>,
2808}
2809#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2810pub mod tcd18_biter_elinkyes;
2811#[doc = "TCD Source Address"]
2812pub struct TCD19_SADDR {
2813 register: VolatileCell<u32>,
2814}
2815#[doc = "TCD Source Address"]
2816pub mod tcd19_saddr;
2817#[doc = "TCD Signed Source Address Offset"]
2818pub struct TCD19_SOFF {
2819 register: VolatileCell<u16>,
2820}
2821#[doc = "TCD Signed Source Address Offset"]
2822pub mod tcd19_soff;
2823#[doc = "TCD Transfer Attributes"]
2824pub struct TCD19_ATTR {
2825 register: VolatileCell<u16>,
2826}
2827#[doc = "TCD Transfer Attributes"]
2828pub mod tcd19_attr;
2829#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2830pub struct TCD19_NBYTES_MLNO {
2831 register: VolatileCell<u32>,
2832}
2833#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2834pub mod tcd19_nbytes_mlno;
2835#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2836pub struct TCD19_NBYTES_MLOFFNO {
2837 register: VolatileCell<u32>,
2838}
2839#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2840pub mod tcd19_nbytes_mloffno;
2841#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2842pub struct TCD19_NBYTES_MLOFFYES {
2843 register: VolatileCell<u32>,
2844}
2845#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2846pub mod tcd19_nbytes_mloffyes;
2847#[doc = "TCD Last Source Address Adjustment"]
2848pub struct TCD19_SLAST {
2849 register: VolatileCell<u32>,
2850}
2851#[doc = "TCD Last Source Address Adjustment"]
2852pub mod tcd19_slast;
2853#[doc = "TCD Destination Address"]
2854pub struct TCD19_DADDR {
2855 register: VolatileCell<u32>,
2856}
2857#[doc = "TCD Destination Address"]
2858pub mod tcd19_daddr;
2859#[doc = "TCD Signed Destination Address Offset"]
2860pub struct TCD19_DOFF {
2861 register: VolatileCell<u16>,
2862}
2863#[doc = "TCD Signed Destination Address Offset"]
2864pub mod tcd19_doff;
2865#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2866pub struct TCD19_CITER_ELINKNO {
2867 register: VolatileCell<u16>,
2868}
2869#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2870pub mod tcd19_citer_elinkno;
2871#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2872pub struct TCD19_CITER_ELINKYES {
2873 register: VolatileCell<u16>,
2874}
2875#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2876pub mod tcd19_citer_elinkyes;
2877#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2878pub struct TCD19_DLASTSGA {
2879 register: VolatileCell<u32>,
2880}
2881#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2882pub mod tcd19_dlastsga;
2883#[doc = "TCD Control and Status"]
2884pub struct TCD19_CSR {
2885 register: VolatileCell<u16>,
2886}
2887#[doc = "TCD Control and Status"]
2888pub mod tcd19_csr;
2889#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2890pub struct TCD19_BITER_ELINKNO {
2891 register: VolatileCell<u16>,
2892}
2893#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2894pub mod tcd19_biter_elinkno;
2895#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2896pub struct TCD19_BITER_ELINKYES {
2897 register: VolatileCell<u16>,
2898}
2899#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2900pub mod tcd19_biter_elinkyes;
2901#[doc = "TCD Source Address"]
2902pub struct TCD20_SADDR {
2903 register: VolatileCell<u32>,
2904}
2905#[doc = "TCD Source Address"]
2906pub mod tcd20_saddr;
2907#[doc = "TCD Signed Source Address Offset"]
2908pub struct TCD20_SOFF {
2909 register: VolatileCell<u16>,
2910}
2911#[doc = "TCD Signed Source Address Offset"]
2912pub mod tcd20_soff;
2913#[doc = "TCD Transfer Attributes"]
2914pub struct TCD20_ATTR {
2915 register: VolatileCell<u16>,
2916}
2917#[doc = "TCD Transfer Attributes"]
2918pub mod tcd20_attr;
2919#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2920pub struct TCD20_NBYTES_MLNO {
2921 register: VolatileCell<u32>,
2922}
2923#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
2924pub mod tcd20_nbytes_mlno;
2925#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2926pub struct TCD20_NBYTES_MLOFFNO {
2927 register: VolatileCell<u32>,
2928}
2929#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
2930pub mod tcd20_nbytes_mloffno;
2931#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2932pub struct TCD20_NBYTES_MLOFFYES {
2933 register: VolatileCell<u32>,
2934}
2935#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
2936pub mod tcd20_nbytes_mloffyes;
2937#[doc = "TCD Last Source Address Adjustment"]
2938pub struct TCD20_SLAST {
2939 register: VolatileCell<u32>,
2940}
2941#[doc = "TCD Last Source Address Adjustment"]
2942pub mod tcd20_slast;
2943#[doc = "TCD Destination Address"]
2944pub struct TCD20_DADDR {
2945 register: VolatileCell<u32>,
2946}
2947#[doc = "TCD Destination Address"]
2948pub mod tcd20_daddr;
2949#[doc = "TCD Signed Destination Address Offset"]
2950pub struct TCD20_DOFF {
2951 register: VolatileCell<u16>,
2952}
2953#[doc = "TCD Signed Destination Address Offset"]
2954pub mod tcd20_doff;
2955#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2956pub struct TCD20_CITER_ELINKNO {
2957 register: VolatileCell<u16>,
2958}
2959#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2960pub mod tcd20_citer_elinkno;
2961#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2962pub struct TCD20_CITER_ELINKYES {
2963 register: VolatileCell<u16>,
2964}
2965#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2966pub mod tcd20_citer_elinkyes;
2967#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2968pub struct TCD20_DLASTSGA {
2969 register: VolatileCell<u32>,
2970}
2971#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
2972pub mod tcd20_dlastsga;
2973#[doc = "TCD Control and Status"]
2974pub struct TCD20_CSR {
2975 register: VolatileCell<u16>,
2976}
2977#[doc = "TCD Control and Status"]
2978pub mod tcd20_csr;
2979#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2980pub struct TCD20_BITER_ELINKNO {
2981 register: VolatileCell<u16>,
2982}
2983#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
2984pub mod tcd20_biter_elinkno;
2985#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2986pub struct TCD20_BITER_ELINKYES {
2987 register: VolatileCell<u16>,
2988}
2989#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
2990pub mod tcd20_biter_elinkyes;
2991#[doc = "TCD Source Address"]
2992pub struct TCD21_SADDR {
2993 register: VolatileCell<u32>,
2994}
2995#[doc = "TCD Source Address"]
2996pub mod tcd21_saddr;
2997#[doc = "TCD Signed Source Address Offset"]
2998pub struct TCD21_SOFF {
2999 register: VolatileCell<u16>,
3000}
3001#[doc = "TCD Signed Source Address Offset"]
3002pub mod tcd21_soff;
3003#[doc = "TCD Transfer Attributes"]
3004pub struct TCD21_ATTR {
3005 register: VolatileCell<u16>,
3006}
3007#[doc = "TCD Transfer Attributes"]
3008pub mod tcd21_attr;
3009#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3010pub struct TCD21_NBYTES_MLNO {
3011 register: VolatileCell<u32>,
3012}
3013#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3014pub mod tcd21_nbytes_mlno;
3015#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3016pub struct TCD21_NBYTES_MLOFFNO {
3017 register: VolatileCell<u32>,
3018}
3019#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3020pub mod tcd21_nbytes_mloffno;
3021#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3022pub struct TCD21_NBYTES_MLOFFYES {
3023 register: VolatileCell<u32>,
3024}
3025#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3026pub mod tcd21_nbytes_mloffyes;
3027#[doc = "TCD Last Source Address Adjustment"]
3028pub struct TCD21_SLAST {
3029 register: VolatileCell<u32>,
3030}
3031#[doc = "TCD Last Source Address Adjustment"]
3032pub mod tcd21_slast;
3033#[doc = "TCD Destination Address"]
3034pub struct TCD21_DADDR {
3035 register: VolatileCell<u32>,
3036}
3037#[doc = "TCD Destination Address"]
3038pub mod tcd21_daddr;
3039#[doc = "TCD Signed Destination Address Offset"]
3040pub struct TCD21_DOFF {
3041 register: VolatileCell<u16>,
3042}
3043#[doc = "TCD Signed Destination Address Offset"]
3044pub mod tcd21_doff;
3045#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3046pub struct TCD21_CITER_ELINKNO {
3047 register: VolatileCell<u16>,
3048}
3049#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3050pub mod tcd21_citer_elinkno;
3051#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3052pub struct TCD21_CITER_ELINKYES {
3053 register: VolatileCell<u16>,
3054}
3055#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3056pub mod tcd21_citer_elinkyes;
3057#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3058pub struct TCD21_DLASTSGA {
3059 register: VolatileCell<u32>,
3060}
3061#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3062pub mod tcd21_dlastsga;
3063#[doc = "TCD Control and Status"]
3064pub struct TCD21_CSR {
3065 register: VolatileCell<u16>,
3066}
3067#[doc = "TCD Control and Status"]
3068pub mod tcd21_csr;
3069#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3070pub struct TCD21_BITER_ELINKNO {
3071 register: VolatileCell<u16>,
3072}
3073#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3074pub mod tcd21_biter_elinkno;
3075#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3076pub struct TCD21_BITER_ELINKYES {
3077 register: VolatileCell<u16>,
3078}
3079#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3080pub mod tcd21_biter_elinkyes;
3081#[doc = "TCD Source Address"]
3082pub struct TCD22_SADDR {
3083 register: VolatileCell<u32>,
3084}
3085#[doc = "TCD Source Address"]
3086pub mod tcd22_saddr;
3087#[doc = "TCD Signed Source Address Offset"]
3088pub struct TCD22_SOFF {
3089 register: VolatileCell<u16>,
3090}
3091#[doc = "TCD Signed Source Address Offset"]
3092pub mod tcd22_soff;
3093#[doc = "TCD Transfer Attributes"]
3094pub struct TCD22_ATTR {
3095 register: VolatileCell<u16>,
3096}
3097#[doc = "TCD Transfer Attributes"]
3098pub mod tcd22_attr;
3099#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3100pub struct TCD22_NBYTES_MLNO {
3101 register: VolatileCell<u32>,
3102}
3103#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3104pub mod tcd22_nbytes_mlno;
3105#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3106pub struct TCD22_NBYTES_MLOFFNO {
3107 register: VolatileCell<u32>,
3108}
3109#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3110pub mod tcd22_nbytes_mloffno;
3111#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3112pub struct TCD22_NBYTES_MLOFFYES {
3113 register: VolatileCell<u32>,
3114}
3115#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3116pub mod tcd22_nbytes_mloffyes;
3117#[doc = "TCD Last Source Address Adjustment"]
3118pub struct TCD22_SLAST {
3119 register: VolatileCell<u32>,
3120}
3121#[doc = "TCD Last Source Address Adjustment"]
3122pub mod tcd22_slast;
3123#[doc = "TCD Destination Address"]
3124pub struct TCD22_DADDR {
3125 register: VolatileCell<u32>,
3126}
3127#[doc = "TCD Destination Address"]
3128pub mod tcd22_daddr;
3129#[doc = "TCD Signed Destination Address Offset"]
3130pub struct TCD22_DOFF {
3131 register: VolatileCell<u16>,
3132}
3133#[doc = "TCD Signed Destination Address Offset"]
3134pub mod tcd22_doff;
3135#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3136pub struct TCD22_CITER_ELINKNO {
3137 register: VolatileCell<u16>,
3138}
3139#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3140pub mod tcd22_citer_elinkno;
3141#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3142pub struct TCD22_CITER_ELINKYES {
3143 register: VolatileCell<u16>,
3144}
3145#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3146pub mod tcd22_citer_elinkyes;
3147#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3148pub struct TCD22_DLASTSGA {
3149 register: VolatileCell<u32>,
3150}
3151#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3152pub mod tcd22_dlastsga;
3153#[doc = "TCD Control and Status"]
3154pub struct TCD22_CSR {
3155 register: VolatileCell<u16>,
3156}
3157#[doc = "TCD Control and Status"]
3158pub mod tcd22_csr;
3159#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3160pub struct TCD22_BITER_ELINKNO {
3161 register: VolatileCell<u16>,
3162}
3163#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3164pub mod tcd22_biter_elinkno;
3165#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3166pub struct TCD22_BITER_ELINKYES {
3167 register: VolatileCell<u16>,
3168}
3169#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3170pub mod tcd22_biter_elinkyes;
3171#[doc = "TCD Source Address"]
3172pub struct TCD23_SADDR {
3173 register: VolatileCell<u32>,
3174}
3175#[doc = "TCD Source Address"]
3176pub mod tcd23_saddr;
3177#[doc = "TCD Signed Source Address Offset"]
3178pub struct TCD23_SOFF {
3179 register: VolatileCell<u16>,
3180}
3181#[doc = "TCD Signed Source Address Offset"]
3182pub mod tcd23_soff;
3183#[doc = "TCD Transfer Attributes"]
3184pub struct TCD23_ATTR {
3185 register: VolatileCell<u16>,
3186}
3187#[doc = "TCD Transfer Attributes"]
3188pub mod tcd23_attr;
3189#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3190pub struct TCD23_NBYTES_MLNO {
3191 register: VolatileCell<u32>,
3192}
3193#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3194pub mod tcd23_nbytes_mlno;
3195#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3196pub struct TCD23_NBYTES_MLOFFNO {
3197 register: VolatileCell<u32>,
3198}
3199#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3200pub mod tcd23_nbytes_mloffno;
3201#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3202pub struct TCD23_NBYTES_MLOFFYES {
3203 register: VolatileCell<u32>,
3204}
3205#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3206pub mod tcd23_nbytes_mloffyes;
3207#[doc = "TCD Last Source Address Adjustment"]
3208pub struct TCD23_SLAST {
3209 register: VolatileCell<u32>,
3210}
3211#[doc = "TCD Last Source Address Adjustment"]
3212pub mod tcd23_slast;
3213#[doc = "TCD Destination Address"]
3214pub struct TCD23_DADDR {
3215 register: VolatileCell<u32>,
3216}
3217#[doc = "TCD Destination Address"]
3218pub mod tcd23_daddr;
3219#[doc = "TCD Signed Destination Address Offset"]
3220pub struct TCD23_DOFF {
3221 register: VolatileCell<u16>,
3222}
3223#[doc = "TCD Signed Destination Address Offset"]
3224pub mod tcd23_doff;
3225#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3226pub struct TCD23_CITER_ELINKNO {
3227 register: VolatileCell<u16>,
3228}
3229#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3230pub mod tcd23_citer_elinkno;
3231#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3232pub struct TCD23_CITER_ELINKYES {
3233 register: VolatileCell<u16>,
3234}
3235#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3236pub mod tcd23_citer_elinkyes;
3237#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3238pub struct TCD23_DLASTSGA {
3239 register: VolatileCell<u32>,
3240}
3241#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3242pub mod tcd23_dlastsga;
3243#[doc = "TCD Control and Status"]
3244pub struct TCD23_CSR {
3245 register: VolatileCell<u16>,
3246}
3247#[doc = "TCD Control and Status"]
3248pub mod tcd23_csr;
3249#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3250pub struct TCD23_BITER_ELINKNO {
3251 register: VolatileCell<u16>,
3252}
3253#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3254pub mod tcd23_biter_elinkno;
3255#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3256pub struct TCD23_BITER_ELINKYES {
3257 register: VolatileCell<u16>,
3258}
3259#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3260pub mod tcd23_biter_elinkyes;
3261#[doc = "TCD Source Address"]
3262pub struct TCD24_SADDR {
3263 register: VolatileCell<u32>,
3264}
3265#[doc = "TCD Source Address"]
3266pub mod tcd24_saddr;
3267#[doc = "TCD Signed Source Address Offset"]
3268pub struct TCD24_SOFF {
3269 register: VolatileCell<u16>,
3270}
3271#[doc = "TCD Signed Source Address Offset"]
3272pub mod tcd24_soff;
3273#[doc = "TCD Transfer Attributes"]
3274pub struct TCD24_ATTR {
3275 register: VolatileCell<u16>,
3276}
3277#[doc = "TCD Transfer Attributes"]
3278pub mod tcd24_attr;
3279#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3280pub struct TCD24_NBYTES_MLNO {
3281 register: VolatileCell<u32>,
3282}
3283#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3284pub mod tcd24_nbytes_mlno;
3285#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3286pub struct TCD24_NBYTES_MLOFFNO {
3287 register: VolatileCell<u32>,
3288}
3289#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3290pub mod tcd24_nbytes_mloffno;
3291#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3292pub struct TCD24_NBYTES_MLOFFYES {
3293 register: VolatileCell<u32>,
3294}
3295#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3296pub mod tcd24_nbytes_mloffyes;
3297#[doc = "TCD Last Source Address Adjustment"]
3298pub struct TCD24_SLAST {
3299 register: VolatileCell<u32>,
3300}
3301#[doc = "TCD Last Source Address Adjustment"]
3302pub mod tcd24_slast;
3303#[doc = "TCD Destination Address"]
3304pub struct TCD24_DADDR {
3305 register: VolatileCell<u32>,
3306}
3307#[doc = "TCD Destination Address"]
3308pub mod tcd24_daddr;
3309#[doc = "TCD Signed Destination Address Offset"]
3310pub struct TCD24_DOFF {
3311 register: VolatileCell<u16>,
3312}
3313#[doc = "TCD Signed Destination Address Offset"]
3314pub mod tcd24_doff;
3315#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3316pub struct TCD24_CITER_ELINKNO {
3317 register: VolatileCell<u16>,
3318}
3319#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3320pub mod tcd24_citer_elinkno;
3321#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3322pub struct TCD24_CITER_ELINKYES {
3323 register: VolatileCell<u16>,
3324}
3325#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3326pub mod tcd24_citer_elinkyes;
3327#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3328pub struct TCD24_DLASTSGA {
3329 register: VolatileCell<u32>,
3330}
3331#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3332pub mod tcd24_dlastsga;
3333#[doc = "TCD Control and Status"]
3334pub struct TCD24_CSR {
3335 register: VolatileCell<u16>,
3336}
3337#[doc = "TCD Control and Status"]
3338pub mod tcd24_csr;
3339#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3340pub struct TCD24_BITER_ELINKNO {
3341 register: VolatileCell<u16>,
3342}
3343#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3344pub mod tcd24_biter_elinkno;
3345#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3346pub struct TCD24_BITER_ELINKYES {
3347 register: VolatileCell<u16>,
3348}
3349#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3350pub mod tcd24_biter_elinkyes;
3351#[doc = "TCD Source Address"]
3352pub struct TCD25_SADDR {
3353 register: VolatileCell<u32>,
3354}
3355#[doc = "TCD Source Address"]
3356pub mod tcd25_saddr;
3357#[doc = "TCD Signed Source Address Offset"]
3358pub struct TCD25_SOFF {
3359 register: VolatileCell<u16>,
3360}
3361#[doc = "TCD Signed Source Address Offset"]
3362pub mod tcd25_soff;
3363#[doc = "TCD Transfer Attributes"]
3364pub struct TCD25_ATTR {
3365 register: VolatileCell<u16>,
3366}
3367#[doc = "TCD Transfer Attributes"]
3368pub mod tcd25_attr;
3369#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3370pub struct TCD25_NBYTES_MLNO {
3371 register: VolatileCell<u32>,
3372}
3373#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3374pub mod tcd25_nbytes_mlno;
3375#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3376pub struct TCD25_NBYTES_MLOFFNO {
3377 register: VolatileCell<u32>,
3378}
3379#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3380pub mod tcd25_nbytes_mloffno;
3381#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3382pub struct TCD25_NBYTES_MLOFFYES {
3383 register: VolatileCell<u32>,
3384}
3385#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3386pub mod tcd25_nbytes_mloffyes;
3387#[doc = "TCD Last Source Address Adjustment"]
3388pub struct TCD25_SLAST {
3389 register: VolatileCell<u32>,
3390}
3391#[doc = "TCD Last Source Address Adjustment"]
3392pub mod tcd25_slast;
3393#[doc = "TCD Destination Address"]
3394pub struct TCD25_DADDR {
3395 register: VolatileCell<u32>,
3396}
3397#[doc = "TCD Destination Address"]
3398pub mod tcd25_daddr;
3399#[doc = "TCD Signed Destination Address Offset"]
3400pub struct TCD25_DOFF {
3401 register: VolatileCell<u16>,
3402}
3403#[doc = "TCD Signed Destination Address Offset"]
3404pub mod tcd25_doff;
3405#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3406pub struct TCD25_CITER_ELINKNO {
3407 register: VolatileCell<u16>,
3408}
3409#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3410pub mod tcd25_citer_elinkno;
3411#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3412pub struct TCD25_CITER_ELINKYES {
3413 register: VolatileCell<u16>,
3414}
3415#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3416pub mod tcd25_citer_elinkyes;
3417#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3418pub struct TCD25_DLASTSGA {
3419 register: VolatileCell<u32>,
3420}
3421#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3422pub mod tcd25_dlastsga;
3423#[doc = "TCD Control and Status"]
3424pub struct TCD25_CSR {
3425 register: VolatileCell<u16>,
3426}
3427#[doc = "TCD Control and Status"]
3428pub mod tcd25_csr;
3429#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3430pub struct TCD25_BITER_ELINKNO {
3431 register: VolatileCell<u16>,
3432}
3433#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3434pub mod tcd25_biter_elinkno;
3435#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3436pub struct TCD25_BITER_ELINKYES {
3437 register: VolatileCell<u16>,
3438}
3439#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3440pub mod tcd25_biter_elinkyes;
3441#[doc = "TCD Source Address"]
3442pub struct TCD26_SADDR {
3443 register: VolatileCell<u32>,
3444}
3445#[doc = "TCD Source Address"]
3446pub mod tcd26_saddr;
3447#[doc = "TCD Signed Source Address Offset"]
3448pub struct TCD26_SOFF {
3449 register: VolatileCell<u16>,
3450}
3451#[doc = "TCD Signed Source Address Offset"]
3452pub mod tcd26_soff;
3453#[doc = "TCD Transfer Attributes"]
3454pub struct TCD26_ATTR {
3455 register: VolatileCell<u16>,
3456}
3457#[doc = "TCD Transfer Attributes"]
3458pub mod tcd26_attr;
3459#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3460pub struct TCD26_NBYTES_MLNO {
3461 register: VolatileCell<u32>,
3462}
3463#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3464pub mod tcd26_nbytes_mlno;
3465#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3466pub struct TCD26_NBYTES_MLOFFNO {
3467 register: VolatileCell<u32>,
3468}
3469#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3470pub mod tcd26_nbytes_mloffno;
3471#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3472pub struct TCD26_NBYTES_MLOFFYES {
3473 register: VolatileCell<u32>,
3474}
3475#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3476pub mod tcd26_nbytes_mloffyes;
3477#[doc = "TCD Last Source Address Adjustment"]
3478pub struct TCD26_SLAST {
3479 register: VolatileCell<u32>,
3480}
3481#[doc = "TCD Last Source Address Adjustment"]
3482pub mod tcd26_slast;
3483#[doc = "TCD Destination Address"]
3484pub struct TCD26_DADDR {
3485 register: VolatileCell<u32>,
3486}
3487#[doc = "TCD Destination Address"]
3488pub mod tcd26_daddr;
3489#[doc = "TCD Signed Destination Address Offset"]
3490pub struct TCD26_DOFF {
3491 register: VolatileCell<u16>,
3492}
3493#[doc = "TCD Signed Destination Address Offset"]
3494pub mod tcd26_doff;
3495#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3496pub struct TCD26_CITER_ELINKNO {
3497 register: VolatileCell<u16>,
3498}
3499#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3500pub mod tcd26_citer_elinkno;
3501#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3502pub struct TCD26_CITER_ELINKYES {
3503 register: VolatileCell<u16>,
3504}
3505#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3506pub mod tcd26_citer_elinkyes;
3507#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3508pub struct TCD26_DLASTSGA {
3509 register: VolatileCell<u32>,
3510}
3511#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3512pub mod tcd26_dlastsga;
3513#[doc = "TCD Control and Status"]
3514pub struct TCD26_CSR {
3515 register: VolatileCell<u16>,
3516}
3517#[doc = "TCD Control and Status"]
3518pub mod tcd26_csr;
3519#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3520pub struct TCD26_BITER_ELINKNO {
3521 register: VolatileCell<u16>,
3522}
3523#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3524pub mod tcd26_biter_elinkno;
3525#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3526pub struct TCD26_BITER_ELINKYES {
3527 register: VolatileCell<u16>,
3528}
3529#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3530pub mod tcd26_biter_elinkyes;
3531#[doc = "TCD Source Address"]
3532pub struct TCD27_SADDR {
3533 register: VolatileCell<u32>,
3534}
3535#[doc = "TCD Source Address"]
3536pub mod tcd27_saddr;
3537#[doc = "TCD Signed Source Address Offset"]
3538pub struct TCD27_SOFF {
3539 register: VolatileCell<u16>,
3540}
3541#[doc = "TCD Signed Source Address Offset"]
3542pub mod tcd27_soff;
3543#[doc = "TCD Transfer Attributes"]
3544pub struct TCD27_ATTR {
3545 register: VolatileCell<u16>,
3546}
3547#[doc = "TCD Transfer Attributes"]
3548pub mod tcd27_attr;
3549#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3550pub struct TCD27_NBYTES_MLNO {
3551 register: VolatileCell<u32>,
3552}
3553#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3554pub mod tcd27_nbytes_mlno;
3555#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3556pub struct TCD27_NBYTES_MLOFFNO {
3557 register: VolatileCell<u32>,
3558}
3559#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3560pub mod tcd27_nbytes_mloffno;
3561#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3562pub struct TCD27_NBYTES_MLOFFYES {
3563 register: VolatileCell<u32>,
3564}
3565#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3566pub mod tcd27_nbytes_mloffyes;
3567#[doc = "TCD Last Source Address Adjustment"]
3568pub struct TCD27_SLAST {
3569 register: VolatileCell<u32>,
3570}
3571#[doc = "TCD Last Source Address Adjustment"]
3572pub mod tcd27_slast;
3573#[doc = "TCD Destination Address"]
3574pub struct TCD27_DADDR {
3575 register: VolatileCell<u32>,
3576}
3577#[doc = "TCD Destination Address"]
3578pub mod tcd27_daddr;
3579#[doc = "TCD Signed Destination Address Offset"]
3580pub struct TCD27_DOFF {
3581 register: VolatileCell<u16>,
3582}
3583#[doc = "TCD Signed Destination Address Offset"]
3584pub mod tcd27_doff;
3585#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3586pub struct TCD27_CITER_ELINKNO {
3587 register: VolatileCell<u16>,
3588}
3589#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3590pub mod tcd27_citer_elinkno;
3591#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3592pub struct TCD27_CITER_ELINKYES {
3593 register: VolatileCell<u16>,
3594}
3595#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3596pub mod tcd27_citer_elinkyes;
3597#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3598pub struct TCD27_DLASTSGA {
3599 register: VolatileCell<u32>,
3600}
3601#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3602pub mod tcd27_dlastsga;
3603#[doc = "TCD Control and Status"]
3604pub struct TCD27_CSR {
3605 register: VolatileCell<u16>,
3606}
3607#[doc = "TCD Control and Status"]
3608pub mod tcd27_csr;
3609#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3610pub struct TCD27_BITER_ELINKNO {
3611 register: VolatileCell<u16>,
3612}
3613#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3614pub mod tcd27_biter_elinkno;
3615#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3616pub struct TCD27_BITER_ELINKYES {
3617 register: VolatileCell<u16>,
3618}
3619#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3620pub mod tcd27_biter_elinkyes;
3621#[doc = "TCD Source Address"]
3622pub struct TCD28_SADDR {
3623 register: VolatileCell<u32>,
3624}
3625#[doc = "TCD Source Address"]
3626pub mod tcd28_saddr;
3627#[doc = "TCD Signed Source Address Offset"]
3628pub struct TCD28_SOFF {
3629 register: VolatileCell<u16>,
3630}
3631#[doc = "TCD Signed Source Address Offset"]
3632pub mod tcd28_soff;
3633#[doc = "TCD Transfer Attributes"]
3634pub struct TCD28_ATTR {
3635 register: VolatileCell<u16>,
3636}
3637#[doc = "TCD Transfer Attributes"]
3638pub mod tcd28_attr;
3639#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3640pub struct TCD28_NBYTES_MLNO {
3641 register: VolatileCell<u32>,
3642}
3643#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3644pub mod tcd28_nbytes_mlno;
3645#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3646pub struct TCD28_NBYTES_MLOFFNO {
3647 register: VolatileCell<u32>,
3648}
3649#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3650pub mod tcd28_nbytes_mloffno;
3651#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3652pub struct TCD28_NBYTES_MLOFFYES {
3653 register: VolatileCell<u32>,
3654}
3655#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3656pub mod tcd28_nbytes_mloffyes;
3657#[doc = "TCD Last Source Address Adjustment"]
3658pub struct TCD28_SLAST {
3659 register: VolatileCell<u32>,
3660}
3661#[doc = "TCD Last Source Address Adjustment"]
3662pub mod tcd28_slast;
3663#[doc = "TCD Destination Address"]
3664pub struct TCD28_DADDR {
3665 register: VolatileCell<u32>,
3666}
3667#[doc = "TCD Destination Address"]
3668pub mod tcd28_daddr;
3669#[doc = "TCD Signed Destination Address Offset"]
3670pub struct TCD28_DOFF {
3671 register: VolatileCell<u16>,
3672}
3673#[doc = "TCD Signed Destination Address Offset"]
3674pub mod tcd28_doff;
3675#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3676pub struct TCD28_CITER_ELINKNO {
3677 register: VolatileCell<u16>,
3678}
3679#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3680pub mod tcd28_citer_elinkno;
3681#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3682pub struct TCD28_CITER_ELINKYES {
3683 register: VolatileCell<u16>,
3684}
3685#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3686pub mod tcd28_citer_elinkyes;
3687#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3688pub struct TCD28_DLASTSGA {
3689 register: VolatileCell<u32>,
3690}
3691#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3692pub mod tcd28_dlastsga;
3693#[doc = "TCD Control and Status"]
3694pub struct TCD28_CSR {
3695 register: VolatileCell<u16>,
3696}
3697#[doc = "TCD Control and Status"]
3698pub mod tcd28_csr;
3699#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3700pub struct TCD28_BITER_ELINKNO {
3701 register: VolatileCell<u16>,
3702}
3703#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3704pub mod tcd28_biter_elinkno;
3705#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3706pub struct TCD28_BITER_ELINKYES {
3707 register: VolatileCell<u16>,
3708}
3709#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3710pub mod tcd28_biter_elinkyes;
3711#[doc = "TCD Source Address"]
3712pub struct TCD29_SADDR {
3713 register: VolatileCell<u32>,
3714}
3715#[doc = "TCD Source Address"]
3716pub mod tcd29_saddr;
3717#[doc = "TCD Signed Source Address Offset"]
3718pub struct TCD29_SOFF {
3719 register: VolatileCell<u16>,
3720}
3721#[doc = "TCD Signed Source Address Offset"]
3722pub mod tcd29_soff;
3723#[doc = "TCD Transfer Attributes"]
3724pub struct TCD29_ATTR {
3725 register: VolatileCell<u16>,
3726}
3727#[doc = "TCD Transfer Attributes"]
3728pub mod tcd29_attr;
3729#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3730pub struct TCD29_NBYTES_MLNO {
3731 register: VolatileCell<u32>,
3732}
3733#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3734pub mod tcd29_nbytes_mlno;
3735#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3736pub struct TCD29_NBYTES_MLOFFNO {
3737 register: VolatileCell<u32>,
3738}
3739#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3740pub mod tcd29_nbytes_mloffno;
3741#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3742pub struct TCD29_NBYTES_MLOFFYES {
3743 register: VolatileCell<u32>,
3744}
3745#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3746pub mod tcd29_nbytes_mloffyes;
3747#[doc = "TCD Last Source Address Adjustment"]
3748pub struct TCD29_SLAST {
3749 register: VolatileCell<u32>,
3750}
3751#[doc = "TCD Last Source Address Adjustment"]
3752pub mod tcd29_slast;
3753#[doc = "TCD Destination Address"]
3754pub struct TCD29_DADDR {
3755 register: VolatileCell<u32>,
3756}
3757#[doc = "TCD Destination Address"]
3758pub mod tcd29_daddr;
3759#[doc = "TCD Signed Destination Address Offset"]
3760pub struct TCD29_DOFF {
3761 register: VolatileCell<u16>,
3762}
3763#[doc = "TCD Signed Destination Address Offset"]
3764pub mod tcd29_doff;
3765#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3766pub struct TCD29_CITER_ELINKNO {
3767 register: VolatileCell<u16>,
3768}
3769#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3770pub mod tcd29_citer_elinkno;
3771#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3772pub struct TCD29_CITER_ELINKYES {
3773 register: VolatileCell<u16>,
3774}
3775#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3776pub mod tcd29_citer_elinkyes;
3777#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3778pub struct TCD29_DLASTSGA {
3779 register: VolatileCell<u32>,
3780}
3781#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3782pub mod tcd29_dlastsga;
3783#[doc = "TCD Control and Status"]
3784pub struct TCD29_CSR {
3785 register: VolatileCell<u16>,
3786}
3787#[doc = "TCD Control and Status"]
3788pub mod tcd29_csr;
3789#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3790pub struct TCD29_BITER_ELINKNO {
3791 register: VolatileCell<u16>,
3792}
3793#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3794pub mod tcd29_biter_elinkno;
3795#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3796pub struct TCD29_BITER_ELINKYES {
3797 register: VolatileCell<u16>,
3798}
3799#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3800pub mod tcd29_biter_elinkyes;
3801#[doc = "TCD Source Address"]
3802pub struct TCD30_SADDR {
3803 register: VolatileCell<u32>,
3804}
3805#[doc = "TCD Source Address"]
3806pub mod tcd30_saddr;
3807#[doc = "TCD Signed Source Address Offset"]
3808pub struct TCD30_SOFF {
3809 register: VolatileCell<u16>,
3810}
3811#[doc = "TCD Signed Source Address Offset"]
3812pub mod tcd30_soff;
3813#[doc = "TCD Transfer Attributes"]
3814pub struct TCD30_ATTR {
3815 register: VolatileCell<u16>,
3816}
3817#[doc = "TCD Transfer Attributes"]
3818pub mod tcd30_attr;
3819#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3820pub struct TCD30_NBYTES_MLNO {
3821 register: VolatileCell<u32>,
3822}
3823#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3824pub mod tcd30_nbytes_mlno;
3825#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3826pub struct TCD30_NBYTES_MLOFFNO {
3827 register: VolatileCell<u32>,
3828}
3829#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3830pub mod tcd30_nbytes_mloffno;
3831#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3832pub struct TCD30_NBYTES_MLOFFYES {
3833 register: VolatileCell<u32>,
3834}
3835#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3836pub mod tcd30_nbytes_mloffyes;
3837#[doc = "TCD Last Source Address Adjustment"]
3838pub struct TCD30_SLAST {
3839 register: VolatileCell<u32>,
3840}
3841#[doc = "TCD Last Source Address Adjustment"]
3842pub mod tcd30_slast;
3843#[doc = "TCD Destination Address"]
3844pub struct TCD30_DADDR {
3845 register: VolatileCellz<u32>,
3846}
3847#[doc = "TCD Destination Address"]
3848pub mod tcd30_daddr;
3849#[doc = "TCD Signed Destination Address Offset"]
3850pub struct TCD30_DOFF {
3851 register: VolatileCell<u16>,
3852}
3853#[doc = "TCD Signed Destination Address Offset"]
3854pub mod tcd30_doff;
3855#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3856pub struct TCD30_CITER_ELINKNO {
3857 register: VolatileCell<u16>,
3858}
3859#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3860pub mod tcd30_citer_elinkno;
3861#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3862pub struct TCD30_CITER_ELINKYES {
3863 register: VolatileCell<u16>,
3864}
3865#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3866pub mod tcd30_citer_elinkyes;
3867#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3868pub struct TCD30_DLASTSGA {
3869 register: VolatileCell<u32>,
3870}
3871#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3872pub mod tcd30_dlastsga;
3873#[doc = "TCD Control and Status"]
3874pub struct TCD30_CSR {
3875 register: VolatileCell<u16>,
3876}
3877#[doc = "TCD Control and Status"]
3878pub mod tcd30_csr;
3879#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3880pub struct TCD30_BITER_ELINKNO {
3881 register: VolatileCell<u16>,
3882}
3883#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3884pub mod tcd30_biter_elinkno;
3885#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3886pub struct TCD30_BITER_ELINKYES {
3887 register: VolatileCell<u16>,
3888}
3889#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3890pub mod tcd30_biter_elinkyes;
3891#[doc = "TCD Source Address"]
3892pub struct TCD31_SADDR {
3893 register: VolatileCell<u32>,
3894}
3895#[doc = "TCD Source Address"]
3896pub mod tcd31_saddr;
3897#[doc = "TCD Signed Source Address Offset"]
3898pub struct TCD31_SOFF {
3899 register: VolatileCell<u16>,
3900}
3901#[doc = "TCD Signed Source Address Offset"]
3902pub mod tcd31_soff;
3903#[doc = "TCD Transfer Attributes"]
3904pub struct TCD31_ATTR {
3905 register: VolatileCell<u16>,
3906}
3907#[doc = "TCD Transfer Attributes"]
3908pub mod tcd31_attr;
3909#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3910pub struct TCD31_NBYTES_MLNO {
3911 register: VolatileCell<u32>,
3912}
3913#[doc = "TCD Minor Byte Count (Minor Loop Mapping Disabled)"]
3914pub mod tcd31_nbytes_mlno;
3915#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3916pub struct TCD31_NBYTES_MLOFFNO {
3917 register: VolatileCell<u32>,
3918}
3919#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping Enabled and Offset Disabled)"]
3920pub mod tcd31_nbytes_mloffno;
3921#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3922pub struct TCD31_NBYTES_MLOFFYES {
3923 register: VolatileCell<u32>,
3924}
3925#[doc = "TCD Signed Minor Loop Offset (Minor Loop Mapping and Offset Enabled)"]
3926pub mod tcd31_nbytes_mloffyes;
3927#[doc = "TCD Last Source Address Adjustment"]
3928pub struct TCD31_SLAST {
3929 register: VolatileCell<u32>,
3930}
3931#[doc = "TCD Last Source Address Adjustment"]
3932pub mod tcd31_slast;
3933#[doc = "TCD Destination Address"]
3934pub struct TCD31_DADDR {
3935 register: VolatileCell<u32>,
3936}
3937#[doc = "TCD Destination Address"]
3938pub mod tcd31_daddr;
3939#[doc = "TCD Signed Destination Address Offset"]
3940pub struct TCD31_DOFF {
3941 register: VolatileCell<u16>,
3942}
3943#[doc = "TCD Signed Destination Address Offset"]
3944pub mod tcd31_doff;
3945#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3946pub struct TCD31_CITER_ELINKNO {
3947 register: VolatileCell<u16>,
3948}
3949#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3950pub mod tcd31_citer_elinkno;
3951#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3952pub struct TCD31_CITER_ELINKYES {
3953 register: VolatileCell<u16>,
3954}
3955#[doc = "TCD Current Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3956pub mod tcd31_citer_elinkyes;
3957#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3958pub struct TCD31_DLASTSGA {
3959 register: VolatileCell<u32>,
3960}
3961#[doc = "TCD Last Destination Address Adjustment/Scatter Gather Address"]
3962pub mod tcd31_dlastsga;
3963#[doc = "TCD Control and Status"]
3964pub struct TCD31_CSR {
3965 register: VolatileCell<u32>,
3966}
3967#[doc = "TCD Control and Status"]
3968pub mod tcd31_csr;
3969#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3970pub struct TCD31_BITER_ELINKNO {
3971 register: VolatileCell<u16>,
3972}
3973#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Disabled)"]
3974pub mod tcd31_biter_elinkno;
3975#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3976pub struct TCD31_BITER_ELINKYES {
3977 register: VolatileCell<u16>,
3978}
3979#[doc = "TCD Beginning Minor Loop Link, Major Loop Count (Channel Linking Enabled)"]
3980pub mod tcd31_biter_elinkyes;