mcxa_pac/sau/
rbar.rs

1#[doc = "Register `RBAR` reader"]
2pub type R = crate::R<RbarSpec>;
3#[doc = "Register `RBAR` writer"]
4pub type W = crate::W<RbarSpec>;
5#[doc = "Field `BADDR` reader - Base address. Holds bits\\[31:5\\] of the base address for the selected SAU region. Bits\\[4:0\\] of the base address are defined as 0x00."]
6pub type BaddrR = crate::FieldReader<u32>;
7#[doc = "Field `BADDR` writer - Base address. Holds bits\\[31:5\\] of the base address for the selected SAU region. Bits\\[4:0\\] of the base address are defined as 0x00."]
8pub type BaddrW<'a, REG> = crate::FieldWriter<'a, REG, 27, u32>;
9impl R {
10    #[doc = "Bits 5:31 - Base address. Holds bits\\[31:5\\] of the base address for the selected SAU region. Bits\\[4:0\\] of the base address are defined as 0x00."]
11    #[inline(always)]
12    pub fn baddr(&self) -> BaddrR {
13        BaddrR::new((self.bits >> 5) & 0x07ff_ffff)
14    }
15}
16#[cfg(feature = "debug")]
17impl core::fmt::Debug for R {
18    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
19        f.debug_struct("RBAR").field("baddr", &self.baddr()).finish()
20    }
21}
22impl W {
23    #[doc = "Bits 5:31 - Base address. Holds bits\\[31:5\\] of the base address for the selected SAU region. Bits\\[4:0\\] of the base address are defined as 0x00."]
24    #[inline(always)]
25    pub fn baddr(&mut self) -> BaddrW<'_, RbarSpec> {
26        BaddrW::new(self, 5)
27    }
28}
29#[doc = "Security Attribution Unit Region Base Address Register\n\nYou can [`read`](crate::Reg::read) this register and get [`rbar::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`rbar::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
30pub struct RbarSpec;
31impl crate::RegisterSpec for RbarSpec {
32    type Ux = u32;
33}
34#[doc = "`read()` method returns [`rbar::R`](R) reader structure"]
35impl crate::Readable for RbarSpec {}
36#[doc = "`write(|w| ..)` method takes [`rbar::W`](W) writer structure"]
37impl crate::Writable for RbarSpec {
38    type Safety = crate::Unsafe;
39}
40#[doc = "`reset()` method sets RBAR to value 0"]
41impl crate::Resettable for RbarSpec {}