svd-generator 0.4.3

Converts device information from flattened device tree into an SVD description
Documentation
use crate::svd::register::{
    create_bit_range, create_cluster, create_field, create_register, create_register_properties,
};
use crate::Result;

/// Creates ARM PL080 DMA Controller Raw Interrupt registers.
pub fn create() -> Result<svd::RegisterCluster> {
    Ok(svd::RegisterCluster::Cluster(create_cluster(
        "raw_int",
        "DMAC Raw Interrupt registers",
        0x14,
        &[
            svd::RegisterCluster::Register(create_register(
                "tc_status",
                "Raw Interrupt Terminal Count Status Register - indicates the DMA channels that are requesting a transfer complete, terminal count interrupt, prior to masking. A HIGH bit indicates that the terminal count interrupt request is active prior to masking.",
                0x0,
                create_register_properties(32, 0)?,
                Some(&[
                    create_field(
                        "tc_status",
                        "Status of the terminal count interrupt prior to masking.",
                        create_bit_range("[7:0]")?,
                        svd::Access::ReadOnly,
                        None,
                    )?,
                ]),
                None,
            )?),
            svd::RegisterCluster::Register(create_register(
                "error_status",
                "Raw Error Interrupt Status Register - indicates the DMA channels that are requesting an error interrupt prior to masking. A HIGH bit indicates that the error interrupt request is active prior to masking.",
                0x4,
                create_register_properties(32, 0)?,
                Some(&[
                    create_field(
                        "error_status",
                        "Status of the error interrupt prior to masking.",
                        create_bit_range("[7:0]")?,
                        svd::Access::ReadOnly,
                        None,
                    )?,
                ]),
                None,
            )?),
        ],
        None,
    )?))
}