1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157
#[doc = "Reader of register SBUSCFG"] pub type R = crate::R<u32, super::SBUSCFG>; #[doc = "Writer for register SBUSCFG"] pub type W = crate::W<u32, super::SBUSCFG>; #[doc = "Register SBUSCFG `reset()`'s with value 0x02"] impl crate::ResetValue for super::SBUSCFG { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0x02 } } #[doc = "AHB master interface Burst configuration These bits control AHB master transfer type sequence (or priority)\n\nValue on reset: 2"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum AHBBRST_A { #[doc = "0: Incremental burst of unspecified length only"] AHBBRST_0 = 0, #[doc = "1: INCR4 burst, then single transfer"] AHBBRST_1 = 1, #[doc = "2: INCR8 burst, INCR4 burst, then single transfer"] AHBBRST_2 = 2, #[doc = "3: INCR16 burst, INCR8 burst, INCR4 burst, then single transfer"] AHBBRST_3 = 3, #[doc = "5: INCR4 burst, then incremental burst of unspecified length"] AHBBRST_5 = 5, #[doc = "6: INCR8 burst, INCR4 burst, then incremental burst of unspecified length"] AHBBRST_6 = 6, #[doc = "7: INCR16 burst, INCR8 burst, INCR4 burst, then incremental burst of unspecified length"] AHBBRST_7 = 7, } impl From<AHBBRST_A> for u8 { #[inline(always)] fn from(variant: AHBBRST_A) -> Self { variant as _ } } #[doc = "Reader of field `AHBBRST`"] pub type AHBBRST_R = crate::R<u8, AHBBRST_A>; impl AHBBRST_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, AHBBRST_A> { use crate::Variant::*; match self.bits { 0 => Val(AHBBRST_A::AHBBRST_0), 1 => Val(AHBBRST_A::AHBBRST_1), 2 => Val(AHBBRST_A::AHBBRST_2), 3 => Val(AHBBRST_A::AHBBRST_3), 5 => Val(AHBBRST_A::AHBBRST_5), 6 => Val(AHBBRST_A::AHBBRST_6), 7 => Val(AHBBRST_A::AHBBRST_7), i => Res(i), } } #[doc = "Checks if the value of the field is `AHBBRST_0`"] #[inline(always)] pub fn is_ahbbrst_0(&self) -> bool { *self == AHBBRST_A::AHBBRST_0 } #[doc = "Checks if the value of the field is `AHBBRST_1`"] #[inline(always)] pub fn is_ahbbrst_1(&self) -> bool { *self == AHBBRST_A::AHBBRST_1 } #[doc = "Checks if the value of the field is `AHBBRST_2`"] #[inline(always)] pub fn is_ahbbrst_2(&self) -> bool { *self == AHBBRST_A::AHBBRST_2 } #[doc = "Checks if the value of the field is `AHBBRST_3`"] #[inline(always)] pub fn is_ahbbrst_3(&self) -> bool { *self == AHBBRST_A::AHBBRST_3 } #[doc = "Checks if the value of the field is `AHBBRST_5`"] #[inline(always)] pub fn is_ahbbrst_5(&self) -> bool { *self == AHBBRST_A::AHBBRST_5 } #[doc = "Checks if the value of the field is `AHBBRST_6`"] #[inline(always)] pub fn is_ahbbrst_6(&self) -> bool { *self == AHBBRST_A::AHBBRST_6 } #[doc = "Checks if the value of the field is `AHBBRST_7`"] #[inline(always)] pub fn is_ahbbrst_7(&self) -> bool { *self == AHBBRST_A::AHBBRST_7 } } #[doc = "Write proxy for field `AHBBRST`"] pub struct AHBBRST_W<'a> { w: &'a mut W, } impl<'a> AHBBRST_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: AHBBRST_A) -> &'a mut W { unsafe { self.bits(variant.into()) } } #[doc = "Incremental burst of unspecified length only"] #[inline(always)] pub fn ahbbrst_0(self) -> &'a mut W { self.variant(AHBBRST_A::AHBBRST_0) } #[doc = "INCR4 burst, then single transfer"] #[inline(always)] pub fn ahbbrst_1(self) -> &'a mut W { self.variant(AHBBRST_A::AHBBRST_1) } #[doc = "INCR8 burst, INCR4 burst, then single transfer"] #[inline(always)] pub fn ahbbrst_2(self) -> &'a mut W { self.variant(AHBBRST_A::AHBBRST_2) } #[doc = "INCR16 burst, INCR8 burst, INCR4 burst, then single transfer"] #[inline(always)] pub fn ahbbrst_3(self) -> &'a mut W { self.variant(AHBBRST_A::AHBBRST_3) } #[doc = "INCR4 burst, then incremental burst of unspecified length"] #[inline(always)] pub fn ahbbrst_5(self) -> &'a mut W { self.variant(AHBBRST_A::AHBBRST_5) } #[doc = "INCR8 burst, INCR4 burst, then incremental burst of unspecified length"] #[inline(always)] pub fn ahbbrst_6(self) -> &'a mut W { self.variant(AHBBRST_A::AHBBRST_6) } #[doc = "INCR16 burst, INCR8 burst, INCR4 burst, then incremental burst of unspecified length"] #[inline(always)] pub fn ahbbrst_7(self) -> &'a mut W { self.variant(AHBBRST_A::AHBBRST_7) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !0x07) | ((value as u32) & 0x07); self.w } } impl R { #[doc = "Bits 0:2 - AHB master interface Burst configuration These bits control AHB master transfer type sequence (or priority)"] #[inline(always)] pub fn ahbbrst(&self) -> AHBBRST_R { AHBBRST_R::new((self.bits & 0x07) as u8) } } impl W { #[doc = "Bits 0:2 - AHB master interface Burst configuration These bits control AHB master transfer type sequence (or priority)"] #[inline(always)] pub fn ahbbrst(&mut self) -> AHBBRST_W { AHBBRST_W { w: self } } }