Skip to content

Commit d79beda

Browse files
authored
Merge pull request #692 from rust-embedded/parens
accessors everywhere (breaking)
2 parents a5bd928 + cfc5ab0 commit d79beda

File tree

12 files changed

+450
-271
lines changed

12 files changed

+450
-271
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
- { rust: stable, vendor: Spansion, options: "--atomics" }
7676
- { rust: stable, vendor: STMicro, options: "" }
7777
- { rust: stable, vendor: STMicro, options: "--atomics" }
78-
- { rust: stable, vendor: STM32-patched, options: "--strict --array_proxy --pascal_enum_values --max_cluster_size --atomics --atomics_feature atomics" }
78+
- { rust: stable, vendor: STM32-patched, options: "--strict --pascal_enum_values --max_cluster_size --atomics --atomics_feature atomics" }
7979
- { rust: stable, vendor: Toshiba, options: all }
8080
- { rust: stable, vendor: Toshiba, options: "" }
8181
# Test MSRV

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/).
77

88
## [Unreleased]
99

10+
- Use methods to access any register or cluster
1011
- Remove all deny lints from generated crate
1112
- Add `reexport_core_peripherals` and `reexport_interrupt` features disabled by default
12-
- rename `const-generic` feature to `array_proxy`
13+
- ~~rename `const-generic` feature to `array_proxy`~~ remove `ArrayProxy`
1314
- `FieldWriter` takes offset as struct field instead of const generic.
1415
Improves SVD field array access
1516
Add `width`, `offset` methods

ci/script.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ main() {
3131

3232
case $OPTIONS in
3333
all)
34-
options="--array_proxy --strict --atomics"
34+
options="--strict --atomics"
3535
;;
3636
*)
3737
options=$OPTIONS

src/generate/array_proxy.rs

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/generate/device.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ pub fn render(d: &Device, config: &Config, device_x: &mut String) -> Result<Toke
138138

139139
let generic_file = include_str!("generic.rs");
140140
let generic_atomic_file = include_str!("generic_atomic.rs");
141-
let array_proxy = include_str!("array_proxy.rs");
142141
if config.generic_mod {
143142
let mut file = File::create(config.output_dir.join("generic.rs"))?;
144143
writeln!(file, "{generic_file}")?;
@@ -148,9 +147,6 @@ pub fn render(d: &Device, config: &Config, device_x: &mut String) -> Result<Toke
148147
}
149148
writeln!(file, "\n{generic_atomic_file}")?;
150149
}
151-
if config.array_proxy {
152-
writeln!(file, "{array_proxy}")?;
153-
}
154150

155151
if !config.make_mod {
156152
out.extend(quote! {
@@ -168,9 +164,6 @@ pub fn render(d: &Device, config: &Config, device_x: &mut String) -> Result<Toke
168164
}
169165
syn::parse_file(generic_atomic_file)?.to_tokens(&mut tokens);
170166
}
171-
if config.array_proxy {
172-
syn::parse_file(array_proxy)?.to_tokens(&mut tokens);
173-
}
174167

175168
out.extend(quote! {
176169
#[allow(unused_imports)]

src/generate/interrupt.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ pub fn render(
6767
.unwrap_or_else(|| interrupt.0.name.clone())
6868
);
6969

70-
let value = util::unsuffixed(interrupt.0.value.into());
70+
let value = util::unsuffixed(interrupt.0.value);
7171

7272
let mut feature_attribute_flag = false;
7373
let mut feature_attribute = TokenStream::new();
@@ -111,7 +111,7 @@ pub fn render(
111111
names_cfg_attr.push(feature_attribute);
112112
}
113113

114-
let n = util::unsuffixed(pos.into());
114+
let n = util::unsuffixed(pos);
115115
match target {
116116
Target::CortexM => {
117117
for name in &names {

0 commit comments

Comments
 (0)