cc430f5137 0.1.0

Peripheral access API for CC430F5137 microcontroller
#[doc = "Register `PMAPCTL` reader"]
pub type R = crate::R<PmapctlSpec>;
#[doc = "Register `PMAPCTL` writer"]
pub type W = crate::W<PmapctlSpec>;
#[doc = "Field `PMAPLOCKED` reader - Port Mapping Lock bit. Read only"]
pub type PmaplockedR = crate::BitReader;
#[doc = "Field `PMAPLOCKED` writer - Port Mapping Lock bit. Read only"]
pub type PmaplockedW<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PMAPRECFG` reader - Port Mapping re-configuration control bit"]
pub type PmaprecfgR = crate::BitReader;
#[doc = "Field `PMAPRECFG` writer - Port Mapping re-configuration control bit"]
pub type PmaprecfgW<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "Bit 0 - Port Mapping Lock bit. Read only"]
    #[inline(always)]
    pub fn pmaplocked(&self) -> PmaplockedR {
        PmaplockedR::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - Port Mapping re-configuration control bit"]
    #[inline(always)]
    pub fn pmaprecfg(&self) -> PmaprecfgR {
        PmaprecfgR::new(((self.bits >> 1) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - Port Mapping Lock bit. Read only"]
    #[inline(always)]
    pub fn pmaplocked(&mut self) -> PmaplockedW<'_, PmapctlSpec> {
        PmaplockedW::new(self, 0)
    }
    #[doc = "Bit 1 - Port Mapping re-configuration control bit"]
    #[inline(always)]
    pub fn pmaprecfg(&mut self) -> PmaprecfgW<'_, PmapctlSpec> {
        PmaprecfgW::new(self, 1)
    }
}
#[doc = "Port Mapping control register\n\nYou can [`read`](crate::Reg::read) this register and get [`pmapctl::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pmapctl::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct PmapctlSpec;
impl crate::RegisterSpec for PmapctlSpec {
    type Ux = u16;
}
#[doc = "`read()` method returns [`pmapctl::R`](R) reader structure"]
impl crate::Readable for PmapctlSpec {}
#[doc = "`write(|w| ..)` method takes [`pmapctl::W`](W) writer structure"]
impl crate::Writable for PmapctlSpec {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets PMAPCTL to value 0"]
impl crate::Resettable for PmapctlSpec {}