mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-15 08:30:02 +00:00
svd2utra: remove generation of unused offset enum
This commit is contained in:
parent
47b5b88438
commit
cf9af664dc
1 changed files with 0 additions and 20 deletions
|
|
@ -1,4 +1,3 @@
|
|||
use convert_case::{Case, Casing};
|
||||
use quick_xml::events::{attributes::Attribute, Event};
|
||||
use quick_xml::Reader;
|
||||
use std::io::{BufRead, BufReader, Read, Write};
|
||||
|
|
@ -893,25 +892,6 @@ pub mod utra {
|
|||
for peripheral in peripherals {
|
||||
writeln!(out)?;
|
||||
writeln!(out, " pub mod {} {{", peripheral.name.to_lowercase())?;
|
||||
writeln!(
|
||||
out,
|
||||
" // this enum is vestigal, and currently not used by anything"
|
||||
)?;
|
||||
writeln!(out, " #[derive(Debug, Copy, Clone)]")?;
|
||||
writeln!(
|
||||
out,
|
||||
" pub enum {}Offset {{",
|
||||
peripheral.name.to_case(Case::UpperCamel)
|
||||
)?;
|
||||
for register in &peripheral.registers {
|
||||
writeln!(
|
||||
out,
|
||||
" {} = {},",
|
||||
register.name.to_case(Case::UpperCamel),
|
||||
register.offset
|
||||
)?;
|
||||
}
|
||||
writeln!(out, " }}")?;
|
||||
writeln!(
|
||||
out,
|
||||
" pub const {}_NUMREGS: usize = {};",
|
||||
|
|
|
|||
Loading…
Reference in a new issue