fn master_max_burst_size(
        is_ahb: bool,
        tranfer_length: usize,
        increment: mdma::MdmaIncrement,
        size: mdma::MdmaSize,
        offset: mdma::MdmaSize,
    ) -> mdma::MdmaBurstSize {
        let max_transfer_length: mdma::MdmaBurstSize = tranfer_length.into();

        if is_ahb
            && (offset == mdma::MdmaSize::DoubleWord
                || increment == mdma::MdmaIncrement::Fixed
                || offset != size)
        {
            return mdma::MdmaBurstSize(0); // single transfer
        }
        if !is_ahb && increment == mdma::MdmaIncrement::Fixed {
            return cmp::min(mdma::MdmaBurstSize(4), max_transfer_length);
        }
        max_transfer_length
    }
/// Returns the maximum burst size for given parameters
///
/// * Less than transfer length
///
/// ## AHBS Bus
///
/// If any of the following are true, then DSIZE must be 0 (single transfer)
///
/// * Increment offset size is Double-Word (64-bit)
/// * Increment mode is fixed pointer
/// * Increment offset size is != Data Size
///
/// ## AXI Bus
///
/// If the Increment mode is fixed pointer, then DIZE must be <= 4 (maximum
/// 16 beats)
Returns the maximum burst size for given parameters
Less than transfer length
Returns the maximum burst size for given parameters Less than transfer length
fn master_max_burst_size(
        is_ahb: bool,
        tranfer_length: usize,
        increment: mdma::MdmaIncrement,
        size: mdma::MdmaSize,
        offset: mdma::MdmaSize,
    ) -> mdma::MdmaBurstSize {
        let max_transfer_length: mdma::MdmaBurstSize = tranfer_length.into();
        if is_ahb
            && (offset == mdma::MdmaSize::DoubleWord
                || increment == mdma::MdmaIncrement::Fixed
                || offset != size)
        {
            return mdma::MdmaBurstSize(0); // single transfer
        }
        if !is_ahb && increment == mdma::MdmaIncrement::Fixed {
            return cmp::min(mdma::MdmaBurstSize(4), max_transfer_length);
        }
        max_transfer_length
    }
fn master_max_burst_size ( is_ahb : bool , tranfer_length : usize , increment : mdma :: MdmaIncrement , size : mdma :: MdmaSize , offset : mdma :: MdmaSize , ) -> mdma :: MdmaBurstSize { let max_transfer_length : mdma :: MdmaBurstSize = tranfer_length . into ( ) ; if is_ahb && ( offset == mdma :: MdmaSize :: DoubleWord || increment == mdma :: MdmaIncrement :: Fixed || offset != size ) { return mdma :: MdmaBurstSize ( 0 ) ; // single transfer } if ! is_ahb && increment == mdma :: MdmaIncrement :: Fixed { return cmp :: min ( mdma :: MdmaBurstSize ( 4 ) , max_transfer_length ) ; } max_transfer_length }
Returns the maximum burst size for given parameters
 Less than transfer length
Returns the maximum burst size for given parameters Less than transfer length
is_ahb
bool
tranfer_length
usize
increment
mdma::MdmaIncrement
size
mdma::MdmaSize
offset
mdma::MdmaSize
is_ahb
bool
tranfer_length
usize
increment
mdma::MdmaIncrement
size
mdma::MdmaSize
offset
mdma::MdmaSize
ahbs bus
If any of the following are true, then DSIZE must be 0 (single transfer)

Increment offset size is Double-Word (64-bit)
Increment mode is fixed pointer
Increment offset size is != Data Size
If any of the following are true then DSIZE must be 0 ( single transfer ) Increment offset size is Double - Word ( 64 - bit ) Increment mode is fixed pointer Increment offset size is ! = Data Size
axi bus
If the Increment mode is fixed pointer, then DIZE must be <= 4 (maximum
16 beats)
If the Increment mode is fixed pointer then DIZE must be < = 4 ( maximum 16 beats )