add va416xx regularly

This commit is contained in:
2024-06-11 13:46:49 +02:00
parent 18b2432f6b
commit 9aa0eeb3ce
594 changed files with 122764 additions and 4 deletions

21
va416xx/gen-helper.sh Executable file
View File

@ -0,0 +1,21 @@
#!/bin/sh
# Use installed tool by default
svd2rust_bin="svd2rust"
# Automates the steps specified in https://docs.rs/svd2rust/0.19.0/svd2rust/
if [ -f svd2rust ]; then
# If the local directory contains svd2rust, use that version instead
svd2rust_bin="./svd2rust"
elif [ -f ../svd2rust ]; then
# Keeps the repository clean
svd2rust_bin="../svd2rust"
fi
if [ -x "$(${svd2rust_bin} --version)" ]; then
echo "No svd2rust found locally or installed." \
"Install it with cargo install svd2rust"
exit
fi
${svd2rust_bin} -i svd/va416xx-base.svd
rm -rf src
form -i lib.rs -o src/ && rm lib.rs
cargo fmt