1#[doc = "Register `MPU_TYPE` reader"]
2pub type R = crate::R<MPU_TYPE_SPEC>;
3#[doc = "Field `SEPARATE` reader - Support for unified or separate instruction and date memory maps"]
4pub type SEPARATE_R = crate::BitReader;
5#[doc = "Field `DREGION` reader - Number of supported MPU data regions"]
6pub type DREGION_R = crate::FieldReader;
7#[doc = "Field `IREGION` reader - Number of supported MPU instruction regions"]
8pub type IREGION_R = crate::FieldReader;
9impl R {
10 #[doc = "Bit 0 - Support for unified or separate instruction and date memory maps"]
11 #[inline(always)]
12 pub fn separate(&self) -> SEPARATE_R {
13 SEPARATE_R::new((self.bits & 1) != 0)
14 }
15 #[doc = "Bits 8:15 - Number of supported MPU data regions"]
16 #[inline(always)]
17 pub fn dregion(&self) -> DREGION_R {
18 DREGION_R::new(((self.bits >> 8) & 0xff) as u8)
19 }
20 #[doc = "Bits 16:23 - Number of supported MPU instruction regions"]
21 #[inline(always)]
22 pub fn iregion(&self) -> IREGION_R {
23 IREGION_R::new(((self.bits >> 16) & 0xff) as u8)
24 }
25}
26#[doc = "MPU Type Register\n\nYou can [`read`](crate::Reg::read) this register and get [`mpu_type::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
27pub struct MPU_TYPE_SPEC;
28impl crate::RegisterSpec for MPU_TYPE_SPEC {
29 type Ux = u32;
30}
31#[doc = "`read()` method returns [`mpu_type::R`](R) reader structure"]
32impl crate::Readable for MPU_TYPE_SPEC {}
33#[doc = "`reset()` method sets MPU_TYPE to value 0x0800"]
34impl crate::Resettable for MPU_TYPE_SPEC {
35 const RESET_VALUE: u32 = 0x0800;
36}