#[doc = "Register `OCCUPY_2` reader"]
pub type R = crate::R<OCCUPY_2_SPEC>;
#[doc = "Register `OCCUPY_2` writer"]
pub type W = crate::W<OCCUPY_2_SPEC>;
#[doc = "Field `OCCUPY_MAC_DUMP` reader - Configure whether SRAM Block 18-21 is used as mac dump."]
pub type OCCUPY_MAC_DUMP_R = crate::FieldReader;
#[doc = "Field `OCCUPY_MAC_DUMP` writer - Configure whether SRAM Block 18-21 is used as mac dump."]
pub type OCCUPY_MAC_DUMP_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
impl R {
    #[doc = "Bits 0:3 - Configure whether SRAM Block 18-21 is used as mac dump."]
    #[inline(always)]
    pub fn occupy_mac_dump(&self) -> OCCUPY_MAC_DUMP_R {
        OCCUPY_MAC_DUMP_R::new((self.bits & 0x0f) as u8)
    }
}
#[cfg(feature = "impl-register-debug")]
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("OCCUPY_2")
            .field("occupy_mac_dump", &self.occupy_mac_dump())
            .finish()
    }
}
impl W {
    #[doc = "Bits 0:3 - Configure whether SRAM Block 18-21 is used as mac dump."]
    #[inline(always)]
    pub fn occupy_mac_dump(&mut self) -> OCCUPY_MAC_DUMP_W<'_, OCCUPY_2_SPEC> {
        OCCUPY_MAC_DUMP_W::new(self, 0)
    }
}
#[doc = "Occupy permission control register 2.\n\nYou can [`read`](crate::Reg::read) this register and get [`occupy_2::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`occupy_2::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct OCCUPY_2_SPEC;
impl crate::RegisterSpec for OCCUPY_2_SPEC {
    type Ux = u32;
}
#[doc = "`read()` method returns [`occupy_2::R`](R) reader structure"]
impl crate::Readable for OCCUPY_2_SPEC {}
#[doc = "`write(|w| ..)` method takes [`occupy_2::W`](W) writer structure"]
impl crate::Writable for OCCUPY_2_SPEC {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets OCCUPY_2 to value 0"]
impl crate::Resettable for OCCUPY_2_SPEC {}
