Skip to content

Commit 5a0edfe

Browse files
authored
Merge pull request #680 from xoviat/n6
add changes for n6
2 parents 63f5667 + 5c1bf73 commit 5a0edfe

File tree

8 files changed

+15288
-13930
lines changed

8 files changed

+15288
-13930
lines changed

d.ps1

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
11
<# #>
22
param (
3-
[Parameter(Mandatory=$true)]
3+
[Parameter(Mandatory = $true)]
44
[string]$CMD,
55

66
[string]$peri
77
)
88

9-
$REV="1659e761beb29d3949bd1ec72039c3ce5f6bdf6c"
9+
$REV = "db4473fae6a41fcad7f5c824dcaadba3a6e060e9"
1010

11-
Switch ($CMD)
12-
{
11+
Switch ($CMD) {
1312
"download-all" {
1413
rm -r -Force ./sources/ -ErrorAction SilentlyContinue
1514
git clone https://github.com/embassy-rs/stm32-data-sources.git ./sources/
@@ -33,7 +32,8 @@ Switch ($CMD)
3332
if ($LASTEXITCODE -eq 0) {
3433
rm "tmp/$peri/$f.err"
3534
echo OK
36-
} else {
35+
}
36+
else {
3737
rm "tmp/$peri/$f.yaml"
3838
echo FAIL
3939
}
@@ -44,7 +44,18 @@ Switch ($CMD)
4444
rm -r -Force build/data -ErrorAction SilentlyContinue
4545
cargo run --release --bin stm32-data-gen
4646
}
47+
"gen-all" {
48+
rm -r -Force build/data -ErrorAction SilentlyContinue
49+
rm -r -Force build/stm32-metapac -ErrorAction SilentlyContinue
50+
cargo run --release --bin stm32-data-gen
51+
cargo run --release --bin stm32-metapac-gen
52+
cd build/stm32-metapac
53+
54+
$files = ls -Recurse -Filter '*.rs' | Where-Object { $_.FullName -notmatch 'target' } | % { $_.FullName } | Resolve-Path -Relative
55+
$counter = [pscustomobject] @{ Value = 0 }
56+
$files | Group-Object -Property { [math]::Floor($counter.Value++ / 200 ) } | % { rustfmt --skip-children --unstable-features --edition 2021 $_.Group }
57+
}
4758
default {
4859
echo "unknown command"
4960
}
50-
}
61+
}

0 commit comments

Comments
 (0)