lpc82x_pac/mtb_sfr/
base.rs

1#[doc = "Register `BASE` reader"]
2pub struct R(crate::R<BASE_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<BASE_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<BASE_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<BASE_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `BASE` reader - The value provided is the value of the SRAMBASEADDR\\[31:0\\]
17signal."]
18pub struct BASE_R(crate::FieldReader<u32, u32>);
19impl BASE_R {
20    pub(crate) fn new(bits: u32) -> Self {
21        BASE_R(crate::FieldReader::new(bits))
22    }
23}
24impl core::ops::Deref for BASE_R {
25    type Target = crate::FieldReader<u32, u32>;
26    #[inline(always)]
27    fn deref(&self) -> &Self::Target {
28        &self.0
29    }
30}
31impl R {
32    #[doc = "Bits 0:31 - The value provided is the value of the SRAMBASEADDR\\[31:0\\]
33signal."]
34    #[inline(always)]
35    pub fn base(&self) -> BASE_R {
36        BASE_R::new((self.bits & 0xffff_ffff) as u32)
37    }
38}
39#[doc = "Indicates where the SRAM is located in the processor memory map. This register is provided to enable auto discovery of the MTB SRAM location, by a debug agent.\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [base](index.html) module"]
40pub struct BASE_SPEC;
41impl crate::RegisterSpec for BASE_SPEC {
42    type Ux = u32;
43}
44#[doc = "`read()` method returns [base::R](R) reader structure"]
45impl crate::Readable for BASE_SPEC {
46    type Reader = R;
47}
48#[doc = "`reset()` method sets BASE to value 0"]
49impl crate::Resettable for BASE_SPEC {
50    #[inline(always)]
51    fn reset_value() -> Self::Ux {
52        0
53    }
54}