diff options
Diffstat (limited to 'src/hmatrixhs')
| -rw-r--r-- | src/hmatrixhs/mcfg.rs | 191 | ||||
| -rw-r--r-- | src/hmatrixhs/mrcr.rs | 1554 | ||||
| -rw-r--r-- | src/hmatrixhs/prs.rs | 8 | ||||
| -rw-r--r-- | src/hmatrixhs/prs/pras.rs | 354 | ||||
| -rw-r--r-- | src/hmatrixhs/prs/prbs.rs | 354 | ||||
| -rw-r--r-- | src/hmatrixhs/scfg.rs | 330 | ||||
| -rw-r--r-- | src/hmatrixhs/sfr.rs | 103 |
7 files changed, 2894 insertions, 0 deletions
diff --git a/src/hmatrixhs/mcfg.rs b/src/hmatrixhs/mcfg.rs new file mode 100644 index 0000000..4ecffae --- /dev/null +++ b/src/hmatrixhs/mcfg.rs @@ -0,0 +1,191 @@ +#[doc = "Register `MCFG[%s]` reader"] +pub struct R(crate::R<MCFG_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<MCFG_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<MCFG_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<MCFG_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Register `MCFG[%s]` writer"] +pub struct W(crate::W<MCFG_SPEC>); +impl core::ops::Deref for W { + type Target = crate::W<MCFG_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From<crate::W<MCFG_SPEC>> for W { + #[inline(always)] + fn from(writer: crate::W<MCFG_SPEC>) -> Self { + W(writer) + } +} +#[doc = "Undefined Length Burst Type\n\nValue on reset: 2"] +#[derive(Clone, Copy, Debug, PartialEq)] +#[repr(u8)] +pub enum ULBT_A { + #[doc = "0: Infinite Length"] + INFINITE = 0, + #[doc = "1: Single Access"] + SINGLE = 1, + #[doc = "2: Four Beat Burst"] + FOUR_BEAT = 2, + #[doc = "3: Eight Beat Burst"] + EIGHT_BEAT = 3, + #[doc = "4: Sixteen Beat Burst"] + SIXTEEN_BEAT = 4, +} +impl From<ULBT_A> for u8 { + #[inline(always)] + fn from(variant: ULBT_A) -> Self { + variant as _ + } +} +#[doc = "Field `ULBT` reader - Undefined Length Burst Type"] +pub struct ULBT_R(crate::FieldReader<u8, ULBT_A>); +impl ULBT_R { + pub(crate) fn new(bits: u8) -> Self { + ULBT_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option<ULBT_A> { + match self.bits { + 0 => Some(ULBT_A::INFINITE), + 1 => Some(ULBT_A::SINGLE), + 2 => Some(ULBT_A::FOUR_BEAT), + 3 => Some(ULBT_A::EIGHT_BEAT), + 4 => Some(ULBT_A::SIXTEEN_BEAT), + _ => None, + } + } + #[doc = "Checks if the value of the field is `INFINITE`"] + #[inline(always)] + pub fn is_infinite(&self) -> bool { + **self == ULBT_A::INFINITE + } + #[doc = "Checks if the value of the field is `SINGLE`"] + #[inline(always)] + pub fn is_single(&self) -> bool { + **self == ULBT_A::SINGLE + } + #[doc = "Checks if the value of the field is `FOUR_BEAT`"] + #[inline(always)] + pub fn is_four_beat(&self) -> bool { + **self == ULBT_A::FOUR_BEAT + } + #[doc = "Checks if the value of the field is `EIGHT_BEAT`"] + #[inline(always)] + pub fn is_eight_beat(&self) -> bool { + **self == ULBT_A::EIGHT_BEAT + } + #[doc = "Checks if the value of the field is `SIXTEEN_BEAT`"] + #[inline(always)] + pub fn is_sixteen_beat(&self) -> bool { + **self == ULBT_A::SIXTEEN_BEAT + } +} +impl core::ops::Deref for ULBT_R { + type Target = crate::FieldReader<u8, ULBT_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `ULBT` writer - Undefined Length Burst Type"] +pub struct ULBT_W<'a> { + w: &'a mut W, +} +impl<'a> ULBT_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: ULBT_A) -> &'a mut W { + unsafe { self.bits(variant.into()) } + } + #[doc = "Infinite Length"] + #[inline(always)] + pub fn infinite(self) -> &'a mut W { + self.variant(ULBT_A::INFINITE) + } + #[doc = "Single Access"] + #[inline(always)] + pub fn single(self) -> &'a mut W { + self.variant(ULBT_A::SINGLE) + } + #[doc = "Four Beat Burst"] + #[inline(always)] + pub fn four_beat(self) -> &'a mut W { + self.variant(ULBT_A::FOUR_BEAT) + } + #[doc = "Eight Beat Burst"] + #[inline(always)] + pub fn eight_beat(self) -> &'a mut W { + self.variant(ULBT_A::EIGHT_BEAT) + } + #[doc = "Sixteen Beat Burst"] + #[inline(always)] + pub fn sixteen_beat(self) -> &'a mut W { + self.variant(ULBT_A::SIXTEEN_BEAT) + } + #[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 - Undefined Length Burst Type"] + #[inline(always)] + pub fn ulbt(&self) -> ULBT_R { + ULBT_R::new((self.bits & 0x07) as u8) + } +} +impl W { + #[doc = "Bits 0:2 - Undefined Length Burst Type"] + #[inline(always)] + pub fn ulbt(&mut self) -> ULBT_W { + ULBT_W { w: self } + } + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self + } +} +#[doc = "Master Configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [mcfg](index.html) module"] +pub struct MCFG_SPEC; +impl crate::RegisterSpec for MCFG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [mcfg::R](R) reader structure"] +impl crate::Readable for MCFG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [mcfg::W](W) writer structure"] +impl crate::Writable for MCFG_SPEC { + type Writer = W; +} +#[doc = "`reset()` method sets MCFG[%s] +to value 0x02"] +impl crate::Resettable for MCFG_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0x02 + } +} diff --git a/src/hmatrixhs/mrcr.rs b/src/hmatrixhs/mrcr.rs new file mode 100644 index 0000000..ce4c9a0 --- /dev/null +++ b/src/hmatrixhs/mrcr.rs @@ -0,0 +1,1554 @@ +#[doc = "Register `MRCR` reader"] +pub struct R(crate::R<MRCR_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<MRCR_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<MRCR_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<MRCR_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Register `MRCR` writer"] +pub struct W(crate::W<MRCR_SPEC>); +impl core::ops::Deref for W { + type Target = crate::W<MRCR_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From<crate::W<MRCR_SPEC>> for W { + #[inline(always)] + fn from(writer: crate::W<MRCR_SPEC>) -> Self { + W(writer) + } +} +#[doc = "Remap Command Bit for Master 0\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum RCB0_A { + #[doc = "0: Disable remapped address decoding for master"] + DIS = 0, + #[doc = "1: Enable remapped address decoding for master"] + ENA = 1, +} +impl From<RCB0_A> for bool { + #[inline(always)] + fn from(variant: RCB0_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RCB0` reader - Remap Command Bit for Master 0"] +pub struct RCB0_R(crate::FieldReader<bool, RCB0_A>); +impl RCB0_R { + pub(crate) fn new(bits: bool) -> Self { + RCB0_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RCB0_A { + match self.bits { + false => RCB0_A::DIS, + true => RCB0_A::ENA, + } + } + #[doc = "Checks if the value of the field is `DIS`"] + #[inline(always)] + pub fn is_dis(&self) -> bool { + **self == RCB0_A::DIS + } + #[doc = "Checks if the value of the field is `ENA`"] + #[inline(always)] + pub fn is_ena(&self) -> bool { + **self == RCB0_A::ENA + } +} +impl core::ops::Deref for RCB0_R { + type Target = crate::FieldReader<bool, RCB0_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RCB0` writer - Remap Command Bit for Master 0"] +pub struct RCB0_W<'a> { + w: &'a mut W, +} +impl<'a> RCB0_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: RCB0_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Disable remapped address decoding for master"] + #[inline(always)] + pub fn dis(self) -> &'a mut W { + self.variant(RCB0_A::DIS) + } + #[doc = "Enable remapped address decoding for master"] + #[inline(always)] + pub fn ena(self) -> &'a mut W { + self.variant(RCB0_A::ENA) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !0x01) | (value as u32 & 0x01); + self.w + } +} +#[doc = "Remap Command Bit for Master 1\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum RCB1_A { + #[doc = "0: Disable remapped address decoding for master"] + DIS = 0, + #[doc = "1: Enable remapped address decoding for master"] + ENA = 1, +} +impl From<RCB1_A> for bool { + #[inline(always)] + fn from(variant: RCB1_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RCB1` reader - Remap Command Bit for Master 1"] +pub struct RCB1_R(crate::FieldReader<bool, RCB1_A>); +impl RCB1_R { + pub(crate) fn new(bits: bool) -> Self { + RCB1_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RCB1_A { + match self.bits { + false => RCB1_A::DIS, + true => RCB1_A::ENA, + } + } + #[doc = "Checks if the value of the field is `DIS`"] + #[inline(always)] + pub fn is_dis(&self) -> bool { + **self == RCB1_A::DIS + } + #[doc = "Checks if the value of the field is `ENA`"] + #[inline(always)] + pub fn is_ena(&self) -> bool { + **self == RCB1_A::ENA + } +} +impl core::ops::Deref for RCB1_R { + type Target = crate::FieldReader<bool, RCB1_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RCB1` writer - Remap Command Bit for Master 1"] +pub struct RCB1_W<'a> { + w: &'a mut W, +} +impl<'a> RCB1_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: RCB1_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Disable remapped address decoding for master"] + #[inline(always)] + pub fn dis(self) -> &'a mut W { + self.variant(RCB1_A::DIS) + } + #[doc = "Enable remapped address decoding for master"] + #[inline(always)] + pub fn ena(self) -> &'a mut W { + self.variant(RCB1_A::ENA) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 1)) | ((value as u32 & 0x01) << 1); + self.w + } +} +#[doc = "Remap Command Bit for Master 2\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum RCB2_A { + #[doc = "0: Disable remapped address decoding for master"] + DIS = 0, + #[doc = "1: Enable remapped address decoding for master"] + ENA = 1, +} +impl From<RCB2_A> for bool { + #[inline(always)] + fn from(variant: RCB2_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RCB2` reader - Remap Command Bit for Master 2"] +pub struct RCB2_R(crate::FieldReader<bool, RCB2_A>); +impl RCB2_R { + pub(crate) fn new(bits: bool) -> Self { + RCB2_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RCB2_A { + match self.bits { + false => RCB2_A::DIS, + true => RCB2_A::ENA, + } + } + #[doc = "Checks if the value of the field is `DIS`"] + #[inline(always)] + pub fn is_dis(&self) -> bool { + **self == RCB2_A::DIS + } + #[doc = "Checks if the value of the field is `ENA`"] + #[inline(always)] + pub fn is_ena(&self) -> bool { + **self == RCB2_A::ENA + } +} +impl core::ops::Deref for RCB2_R { + type Target = crate::FieldReader<bool, RCB2_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RCB2` writer - Remap Command Bit for Master 2"] +pub struct RCB2_W<'a> { + w: &'a mut W, +} +impl<'a> RCB2_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: RCB2_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Disable remapped address decoding for master"] + #[inline(always)] + pub fn dis(self) -> &'a mut W { + self.variant(RCB2_A::DIS) + } + #[doc = "Enable remapped address decoding for master"] + #[inline(always)] + pub fn ena(self) -> &'a mut W { + self.variant(RCB2_A::ENA) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 2)) | ((value as u32 & 0x01) << 2); + self.w + } +} +#[doc = "Remap Command Bit for Master 3\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum RCB3_A { + #[doc = "0: Disable remapped address decoding for master"] + DIS = 0, + #[doc = "1: Enable remapped address decoding for master"] + ENA = 1, +} +impl From<RCB3_A> for bool { + #[inline(always)] + fn from(variant: RCB3_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RCB3` reader - Remap Command Bit for Master 3"] +pub struct RCB3_R(crate::FieldReader<bool, RCB3_A>); +impl RCB3_R { + pub(crate) fn new(bits: bool) -> Self { + RCB3_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RCB3_A { + match self.bits { + false => RCB3_A::DIS, + true => RCB3_A::ENA, + } + } + #[doc = "Checks if the value of the field is `DIS`"] + #[inline(always)] + pub fn is_dis(&self) -> bool { + **self == RCB3_A::DIS + } + #[doc = "Checks if the value of the field is `ENA`"] + #[inline(always)] + pub fn is_ena(&self) -> bool { + **self == RCB3_A::ENA + } +} +impl core::ops::Deref for RCB3_R { + type Target = crate::FieldReader<bool, RCB3_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RCB3` writer - Remap Command Bit for Master 3"] +pub struct RCB3_W<'a> { + w: &'a mut W, +} +impl<'a> RCB3_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: RCB3_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Disable remapped address decoding for master"] + #[inline(always)] + pub fn dis(self) -> &'a mut W { + self.variant(RCB3_A::DIS) + } + #[doc = "Enable remapped address decoding for master"] + #[inline(always)] + pub fn ena(self) -> &'a mut W { + self.variant(RCB3_A::ENA) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 3)) | ((value as u32 & 0x01) << 3); + self.w + } +} +#[doc = "Remap Command Bit for Master 4\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum RCB4_A { + #[doc = "0: Disable remapped address decoding for master"] + DIS = 0, + #[doc = "1: Enable remapped address decoding for master"] + ENA = 1, +} +impl From<RCB4_A> for bool { + #[inline(always)] + fn from(variant: RCB4_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RCB4` reader - Remap Command Bit for Master 4"] +pub struct RCB4_R(crate::FieldReader<bool, RCB4_A>); +impl RCB4_R { + pub(crate) fn new(bits: bool) -> Self { + RCB4_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RCB4_A { + match self.bits { + false => RCB4_A::DIS, + true => RCB4_A::ENA, + } + } + #[doc = "Checks if the value of the field is `DIS`"] + #[inline(always)] + pub fn is_dis(&self) -> bool { + **self == RCB4_A::DIS + } + #[doc = "Checks if the value of the field is `ENA`"] + #[inline(always)] + pub fn is_ena(&self) -> bool { + **self == RCB4_A::ENA + } +} +impl core::ops::Deref for RCB4_R { + type Target = crate::FieldReader<bool, RCB4_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RCB4` writer - Remap Command Bit for Master 4"] +pub struct RCB4_W<'a> { + w: &'a mut W, +} +impl<'a> RCB4_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: RCB4_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Disable remapped address decoding for master"] + #[inline(always)] + pub fn dis(self) -> &'a mut W { + self.variant(RCB4_A::DIS) + } + #[doc = "Enable remapped address decoding for master"] + #[inline(always)] + pub fn ena(self) -> &'a mut W { + self.variant(RCB4_A::ENA) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 4)) | ((value as u32 & 0x01) << 4); + self.w + } +} +#[doc = "Remap Command Bit for Master 5\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum RCB5_A { + #[doc = "0: Disable remapped address decoding for master"] + DIS = 0, + #[doc = "1: Enable remapped address decoding for master"] + ENA = 1, +} +impl From<RCB5_A> for bool { + #[inline(always)] + fn from(variant: RCB5_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RCB5` reader - Remap Command Bit for Master 5"] +pub struct RCB5_R(crate::FieldReader<bool, RCB5_A>); +impl RCB5_R { + pub(crate) fn new(bits: bool) -> Self { + RCB5_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RCB5_A { + match self.bits { + false => RCB5_A::DIS, + true => RCB5_A::ENA, + } + } + #[doc = "Checks if the value of the field is `DIS`"] + #[inline(always)] + pub fn is_dis(&self) -> bool { + **self == RCB5_A::DIS + } + #[doc = "Checks if the value of the field is `ENA`"] + #[inline(always)] + pub fn is_ena(&self) -> bool { + **self == RCB5_A::ENA + } +} +impl core::ops::Deref for RCB5_R { + type Target = crate::FieldReader<bool, RCB5_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RCB5` writer - Remap Command Bit for Master 5"] +pub struct RCB5_W<'a> { + w: &'a mut W, +} +impl<'a> RCB5_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: RCB5_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Disable remapped address decoding for master"] + #[inline(always)] + pub fn dis(self) -> &'a mut W { + self.variant(RCB5_A::DIS) + } + #[doc = "Enable remapped address decoding for master"] + #[inline(always)] + pub fn ena(self) -> &'a mut W { + self.variant(RCB5_A::ENA) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 5)) | ((value as u32 & 0x01) << 5); + self.w + } +} +#[doc = "Remap Command Bit for Master 6\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum RCB6_A { + #[doc = "0: Disable remapped address decoding for master"] + DIS = 0, + #[doc = "1: Enable remapped address decoding for master"] + ENA = 1, +} +impl From<RCB6_A> for bool { + #[inline(always)] + fn from(variant: RCB6_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RCB6` reader - Remap Command Bit for Master 6"] +pub struct RCB6_R(crate::FieldReader<bool, RCB6_A>); +impl RCB6_R { + pub(crate) fn new(bits: bool) -> Self { + RCB6_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RCB6_A { + match self.bits { + false => RCB6_A::DIS, + true => RCB6_A::ENA, + } + } + #[doc = "Checks if the value of the field is `DIS`"] + #[inline(always)] + pub fn is_dis(&self) -> bool { + **self == RCB6_A::DIS + } + #[doc = "Checks if the value of the field is `ENA`"] + #[inline(always)] + pub fn is_ena(&self) -> bool { + **self == RCB6_A::ENA + } +} +impl core::ops::Deref for RCB6_R { + type Target = crate::FieldReader<bool, RCB6_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RCB6` writer - Remap Command Bit for Master 6"] +pub struct RCB6_W<'a> { + w: &'a mut W, +} +impl<'a> RCB6_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: RCB6_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Disable remapped address decoding for master"] + #[inline(always)] + pub fn dis(self) -> &'a mut W { + self.variant(RCB6_A::DIS) + } + #[doc = "Enable remapped address decoding for master"] + #[inline(always)] + pub fn ena(self) -> &'a mut W { + self.variant(RCB6_A::ENA) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 6)) | ((value as u32 & 0x01) << 6); + self.w + } +} +#[doc = "Remap Command Bit for Master 7\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum RCB7_A { + #[doc = "0: Disable remapped address decoding for master"] + DIS = 0, + #[doc = "1: Enable remapped address decoding for master"] + ENA = 1, +} +impl From<RCB7_A> for bool { + #[inline(always)] + fn from(variant: RCB7_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RCB7` reader - Remap Command Bit for Master 7"] +pub struct RCB7_R(crate::FieldReader<bool, RCB7_A>); +impl RCB7_R { + pub(crate) fn new(bits: bool) -> Self { + RCB7_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RCB7_A { + match self.bits { + false => RCB7_A::DIS, + true => RCB7_A::ENA, + } + } + #[doc = "Checks if the value of the field is `DIS`"] + #[inline(always)] + pub fn is_dis(&self) -> bool { + **self == RCB7_A::DIS + } + #[doc = "Checks if the value of the field is `ENA`"] + #[inline(always)] + pub fn is_ena(&self) -> bool { + **self == RCB7_A::ENA + } +} +impl core::ops::Deref for RCB7_R { + type Target = crate::FieldReader<bool, RCB7_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RCB7` writer - Remap Command Bit for Master 7"] +pub struct RCB7_W<'a> { + w: &'a mut W, +} +impl<'a> RCB7_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: RCB7_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Disable remapped address decoding for master"] + #[inline(always)] + pub fn dis(self) -> &'a mut W { + self.variant(RCB7_A::DIS) + } + #[doc = "Enable remapped address decoding for master"] + #[inline(always)] + pub fn ena(self) -> &'a mut W { + self.variant(RCB7_A::ENA) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 7)) | ((value as u32 & 0x01) << 7); + self.w + } +} +#[doc = "Remap Command Bit for Master 8\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum RCB8_A { + #[doc = "0: Disable remapped address decoding for master"] + DIS = 0, + #[doc = "1: Enable remapped address decoding for master"] + ENA = 1, +} +impl From<RCB8_A> for bool { + #[inline(always)] + fn from(variant: RCB8_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RCB8` reader - Remap Command Bit for Master 8"] +pub struct RCB8_R(crate::FieldReader<bool, RCB8_A>); +impl RCB8_R { + pub(crate) fn new(bits: bool) -> Self { + RCB8_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RCB8_A { + match self.bits { + false => RCB8_A::DIS, + true => RCB8_A::ENA, + } + } + #[doc = "Checks if the value of the field is `DIS`"] + #[inline(always)] + pub fn is_dis(&self) -> bool { + **self == RCB8_A::DIS + } + #[doc = "Checks if the value of the field is `ENA`"] + #[inline(always)] + pub fn is_ena(&self) -> bool { + **self == RCB8_A::ENA + } +} +impl core::ops::Deref for RCB8_R { + type Target = crate::FieldReader<bool, RCB8_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RCB8` writer - Remap Command Bit for Master 8"] +pub struct RCB8_W<'a> { + w: &'a mut W, +} +impl<'a> RCB8_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: RCB8_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Disable remapped address decoding for master"] + #[inline(always)] + pub fn dis(self) -> &'a mut W { + self.variant(RCB8_A::DIS) + } + #[doc = "Enable remapped address decoding for master"] + #[inline(always)] + pub fn ena(self) -> &'a mut W { + self.variant(RCB8_A::ENA) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 8)) | ((value as u32 & 0x01) << 8); + self.w + } +} +#[doc = "Remap Command Bit for Master 9\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum RCB9_A { + #[doc = "0: Disable remapped address decoding for master"] + DIS = 0, + #[doc = "1: Enable remapped address decoding for master"] + ENA = 1, +} +impl From<RCB9_A> for bool { + #[inline(always)] + fn from(variant: RCB9_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RCB9` reader - Remap Command Bit for Master 9"] +pub struct RCB9_R(crate::FieldReader<bool, RCB9_A>); +impl RCB9_R { + pub(crate) fn new(bits: bool) -> Self { + RCB9_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RCB9_A { + match self.bits { + false => RCB9_A::DIS, + true => RCB9_A::ENA, + } + } + #[doc = "Checks if the value of the field is `DIS`"] + #[inline(always)] + pub fn is_dis(&self) -> bool { + **self == RCB9_A::DIS + } + #[doc = "Checks if the value of the field is `ENA`"] + #[inline(always)] + pub fn is_ena(&self) -> bool { + **self == RCB9_A::ENA + } +} +impl core::ops::Deref for RCB9_R { + type Target = crate::FieldReader<bool, RCB9_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RCB9` writer - Remap Command Bit for Master 9"] +pub struct RCB9_W<'a> { + w: &'a mut W, +} +impl<'a> RCB9_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: RCB9_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Disable remapped address decoding for master"] + #[inline(always)] + pub fn dis(self) -> &'a mut W { + self.variant(RCB9_A::DIS) + } + #[doc = "Enable remapped address decoding for master"] + #[inline(always)] + pub fn ena(self) -> &'a mut W { + self.variant(RCB9_A::ENA) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 9)) | ((value as u32 & 0x01) << 9); + self.w + } +} +#[doc = "Remap Command Bit for Master 10\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum RCB10_A { + #[doc = "0: Disable remapped address decoding for master"] + DIS = 0, + #[doc = "1: Enable remapped address decoding for master"] + ENA = 1, +} +impl From<RCB10_A> for bool { + #[inline(always)] + fn from(variant: RCB10_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RCB10` reader - Remap Command Bit for Master 10"] +pub struct RCB10_R(crate::FieldReader<bool, RCB10_A>); +impl RCB10_R { + pub(crate) fn new(bits: bool) -> Self { + RCB10_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RCB10_A { + match self.bits { + false => RCB10_A::DIS, + true => RCB10_A::ENA, + } + } + #[doc = "Checks if the value of the field is `DIS`"] + #[inline(always)] + pub fn is_dis(&self) -> bool { + **self == RCB10_A::DIS + } + #[doc = "Checks if the value of the field is `ENA`"] + #[inline(always)] + pub fn is_ena(&self) -> bool { + **self == RCB10_A::ENA + } +} +impl core::ops::Deref for RCB10_R { + type Target = crate::FieldReader<bool, RCB10_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RCB10` writer - Remap Command Bit for Master 10"] +pub struct RCB10_W<'a> { + w: &'a mut W, +} +impl<'a> RCB10_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: RCB10_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Disable remapped address decoding for master"] + #[inline(always)] + pub fn dis(self) -> &'a mut W { + self.variant(RCB10_A::DIS) + } + #[doc = "Enable remapped address decoding for master"] + #[inline(always)] + pub fn ena(self) -> &'a mut W { + self.variant(RCB10_A::ENA) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 10)) | ((value as u32 & 0x01) << 10); + self.w + } +} +#[doc = "Remap Command Bit for Master 11\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum RCB11_A { + #[doc = "0: Disable remapped address decoding for master"] + DIS = 0, + #[doc = "1: Enable remapped address decoding for master"] + ENA = 1, +} +impl From<RCB11_A> for bool { + #[inline(always)] + fn from(variant: RCB11_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RCB11` reader - Remap Command Bit for Master 11"] +pub struct RCB11_R(crate::FieldReader<bool, RCB11_A>); +impl RCB11_R { + pub(crate) fn new(bits: bool) -> Self { + RCB11_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RCB11_A { + match self.bits { + false => RCB11_A::DIS, + true => RCB11_A::ENA, + } + } + #[doc = "Checks if the value of the field is `DIS`"] + #[inline(always)] + pub fn is_dis(&self) -> bool { + **self == RCB11_A::DIS + } + #[doc = "Checks if the value of the field is `ENA`"] + #[inline(always)] + pub fn is_ena(&self) -> bool { + **self == RCB11_A::ENA + } +} +impl core::ops::Deref for RCB11_R { + type Target = crate::FieldReader<bool, RCB11_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RCB11` writer - Remap Command Bit for Master 11"] +pub struct RCB11_W<'a> { + w: &'a mut W, +} +impl<'a> RCB11_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: RCB11_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Disable remapped address decoding for master"] + #[inline(always)] + pub fn dis(self) -> &'a mut W { + self.variant(RCB11_A::DIS) + } + #[doc = "Enable remapped address decoding for master"] + #[inline(always)] + pub fn ena(self) -> &'a mut W { + self.variant(RCB11_A::ENA) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 11)) | ((value as u32 & 0x01) << 11); + self.w + } +} +#[doc = "Remap Command Bit for Master 12\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum RCB12_A { + #[doc = "0: Disable remapped address decoding for master"] + DIS = 0, + #[doc = "1: Enable remapped address decoding for master"] + ENA = 1, +} +impl From<RCB12_A> for bool { + #[inline(always)] + fn from(variant: RCB12_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RCB12` reader - Remap Command Bit for Master 12"] +pub struct RCB12_R(crate::FieldReader<bool, RCB12_A>); +impl RCB12_R { + pub(crate) fn new(bits: bool) -> Self { + RCB12_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RCB12_A { + match self.bits { + false => RCB12_A::DIS, + true => RCB12_A::ENA, + } + } + #[doc = "Checks if the value of the field is `DIS`"] + #[inline(always)] + pub fn is_dis(&self) -> bool { + **self == RCB12_A::DIS + } + #[doc = "Checks if the value of the field is `ENA`"] + #[inline(always)] + pub fn is_ena(&self) -> bool { + **self == RCB12_A::ENA + } +} +impl core::ops::Deref for RCB12_R { + type Target = crate::FieldReader<bool, RCB12_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RCB12` writer - Remap Command Bit for Master 12"] +pub struct RCB12_W<'a> { + w: &'a mut W, +} +impl<'a> RCB12_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: RCB12_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Disable remapped address decoding for master"] + #[inline(always)] + pub fn dis(self) -> &'a mut W { + self.variant(RCB12_A::DIS) + } + #[doc = "Enable remapped address decoding for master"] + #[inline(always)] + pub fn ena(self) -> &'a mut W { + self.variant(RCB12_A::ENA) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 12)) | ((value as u32 & 0x01) << 12); + self.w + } +} +#[doc = "Remap Command Bit for Master 13\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum RCB13_A { + #[doc = "0: Disable remapped address decoding for master"] + DIS = 0, + #[doc = "1: Enable remapped address decoding for master"] + ENA = 1, +} +impl From<RCB13_A> for bool { + #[inline(always)] + fn from(variant: RCB13_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RCB13` reader - Remap Command Bit for Master 13"] +pub struct RCB13_R(crate::FieldReader<bool, RCB13_A>); +impl RCB13_R { + pub(crate) fn new(bits: bool) -> Self { + RCB13_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RCB13_A { + match self.bits { + false => RCB13_A::DIS, + true => RCB13_A::ENA, + } + } + #[doc = "Checks if the value of the field is `DIS`"] + #[inline(always)] + pub fn is_dis(&self) -> bool { + **self == RCB13_A::DIS + } + #[doc = "Checks if the value of the field is `ENA`"] + #[inline(always)] + pub fn is_ena(&self) -> bool { + **self == RCB13_A::ENA + } +} +impl core::ops::Deref for RCB13_R { + type Target = crate::FieldReader<bool, RCB13_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RCB13` writer - Remap Command Bit for Master 13"] +pub struct RCB13_W<'a> { + w: &'a mut W, +} +impl<'a> RCB13_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: RCB13_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Disable remapped address decoding for master"] + #[inline(always)] + pub fn dis(self) -> &'a mut W { + self.variant(RCB13_A::DIS) + } + #[doc = "Enable remapped address decoding for master"] + #[inline(always)] + pub fn ena(self) -> &'a mut W { + self.variant(RCB13_A::ENA) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 13)) | ((value as u32 & 0x01) << 13); + self.w + } +} +#[doc = "Remap Command Bit for Master 14\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum RCB14_A { + #[doc = "0: Disable remapped address decoding for master"] + DIS = 0, + #[doc = "1: Enable remapped address decoding for master"] + ENA = 1, +} +impl From<RCB14_A> for bool { + #[inline(always)] + fn from(variant: RCB14_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RCB14` reader - Remap Command Bit for Master 14"] +pub struct RCB14_R(crate::FieldReader<bool, RCB14_A>); +impl RCB14_R { + pub(crate) fn new(bits: bool) -> Self { + RCB14_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RCB14_A { + match self.bits { + false => RCB14_A::DIS, + true => RCB14_A::ENA, + } + } + #[doc = "Checks if the value of the field is `DIS`"] + #[inline(always)] + pub fn is_dis(&self) -> bool { + **self == RCB14_A::DIS + } + #[doc = "Checks if the value of the field is `ENA`"] + #[inline(always)] + pub fn is_ena(&self) -> bool { + **self == RCB14_A::ENA + } +} +impl core::ops::Deref for RCB14_R { + type Target = crate::FieldReader<bool, RCB14_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RCB14` writer - Remap Command Bit for Master 14"] +pub struct RCB14_W<'a> { + w: &'a mut W, +} +impl<'a> RCB14_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: RCB14_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Disable remapped address decoding for master"] + #[inline(always)] + pub fn dis(self) -> &'a mut W { + self.variant(RCB14_A::DIS) + } + #[doc = "Enable remapped address decoding for master"] + #[inline(always)] + pub fn ena(self) -> &'a mut W { + self.variant(RCB14_A::ENA) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 14)) | ((value as u32 & 0x01) << 14); + self.w + } +} +#[doc = "Remap Command Bit for Master 15\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum RCB15_A { + #[doc = "0: Disable remapped address decoding for master"] + DIS = 0, + #[doc = "1: Enable remapped address decoding for master"] + ENA = 1, +} +impl From<RCB15_A> for bool { + #[inline(always)] + fn from(variant: RCB15_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `RCB15` reader - Remap Command Bit for Master 15"] +pub struct RCB15_R(crate::FieldReader<bool, RCB15_A>); +impl RCB15_R { + pub(crate) fn new(bits: bool) -> Self { + RCB15_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> RCB15_A { + match self.bits { + false => RCB15_A::DIS, + true => RCB15_A::ENA, + } + } + #[doc = "Checks if the value of the field is `DIS`"] + #[inline(always)] + pub fn is_dis(&self) -> bool { + **self == RCB15_A::DIS + } + #[doc = "Checks if the value of the field is `ENA`"] + #[inline(always)] + pub fn is_ena(&self) -> bool { + **self == RCB15_A::ENA + } +} +impl core::ops::Deref for RCB15_R { + type Target = crate::FieldReader<bool, RCB15_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `RCB15` writer - Remap Command Bit for Master 15"] +pub struct RCB15_W<'a> { + w: &'a mut W, +} +impl<'a> RCB15_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: RCB15_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Disable remapped address decoding for master"] + #[inline(always)] + pub fn dis(self) -> &'a mut W { + self.variant(RCB15_A::DIS) + } + #[doc = "Enable remapped address decoding for master"] + #[inline(always)] + pub fn ena(self) -> &'a mut W { + self.variant(RCB15_A::ENA) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 15)) | ((value as u32 & 0x01) << 15); + self.w + } +} +impl R { + #[doc = "Bit 0 - Remap Command Bit for Master 0"] + #[inline(always)] + pub fn rcb0(&self) -> RCB0_R { + RCB0_R::new((self.bits & 0x01) != 0) + } + #[doc = "Bit 1 - Remap Command Bit for Master 1"] + #[inline(always)] + pub fn rcb1(&self) -> RCB1_R { + RCB1_R::new(((self.bits >> 1) & 0x01) != 0) + } + #[doc = "Bit 2 - Remap Command Bit for Master 2"] + #[inline(always)] + pub fn rcb2(&self) -> RCB2_R { + RCB2_R::new(((self.bits >> 2) & 0x01) != 0) + } + #[doc = "Bit 3 - Remap Command Bit for Master 3"] + #[inline(always)] + pub fn rcb3(&self) -> RCB3_R { + RCB3_R::new(((self.bits >> 3) & 0x01) != 0) + } + #[doc = "Bit 4 - Remap Command Bit for Master 4"] + #[inline(always)] + pub fn rcb4(&self) -> RCB4_R { + RCB4_R::new(((self.bits >> 4) & 0x01) != 0) + } + #[doc = "Bit 5 - Remap Command Bit for Master 5"] + #[inline(always)] + pub fn rcb5(&self) -> RCB5_R { + RCB5_R::new(((self.bits >> 5) & 0x01) != 0) + } + #[doc = "Bit 6 - Remap Command Bit for Master 6"] + #[inline(always)] + pub fn rcb6(&self) -> RCB6_R { + RCB6_R::new(((self.bits >> 6) & 0x01) != 0) + } + #[doc = "Bit 7 - Remap Command Bit for Master 7"] + #[inline(always)] + pub fn rcb7(&self) -> RCB7_R { + RCB7_R::new(((self.bits >> 7) & 0x01) != 0) + } + #[doc = "Bit 8 - Remap Command Bit for Master 8"] + #[inline(always)] + pub fn rcb8(&self) -> RCB8_R { + RCB8_R::new(((self.bits >> 8) & 0x01) != 0) + } + #[doc = "Bit 9 - Remap Command Bit for Master 9"] + #[inline(always)] + pub fn rcb9(&self) -> RCB9_R { + RCB9_R::new(((self.bits >> 9) & 0x01) != 0) + } + #[doc = "Bit 10 - Remap Command Bit for Master 10"] + #[inline(always)] + pub fn rcb10(&self) -> RCB10_R { + RCB10_R::new(((self.bits >> 10) & 0x01) != 0) + } + #[doc = "Bit 11 - Remap Command Bit for Master 11"] + #[inline(always)] + pub fn rcb11(&self) -> RCB11_R { + RCB11_R::new(((self.bits >> 11) & 0x01) != 0) + } + #[doc = "Bit 12 - Remap Command Bit for Master 12"] + #[inline(always)] + pub fn rcb12(&self) -> RCB12_R { + RCB12_R::new(((self.bits >> 12) & 0x01) != 0) + } + #[doc = "Bit 13 - Remap Command Bit for Master 13"] + #[inline(always)] + pub fn rcb13(&self) -> RCB13_R { + RCB13_R::new(((self.bits >> 13) & 0x01) != 0) + } + #[doc = "Bit 14 - Remap Command Bit for Master 14"] + #[inline(always)] + pub fn rcb14(&self) -> RCB14_R { + RCB14_R::new(((self.bits >> 14) & 0x01) != 0) + } + #[doc = "Bit 15 - Remap Command Bit for Master 15"] + #[inline(always)] + pub fn rcb15(&self) -> RCB15_R { + RCB15_R::new(((self.bits >> 15) & 0x01) != 0) + } +} +impl W { + #[doc = "Bit 0 - Remap Command Bit for Master 0"] + #[inline(always)] + pub fn rcb0(&mut self) -> RCB0_W { + RCB0_W { w: self } + } + #[doc = "Bit 1 - Remap Command Bit for Master 1"] + #[inline(always)] + pub fn rcb1(&mut self) -> RCB1_W { + RCB1_W { w: self } + } + #[doc = "Bit 2 - Remap Command Bit for Master 2"] + #[inline(always)] + pub fn rcb2(&mut self) -> RCB2_W { + RCB2_W { w: self } + } + #[doc = "Bit 3 - Remap Command Bit for Master 3"] + #[inline(always)] + pub fn rcb3(&mut self) -> RCB3_W { + RCB3_W { w: self } + } + #[doc = "Bit 4 - Remap Command Bit for Master 4"] + #[inline(always)] + pub fn rcb4(&mut self) -> RCB4_W { + RCB4_W { w: self } + } + #[doc = "Bit 5 - Remap Command Bit for Master 5"] + #[inline(always)] + pub fn rcb5(&mut self) -> RCB5_W { + RCB5_W { w: self } + } + #[doc = "Bit 6 - Remap Command Bit for Master 6"] + #[inline(always)] + pub fn rcb6(&mut self) -> RCB6_W { + RCB6_W { w: self } + } + #[doc = "Bit 7 - Remap Command Bit for Master 7"] + #[inline(always)] + pub fn rcb7(&mut self) -> RCB7_W { + RCB7_W { w: self } + } + #[doc = "Bit 8 - Remap Command Bit for Master 8"] + #[inline(always)] + pub fn rcb8(&mut self) -> RCB8_W { + RCB8_W { w: self } + } + #[doc = "Bit 9 - Remap Command Bit for Master 9"] + #[inline(always)] + pub fn rcb9(&mut self) -> RCB9_W { + RCB9_W { w: self } + } + #[doc = "Bit 10 - Remap Command Bit for Master 10"] + #[inline(always)] + pub fn rcb10(&mut self) -> RCB10_W { + RCB10_W { w: self } + } + #[doc = "Bit 11 - Remap Command Bit for Master 11"] + #[inline(always)] + pub fn rcb11(&mut self) -> RCB11_W { + RCB11_W { w: self } + } + #[doc = "Bit 12 - Remap Command Bit for Master 12"] + #[inline(always)] + pub fn rcb12(&mut self) -> RCB12_W { + RCB12_W { w: self } + } + #[doc = "Bit 13 - Remap Command Bit for Master 13"] + #[inline(always)] + pub fn rcb13(&mut self) -> RCB13_W { + RCB13_W { w: self } + } + #[doc = "Bit 14 - Remap Command Bit for Master 14"] + #[inline(always)] + pub fn rcb14(&mut self) -> RCB14_W { + RCB14_W { w: self } + } + #[doc = "Bit 15 - Remap Command Bit for Master 15"] + #[inline(always)] + pub fn rcb15(&mut self) -> RCB15_W { + RCB15_W { w: self } + } + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self + } +} +#[doc = "Master Remap Control\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [mrcr](index.html) module"] +pub struct MRCR_SPEC; +impl crate::RegisterSpec for MRCR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [mrcr::R](R) reader structure"] +impl crate::Readable for MRCR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [mrcr::W](W) writer structure"] +impl crate::Writable for MRCR_SPEC { + type Writer = W; +} +#[doc = "`reset()` method sets MRCR to value 0"] +impl crate::Resettable for MRCR_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0 + } +} diff --git a/src/hmatrixhs/prs.rs b/src/hmatrixhs/prs.rs new file mode 100644 index 0000000..0313f3c --- /dev/null +++ b/src/hmatrixhs/prs.rs @@ -0,0 +1,8 @@ +#[doc = "PRAS register accessor: an alias for `Reg<PRAS_SPEC>`"] +pub type PRAS = crate::Reg<pras::PRAS_SPEC>; +#[doc = "Priority A for Slave"] +pub mod pras; +#[doc = "PRBS register accessor: an alias for `Reg<PRBS_SPEC>`"] +pub type PRBS = crate::Reg<prbs::PRBS_SPEC>; +#[doc = "Priority B for Slave"] +pub mod prbs; diff --git a/src/hmatrixhs/prs/pras.rs b/src/hmatrixhs/prs/pras.rs new file mode 100644 index 0000000..8c174ec --- /dev/null +++ b/src/hmatrixhs/prs/pras.rs @@ -0,0 +1,354 @@ +#[doc = "Register `PRAS` reader"] +pub struct R(crate::R<PRAS_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<PRAS_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<PRAS_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<PRAS_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Register `PRAS` writer"] +pub struct W(crate::W<PRAS_SPEC>); +impl core::ops::Deref for W { + type Target = crate::W<PRAS_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From<crate::W<PRAS_SPEC>> for W { + #[inline(always)] + fn from(writer: crate::W<PRAS_SPEC>) -> Self { + W(writer) + } +} +#[doc = "Field `M0PR` reader - Master 0 Priority"] +pub struct M0PR_R(crate::FieldReader<u8, u8>); +impl M0PR_R { + pub(crate) fn new(bits: u8) -> Self { + M0PR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for M0PR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `M0PR` writer - Master 0 Priority"] +pub struct M0PR_W<'a> { + w: &'a mut W, +} +impl<'a> M0PR_W<'a> { + #[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 & !0x0f) | (value as u32 & 0x0f); + self.w + } +} +#[doc = "Field `M1PR` reader - Master 1 Priority"] +pub struct M1PR_R(crate::FieldReader<u8, u8>); +impl M1PR_R { + pub(crate) fn new(bits: u8) -> Self { + M1PR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for M1PR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `M1PR` writer - Master 1 Priority"] +pub struct M1PR_W<'a> { + w: &'a mut W, +} +impl<'a> M1PR_W<'a> { + #[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 & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4); + self.w + } +} +#[doc = "Field `M2PR` reader - Master 2 Priority"] +pub struct M2PR_R(crate::FieldReader<u8, u8>); +impl M2PR_R { + pub(crate) fn new(bits: u8) -> Self { + M2PR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for M2PR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `M2PR` writer - Master 2 Priority"] +pub struct M2PR_W<'a> { + w: &'a mut W, +} +impl<'a> M2PR_W<'a> { + #[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 & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); + self.w + } +} +#[doc = "Field `M3PR` reader - Master 3 Priority"] +pub struct M3PR_R(crate::FieldReader<u8, u8>); +impl M3PR_R { + pub(crate) fn new(bits: u8) -> Self { + M3PR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for M3PR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `M3PR` writer - Master 3 Priority"] +pub struct M3PR_W<'a> { + w: &'a mut W, +} +impl<'a> M3PR_W<'a> { + #[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 & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12); + self.w + } +} +#[doc = "Field `M4PR` reader - Master 4 Priority"] +pub struct M4PR_R(crate::FieldReader<u8, u8>); +impl M4PR_R { + pub(crate) fn new(bits: u8) -> Self { + M4PR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for M4PR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `M4PR` writer - Master 4 Priority"] +pub struct M4PR_W<'a> { + w: &'a mut W, +} +impl<'a> M4PR_W<'a> { + #[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 & !(0x0f << 16)) | ((value as u32 & 0x0f) << 16); + self.w + } +} +#[doc = "Field `M5PR` reader - Master 5 Priority"] +pub struct M5PR_R(crate::FieldReader<u8, u8>); +impl M5PR_R { + pub(crate) fn new(bits: u8) -> Self { + M5PR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for M5PR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `M5PR` writer - Master 5 Priority"] +pub struct M5PR_W<'a> { + w: &'a mut W, +} +impl<'a> M5PR_W<'a> { + #[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 & !(0x0f << 20)) | ((value as u32 & 0x0f) << 20); + self.w + } +} +#[doc = "Field `M6PR` reader - Master 6 Priority"] +pub struct M6PR_R(crate::FieldReader<u8, u8>); +impl M6PR_R { + pub(crate) fn new(bits: u8) -> Self { + M6PR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for M6PR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `M6PR` writer - Master 6 Priority"] +pub struct M6PR_W<'a> { + w: &'a mut W, +} +impl<'a> M6PR_W<'a> { + #[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 & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); + self.w + } +} +#[doc = "Field `M7PR` reader - Master 7 Priority"] +pub struct M7PR_R(crate::FieldReader<u8, u8>); +impl M7PR_R { + pub(crate) fn new(bits: u8) -> Self { + M7PR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for M7PR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `M7PR` writer - Master 7 Priority"] +pub struct M7PR_W<'a> { + w: &'a mut W, +} +impl<'a> M7PR_W<'a> { + #[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 & !(0x0f << 28)) | ((value as u32 & 0x0f) << 28); + self.w + } +} +impl R { + #[doc = "Bits 0:3 - Master 0 Priority"] + #[inline(always)] + pub fn m0pr(&self) -> M0PR_R { + M0PR_R::new((self.bits & 0x0f) as u8) + } + #[doc = "Bits 4:7 - Master 1 Priority"] + #[inline(always)] + pub fn m1pr(&self) -> M1PR_R { + M1PR_R::new(((self.bits >> 4) & 0x0f) as u8) + } + #[doc = "Bits 8:11 - Master 2 Priority"] + #[inline(always)] + pub fn m2pr(&self) -> M2PR_R { + M2PR_R::new(((self.bits >> 8) & 0x0f) as u8) + } + #[doc = "Bits 12:15 - Master 3 Priority"] + #[inline(always)] + pub fn m3pr(&self) -> M3PR_R { + M3PR_R::new(((self.bits >> 12) & 0x0f) as u8) + } + #[doc = "Bits 16:19 - Master 4 Priority"] + #[inline(always)] + pub fn m4pr(&self) -> M4PR_R { + M4PR_R::new(((self.bits >> 16) & 0x0f) as u8) + } + #[doc = "Bits 20:23 - Master 5 Priority"] + #[inline(always)] + pub fn m5pr(&self) -> M5PR_R { + M5PR_R::new(((self.bits >> 20) & 0x0f) as u8) + } + #[doc = "Bits 24:27 - Master 6 Priority"] + #[inline(always)] + pub fn m6pr(&self) -> M6PR_R { + M6PR_R::new(((self.bits >> 24) & 0x0f) as u8) + } + #[doc = "Bits 28:31 - Master 7 Priority"] + #[inline(always)] + pub fn m7pr(&self) -> M7PR_R { + M7PR_R::new(((self.bits >> 28) & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - Master 0 Priority"] + #[inline(always)] + pub fn m0pr(&mut self) -> M0PR_W { + M0PR_W { w: self } + } + #[doc = "Bits 4:7 - Master 1 Priority"] + #[inline(always)] + pub fn m1pr(&mut self) -> M1PR_W { + M1PR_W { w: self } + } + #[doc = "Bits 8:11 - Master 2 Priority"] + #[inline(always)] + pub fn m2pr(&mut self) -> M2PR_W { + M2PR_W { w: self } + } + #[doc = "Bits 12:15 - Master 3 Priority"] + #[inline(always)] + pub fn m3pr(&mut self) -> M3PR_W { + M3PR_W { w: self } + } + #[doc = "Bits 16:19 - Master 4 Priority"] + #[inline(always)] + pub fn m4pr(&mut self) -> M4PR_W { + M4PR_W { w: self } + } + #[doc = "Bits 20:23 - Master 5 Priority"] + #[inline(always)] + pub fn m5pr(&mut self) -> M5PR_W { + M5PR_W { w: self } + } + #[doc = "Bits 24:27 - Master 6 Priority"] + #[inline(always)] + pub fn m6pr(&mut self) -> M6PR_W { + M6PR_W { w: self } + } + #[doc = "Bits 28:31 - Master 7 Priority"] + #[inline(always)] + pub fn m7pr(&mut self) -> M7PR_W { + M7PR_W { w: self } + } + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self + } +} +#[doc = "Priority A for Slave\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [pras](index.html) module"] +pub struct PRAS_SPEC; +impl crate::RegisterSpec for PRAS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [pras::R](R) reader structure"] +impl crate::Readable for PRAS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [pras::W](W) writer structure"] +impl crate::Writable for PRAS_SPEC { + type Writer = W; +} +#[doc = "`reset()` method sets PRAS to value 0"] +impl crate::Resettable for PRAS_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0 + } +} diff --git a/src/hmatrixhs/prs/prbs.rs b/src/hmatrixhs/prs/prbs.rs new file mode 100644 index 0000000..6b41ef7 --- /dev/null +++ b/src/hmatrixhs/prs/prbs.rs @@ -0,0 +1,354 @@ +#[doc = "Register `PRBS` reader"] +pub struct R(crate::R<PRBS_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<PRBS_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<PRBS_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<PRBS_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Register `PRBS` writer"] +pub struct W(crate::W<PRBS_SPEC>); +impl core::ops::Deref for W { + type Target = crate::W<PRBS_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From<crate::W<PRBS_SPEC>> for W { + #[inline(always)] + fn from(writer: crate::W<PRBS_SPEC>) -> Self { + W(writer) + } +} +#[doc = "Field `M8PR` reader - Master 8 Priority"] +pub struct M8PR_R(crate::FieldReader<u8, u8>); +impl M8PR_R { + pub(crate) fn new(bits: u8) -> Self { + M8PR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for M8PR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `M8PR` writer - Master 8 Priority"] +pub struct M8PR_W<'a> { + w: &'a mut W, +} +impl<'a> M8PR_W<'a> { + #[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 & !0x0f) | (value as u32 & 0x0f); + self.w + } +} +#[doc = "Field `M9PR` reader - Master 9 Priority"] +pub struct M9PR_R(crate::FieldReader<u8, u8>); +impl M9PR_R { + pub(crate) fn new(bits: u8) -> Self { + M9PR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for M9PR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `M9PR` writer - Master 9 Priority"] +pub struct M9PR_W<'a> { + w: &'a mut W, +} +impl<'a> M9PR_W<'a> { + #[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 & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4); + self.w + } +} +#[doc = "Field `M10PR` reader - Master 10 Priority"] +pub struct M10PR_R(crate::FieldReader<u8, u8>); +impl M10PR_R { + pub(crate) fn new(bits: u8) -> Self { + M10PR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for M10PR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `M10PR` writer - Master 10 Priority"] +pub struct M10PR_W<'a> { + w: &'a mut W, +} +impl<'a> M10PR_W<'a> { + #[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 & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8); + self.w + } +} +#[doc = "Field `M11PR` reader - Master 11 Priority"] +pub struct M11PR_R(crate::FieldReader<u8, u8>); +impl M11PR_R { + pub(crate) fn new(bits: u8) -> Self { + M11PR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for M11PR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `M11PR` writer - Master 11 Priority"] +pub struct M11PR_W<'a> { + w: &'a mut W, +} +impl<'a> M11PR_W<'a> { + #[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 & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12); + self.w + } +} +#[doc = "Field `M12PR` reader - Master 12 Priority"] +pub struct M12PR_R(crate::FieldReader<u8, u8>); +impl M12PR_R { + pub(crate) fn new(bits: u8) -> Self { + M12PR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for M12PR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `M12PR` writer - Master 12 Priority"] +pub struct M12PR_W<'a> { + w: &'a mut W, +} +impl<'a> M12PR_W<'a> { + #[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 & !(0x0f << 16)) | ((value as u32 & 0x0f) << 16); + self.w + } +} +#[doc = "Field `M13PR` reader - Master 13 Priority"] +pub struct M13PR_R(crate::FieldReader<u8, u8>); +impl M13PR_R { + pub(crate) fn new(bits: u8) -> Self { + M13PR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for M13PR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `M13PR` writer - Master 13 Priority"] +pub struct M13PR_W<'a> { + w: &'a mut W, +} +impl<'a> M13PR_W<'a> { + #[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 & !(0x0f << 20)) | ((value as u32 & 0x0f) << 20); + self.w + } +} +#[doc = "Field `M14PR` reader - Master 14 Priority"] +pub struct M14PR_R(crate::FieldReader<u8, u8>); +impl M14PR_R { + pub(crate) fn new(bits: u8) -> Self { + M14PR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for M14PR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `M14PR` writer - Master 14 Priority"] +pub struct M14PR_W<'a> { + w: &'a mut W, +} +impl<'a> M14PR_W<'a> { + #[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 & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24); + self.w + } +} +#[doc = "Field `M15PR` reader - Master 15 Priority"] +pub struct M15PR_R(crate::FieldReader<u8, u8>); +impl M15PR_R { + pub(crate) fn new(bits: u8) -> Self { + M15PR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for M15PR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `M15PR` writer - Master 15 Priority"] +pub struct M15PR_W<'a> { + w: &'a mut W, +} +impl<'a> M15PR_W<'a> { + #[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 & !(0x0f << 28)) | ((value as u32 & 0x0f) << 28); + self.w + } +} +impl R { + #[doc = "Bits 0:3 - Master 8 Priority"] + #[inline(always)] + pub fn m8pr(&self) -> M8PR_R { + M8PR_R::new((self.bits & 0x0f) as u8) + } + #[doc = "Bits 4:7 - Master 9 Priority"] + #[inline(always)] + pub fn m9pr(&self) -> M9PR_R { + M9PR_R::new(((self.bits >> 4) & 0x0f) as u8) + } + #[doc = "Bits 8:11 - Master 10 Priority"] + #[inline(always)] + pub fn m10pr(&self) -> M10PR_R { + M10PR_R::new(((self.bits >> 8) & 0x0f) as u8) + } + #[doc = "Bits 12:15 - Master 11 Priority"] + #[inline(always)] + pub fn m11pr(&self) -> M11PR_R { + M11PR_R::new(((self.bits >> 12) & 0x0f) as u8) + } + #[doc = "Bits 16:19 - Master 12 Priority"] + #[inline(always)] + pub fn m12pr(&self) -> M12PR_R { + M12PR_R::new(((self.bits >> 16) & 0x0f) as u8) + } + #[doc = "Bits 20:23 - Master 13 Priority"] + #[inline(always)] + pub fn m13pr(&self) -> M13PR_R { + M13PR_R::new(((self.bits >> 20) & 0x0f) as u8) + } + #[doc = "Bits 24:27 - Master 14 Priority"] + #[inline(always)] + pub fn m14pr(&self) -> M14PR_R { + M14PR_R::new(((self.bits >> 24) & 0x0f) as u8) + } + #[doc = "Bits 28:31 - Master 15 Priority"] + #[inline(always)] + pub fn m15pr(&self) -> M15PR_R { + M15PR_R::new(((self.bits >> 28) & 0x0f) as u8) + } +} +impl W { + #[doc = "Bits 0:3 - Master 8 Priority"] + #[inline(always)] + pub fn m8pr(&mut self) -> M8PR_W { + M8PR_W { w: self } + } + #[doc = "Bits 4:7 - Master 9 Priority"] + #[inline(always)] + pub fn m9pr(&mut self) -> M9PR_W { + M9PR_W { w: self } + } + #[doc = "Bits 8:11 - Master 10 Priority"] + #[inline(always)] + pub fn m10pr(&mut self) -> M10PR_W { + M10PR_W { w: self } + } + #[doc = "Bits 12:15 - Master 11 Priority"] + #[inline(always)] + pub fn m11pr(&mut self) -> M11PR_W { + M11PR_W { w: self } + } + #[doc = "Bits 16:19 - Master 12 Priority"] + #[inline(always)] + pub fn m12pr(&mut self) -> M12PR_W { + M12PR_W { w: self } + } + #[doc = "Bits 20:23 - Master 13 Priority"] + #[inline(always)] + pub fn m13pr(&mut self) -> M13PR_W { + M13PR_W { w: self } + } + #[doc = "Bits 24:27 - Master 14 Priority"] + #[inline(always)] + pub fn m14pr(&mut self) -> M14PR_W { + M14PR_W { w: self } + } + #[doc = "Bits 28:31 - Master 15 Priority"] + #[inline(always)] + pub fn m15pr(&mut self) -> M15PR_W { + M15PR_W { w: self } + } + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self + } +} +#[doc = "Priority B for Slave\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [prbs](index.html) module"] +pub struct PRBS_SPEC; +impl crate::RegisterSpec for PRBS_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [prbs::R](R) reader structure"] +impl crate::Readable for PRBS_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [prbs::W](W) writer structure"] +impl crate::Writable for PRBS_SPEC { + type Writer = W; +} +#[doc = "`reset()` method sets PRBS to value 0"] +impl crate::Resettable for PRBS_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0 + } +} diff --git a/src/hmatrixhs/scfg.rs b/src/hmatrixhs/scfg.rs new file mode 100644 index 0000000..7147e89 --- /dev/null +++ b/src/hmatrixhs/scfg.rs @@ -0,0 +1,330 @@ +#[doc = "Register `SCFG[%s]` reader"] +pub struct R(crate::R<SCFG_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<SCFG_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<SCFG_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<SCFG_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Register `SCFG[%s]` writer"] +pub struct W(crate::W<SCFG_SPEC>); +impl core::ops::Deref for W { + type Target = crate::W<SCFG_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From<crate::W<SCFG_SPEC>> for W { + #[inline(always)] + fn from(writer: crate::W<SCFG_SPEC>) -> Self { + W(writer) + } +} +#[doc = "Field `SLOT_CYCLE` reader - Maximum Number of Allowed Cycles for a Burst"] +pub struct SLOT_CYCLE_R(crate::FieldReader<u8, u8>); +impl SLOT_CYCLE_R { + pub(crate) fn new(bits: u8) -> Self { + SLOT_CYCLE_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SLOT_CYCLE_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SLOT_CYCLE` writer - Maximum Number of Allowed Cycles for a Burst"] +pub struct SLOT_CYCLE_W<'a> { + w: &'a mut W, +} +impl<'a> SLOT_CYCLE_W<'a> { + #[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 & !0xff) | (value as u32 & 0xff); + self.w + } +} +#[doc = "Default Master Type\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +#[repr(u8)] +pub enum DEFMSTR_TYPE_A { + #[doc = "0: No Default Master. At the end of current slave access, if no other master request is pending, the slave is deconnected from all masters. This resusts in having a one cycle latency for the first transfer of a burst."] + NO_DEFAULT = 0, + #[doc = "1: Last Default Master At the end of current slave access, if no other master request is pending, the slave stay connected with the last master havingaccessed it.This resusts in not having the one cycle latency when the last master re-trying access on the slave."] + LAST_DEFAULT = 1, + #[doc = "2: Fixed Default Master At the end of current slave access, if no other master request is pending, the slave connects with fixed master which numberis in FIXED_DEFMSTR register.This resusts in not having the one cycle latency when the fixed master re-trying access on the slave."] + FIXED_DEFAULT = 2, +} +impl From<DEFMSTR_TYPE_A> for u8 { + #[inline(always)] + fn from(variant: DEFMSTR_TYPE_A) -> Self { + variant as _ + } +} +#[doc = "Field `DEFMSTR_TYPE` reader - Default Master Type"] +pub struct DEFMSTR_TYPE_R(crate::FieldReader<u8, DEFMSTR_TYPE_A>); +impl DEFMSTR_TYPE_R { + pub(crate) fn new(bits: u8) -> Self { + DEFMSTR_TYPE_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> Option<DEFMSTR_TYPE_A> { + match self.bits { + 0 => Some(DEFMSTR_TYPE_A::NO_DEFAULT), + 1 => Some(DEFMSTR_TYPE_A::LAST_DEFAULT), + 2 => Some(DEFMSTR_TYPE_A::FIXED_DEFAULT), + _ => None, + } + } + #[doc = "Checks if the value of the field is `NO_DEFAULT`"] + #[inline(always)] + pub fn is_no_default(&self) -> bool { + **self == DEFMSTR_TYPE_A::NO_DEFAULT + } + #[doc = "Checks if the value of the field is `LAST_DEFAULT`"] + #[inline(always)] + pub fn is_last_default(&self) -> bool { + **self == DEFMSTR_TYPE_A::LAST_DEFAULT + } + #[doc = "Checks if the value of the field is `FIXED_DEFAULT`"] + #[inline(always)] + pub fn is_fixed_default(&self) -> bool { + **self == DEFMSTR_TYPE_A::FIXED_DEFAULT + } +} +impl core::ops::Deref for DEFMSTR_TYPE_R { + type Target = crate::FieldReader<u8, DEFMSTR_TYPE_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `DEFMSTR_TYPE` writer - Default Master Type"] +pub struct DEFMSTR_TYPE_W<'a> { + w: &'a mut W, +} +impl<'a> DEFMSTR_TYPE_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: DEFMSTR_TYPE_A) -> &'a mut W { + unsafe { self.bits(variant.into()) } + } + #[doc = "No Default Master. At the end of current slave access, if no other master request is pending, the slave is deconnected from all masters. This resusts in having a one cycle latency for the first transfer of a burst."] + #[inline(always)] + pub fn no_default(self) -> &'a mut W { + self.variant(DEFMSTR_TYPE_A::NO_DEFAULT) + } + #[doc = "Last Default Master At the end of current slave access, if no other master request is pending, the slave stay connected with the last master havingaccessed it.This resusts in not having the one cycle latency when the last master re-trying access on the slave."] + #[inline(always)] + pub fn last_default(self) -> &'a mut W { + self.variant(DEFMSTR_TYPE_A::LAST_DEFAULT) + } + #[doc = "Fixed Default Master At the end of current slave access, if no other master request is pending, the slave connects with fixed master which numberis in FIXED_DEFMSTR register.This resusts in not having the one cycle latency when the fixed master re-trying access on the slave."] + #[inline(always)] + pub fn fixed_default(self) -> &'a mut W { + self.variant(DEFMSTR_TYPE_A::FIXED_DEFAULT) + } + #[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 & !(0x03 << 16)) | ((value as u32 & 0x03) << 16); + self.w + } +} +#[doc = "Field `FIXED_DEFMSTR` reader - Fixed Index of Default Master"] +pub struct FIXED_DEFMSTR_R(crate::FieldReader<u8, u8>); +impl FIXED_DEFMSTR_R { + pub(crate) fn new(bits: u8) -> Self { + FIXED_DEFMSTR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for FIXED_DEFMSTR_R { + type Target = crate::FieldReader<u8, u8>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `FIXED_DEFMSTR` writer - Fixed Index of Default Master"] +pub struct FIXED_DEFMSTR_W<'a> { + w: &'a mut W, +} +impl<'a> FIXED_DEFMSTR_W<'a> { + #[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 & !(0x0f << 18)) | ((value as u32 & 0x0f) << 18); + self.w + } +} +#[doc = "Arbitration Type\n\nValue on reset: 0"] +#[derive(Clone, Copy, Debug, PartialEq)] +pub enum ARBT_A { + #[doc = "0: Round-Robin Arbitration"] + ROUND_ROBIN = 0, + #[doc = "1: Fixed Priority Arbitration"] + FIXED_PRIORITY = 1, +} +impl From<ARBT_A> for bool { + #[inline(always)] + fn from(variant: ARBT_A) -> Self { + variant as u8 != 0 + } +} +#[doc = "Field `ARBT` reader - Arbitration Type"] +pub struct ARBT_R(crate::FieldReader<bool, ARBT_A>); +impl ARBT_R { + pub(crate) fn new(bits: bool) -> Self { + ARBT_R(crate::FieldReader::new(bits)) + } + #[doc = r"Get enumerated values variant"] + #[inline(always)] + pub fn variant(&self) -> ARBT_A { + match self.bits { + false => ARBT_A::ROUND_ROBIN, + true => ARBT_A::FIXED_PRIORITY, + } + } + #[doc = "Checks if the value of the field is `ROUND_ROBIN`"] + #[inline(always)] + pub fn is_round_robin(&self) -> bool { + **self == ARBT_A::ROUND_ROBIN + } + #[doc = "Checks if the value of the field is `FIXED_PRIORITY`"] + #[inline(always)] + pub fn is_fixed_priority(&self) -> bool { + **self == ARBT_A::FIXED_PRIORITY + } +} +impl core::ops::Deref for ARBT_R { + type Target = crate::FieldReader<bool, ARBT_A>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `ARBT` writer - Arbitration Type"] +pub struct ARBT_W<'a> { + w: &'a mut W, +} +impl<'a> ARBT_W<'a> { + #[doc = r"Writes `variant` to the field"] + #[inline(always)] + pub fn variant(self, variant: ARBT_A) -> &'a mut W { + self.bit(variant.into()) + } + #[doc = "Round-Robin Arbitration"] + #[inline(always)] + pub fn round_robin(self) -> &'a mut W { + self.variant(ARBT_A::ROUND_ROBIN) + } + #[doc = "Fixed Priority Arbitration"] + #[inline(always)] + pub fn fixed_priority(self) -> &'a mut W { + self.variant(ARBT_A::FIXED_PRIORITY) + } + #[doc = r"Sets the field bit"] + #[inline(always)] + pub fn set_bit(self) -> &'a mut W { + self.bit(true) + } + #[doc = r"Clears the field bit"] + #[inline(always)] + pub fn clear_bit(self) -> &'a mut W { + self.bit(false) + } + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub fn bit(self, value: bool) -> &'a mut W { + self.w.bits = (self.w.bits & !(0x01 << 24)) | ((value as u32 & 0x01) << 24); + self.w + } +} +impl R { + #[doc = "Bits 0:7 - Maximum Number of Allowed Cycles for a Burst"] + #[inline(always)] + pub fn slot_cycle(&self) -> SLOT_CYCLE_R { + SLOT_CYCLE_R::new((self.bits & 0xff) as u8) + } + #[doc = "Bits 16:17 - Default Master Type"] + #[inline(always)] + pub fn defmstr_type(&self) -> DEFMSTR_TYPE_R { + DEFMSTR_TYPE_R::new(((self.bits >> 16) & 0x03) as u8) + } + #[doc = "Bits 18:21 - Fixed Index of Default Master"] + #[inline(always)] + pub fn fixed_defmstr(&self) -> FIXED_DEFMSTR_R { + FIXED_DEFMSTR_R::new(((self.bits >> 18) & 0x0f) as u8) + } + #[doc = "Bit 24 - Arbitration Type"] + #[inline(always)] + pub fn arbt(&self) -> ARBT_R { + ARBT_R::new(((self.bits >> 24) & 0x01) != 0) + } +} +impl W { + #[doc = "Bits 0:7 - Maximum Number of Allowed Cycles for a Burst"] + #[inline(always)] + pub fn slot_cycle(&mut self) -> SLOT_CYCLE_W { + SLOT_CYCLE_W { w: self } + } + #[doc = "Bits 16:17 - Default Master Type"] + #[inline(always)] + pub fn defmstr_type(&mut self) -> DEFMSTR_TYPE_W { + DEFMSTR_TYPE_W { w: self } + } + #[doc = "Bits 18:21 - Fixed Index of Default Master"] + #[inline(always)] + pub fn fixed_defmstr(&mut self) -> FIXED_DEFMSTR_W { + FIXED_DEFMSTR_W { w: self } + } + #[doc = "Bit 24 - Arbitration Type"] + #[inline(always)] + pub fn arbt(&mut self) -> ARBT_W { + ARBT_W { w: self } + } + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self + } +} +#[doc = "Slave Configuration\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [scfg](index.html) module"] +pub struct SCFG_SPEC; +impl crate::RegisterSpec for SCFG_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [scfg::R](R) reader structure"] +impl crate::Readable for SCFG_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [scfg::W](W) writer structure"] +impl crate::Writable for SCFG_SPEC { + type Writer = W; +} +#[doc = "`reset()` method sets SCFG[%s] +to value 0x10"] +impl crate::Resettable for SCFG_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0x10 + } +} diff --git a/src/hmatrixhs/sfr.rs b/src/hmatrixhs/sfr.rs new file mode 100644 index 0000000..c15b5f6 --- /dev/null +++ b/src/hmatrixhs/sfr.rs @@ -0,0 +1,103 @@ +#[doc = "Register `SFR[%s]` reader"] +pub struct R(crate::R<SFR_SPEC>); +impl core::ops::Deref for R { + type Target = crate::R<SFR_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl From<crate::R<SFR_SPEC>> for R { + #[inline(always)] + fn from(reader: crate::R<SFR_SPEC>) -> Self { + R(reader) + } +} +#[doc = "Register `SFR[%s]` writer"] +pub struct W(crate::W<SFR_SPEC>); +impl core::ops::Deref for W { + type Target = crate::W<SFR_SPEC>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +impl core::ops::DerefMut for W { + #[inline(always)] + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.0 + } +} +impl From<crate::W<SFR_SPEC>> for W { + #[inline(always)] + fn from(writer: crate::W<SFR_SPEC>) -> Self { + W(writer) + } +} +#[doc = "Field `SFR` reader - Special Function Register"] +pub struct SFR_R(crate::FieldReader<u32, u32>); +impl SFR_R { + pub(crate) fn new(bits: u32) -> Self { + SFR_R(crate::FieldReader::new(bits)) + } +} +impl core::ops::Deref for SFR_R { + type Target = crate::FieldReader<u32, u32>; + #[inline(always)] + fn deref(&self) -> &Self::Target { + &self.0 + } +} +#[doc = "Field `SFR` writer - Special Function Register"] +pub struct SFR_W<'a> { + w: &'a mut W, +} +impl<'a> SFR_W<'a> { + #[doc = r"Writes raw bits to the field"] + #[inline(always)] + pub unsafe fn bits(self, value: u32) -> &'a mut W { + self.w.bits = (self.w.bits & !0xffff_ffff) | (value as u32 & 0xffff_ffff); + self.w + } +} +impl R { + #[doc = "Bits 0:31 - Special Function Register"] + #[inline(always)] + pub fn sfr(&self) -> SFR_R { + SFR_R::new((self.bits & 0xffff_ffff) as u32) + } +} +impl W { + #[doc = "Bits 0:31 - Special Function Register"] + #[inline(always)] + pub fn sfr(&mut self) -> SFR_W { + SFR_W { w: self } + } + #[doc = "Writes raw bits to the register."] + #[inline(always)] + pub unsafe fn bits(&mut self, bits: u32) -> &mut Self { + self.0.bits(bits); + self + } +} +#[doc = "Special Function\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [sfr](index.html) module"] +pub struct SFR_SPEC; +impl crate::RegisterSpec for SFR_SPEC { + type Ux = u32; +} +#[doc = "`read()` method returns [sfr::R](R) reader structure"] +impl crate::Readable for SFR_SPEC { + type Reader = R; +} +#[doc = "`write(|w| ..)` method takes [sfr::W](W) writer structure"] +impl crate::Writable for SFR_SPEC { + type Writer = W; +} +#[doc = "`reset()` method sets SFR[%s] +to value 0"] +impl crate::Resettable for SFR_SPEC { + #[inline(always)] + fn reset_value() -> Self::Ux { + 0 + } +} |
