change(converter): name "field" for autogened virtual field

instead of val_ prefixed register name
This commit is contained in:
Wataru Otsubo 2025-05-20 18:55:07 +09:00
parent 83e0c6cb3d
commit eee043cd0f

View file

@ -520,8 +520,9 @@ impl Field {
/// Generate virtual Field from Registers node (piracy), guessing a lot of parameters. /// Generate virtual Field from Registers node (piracy), guessing a lot of parameters.
pub(crate) fn from_xml_register_dom(node: Node) -> Result<Self, DomConversionError> { pub(crate) fn from_xml_register_dom(node: Node) -> Result<Self, DomConversionError> {
// Prepend "val_" to avoid name confliction with struct for accessing values // // Prepend "val_" to avoid name confliction with struct for accessing values
let name = "val_".to_string() + &util::get_name(node)?; // let name = "val_".to_string() + &util::get_name(node)?;
let name = "field".to_string();
let mask = match node.attribute("mask") { let mask = match node.attribute("mask") {
Some(mask) => mask Some(mask) => mask
.parse_prefixed_u32() .parse_prefixed_u32()