svd-generator 0.4.1

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

/// Creates the Software Reset Register.
pub fn create() -> Result<svd::RegisterCluster> {
    Ok(svd::RegisterCluster::Register(
        create_register(
            "srr",
            "Software Reset Register: This register is only valid when the DW_apb_uart is configured to have additional shadow registers implemented (SHADOW == YES). If shadow registers are not implemented, this register does not exist and reading from this register address returns zero.",
            0x88,
            create_register_properties(32, 0)?,
            Some(&[
                create_field(
                    "xfr",
                    "XMIT FIFO Reset. This is a shadow register for the XMIT FIFO Reset bit (FCR[2]). This can be used to remove the burden on software having to store previously written FCR values (which are pretty static) just to reset the transmit FIFO. This resets the control portion of the transmit FIFO and treats the FIFO as empty. This also de-asserts the DMA TX request and single signals when additional DMA handshaking signals are selected (DMA_EXTRA == YES). Note that this bit is 'self-clearing'. It is not necessary to clear this bit.",
                    create_bit_range("[2:2]")?,
                    svd::Access::WriteOnly,
                    None,
                )?,
                create_field(
                    "rfr",
                    "RCVR FIFO Reset. This is a shadow register for the RCVR FIFO Reset bit (FCR[1]). This can be used to remove the burden on software having to store previously written FCR values (which are pretty static) just to reset the receive FIFO This resets the control portion of the receive FIFO and treats the FIFO as empty. This also de-asserts the DMA RX request and single signals when additional DMA handshaking signals are selected (DMA_EXTRA == YES). Note that this bit is 'self-clearing'. It is not necessary to clear this bit.",
                    create_bit_range("[1:1]")?,
                    svd::Access::WriteOnly,
                    None,
                )?,
                create_field(
                    "ur",
                    "UART Reset. This asynchronously resets the DW_apb_uart and synchronously removes the reset assertion. For a two clock implementation both pclk and sclk domains are reset.",
                    create_bit_range("[0:0]")?,
                    svd::Access::WriteOnly,
                    None,
                )?,
            ]),
            None,
        )?
    ))
}