cc430f5137 0.1.0

Peripheral access API for CC430F5137 microcontroller
#[doc = "Register `P2MAP0` reader"]
pub type R = crate::R<P2map0Spec>;
#[doc = "Register `P2MAP0` writer"]
pub type W = crate::W<P2map0Spec>;
#[doc = "Field `PMAP0` reader - PMAP0"]
pub type Pmap0R = crate::BitReader;
#[doc = "Field `PMAP0` writer - PMAP0"]
pub type Pmap0W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PMAP1` reader - PMAP1"]
pub type Pmap1R = crate::BitReader;
#[doc = "Field `PMAP1` writer - PMAP1"]
pub type Pmap1W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PMAP2` reader - PMAP2"]
pub type Pmap2R = crate::BitReader;
#[doc = "Field `PMAP2` writer - PMAP2"]
pub type Pmap2W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PMAP3` reader - PMAP3"]
pub type Pmap3R = crate::BitReader;
#[doc = "Field `PMAP3` writer - PMAP3"]
pub type Pmap3W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PMAP4` reader - PMAP4"]
pub type Pmap4R = crate::BitReader;
#[doc = "Field `PMAP4` writer - PMAP4"]
pub type Pmap4W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PMAP5` reader - PMAP5"]
pub type Pmap5R = crate::BitReader;
#[doc = "Field `PMAP5` writer - PMAP5"]
pub type Pmap5W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PMAP6` reader - PMAP6"]
pub type Pmap6R = crate::BitReader;
#[doc = "Field `PMAP6` writer - PMAP6"]
pub type Pmap6W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PMAP7` reader - PMAP7"]
pub type Pmap7R = crate::BitReader;
#[doc = "Field `PMAP7` writer - PMAP7"]
pub type Pmap7W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "Bit 0 - PMAP0"]
    #[inline(always)]
    pub fn pmap0(&self) -> Pmap0R {
        Pmap0R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - PMAP1"]
    #[inline(always)]
    pub fn pmap1(&self) -> Pmap1R {
        Pmap1R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - PMAP2"]
    #[inline(always)]
    pub fn pmap2(&self) -> Pmap2R {
        Pmap2R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - PMAP3"]
    #[inline(always)]
    pub fn pmap3(&self) -> Pmap3R {
        Pmap3R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 4 - PMAP4"]
    #[inline(always)]
    pub fn pmap4(&self) -> Pmap4R {
        Pmap4R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - PMAP5"]
    #[inline(always)]
    pub fn pmap5(&self) -> Pmap5R {
        Pmap5R::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - PMAP6"]
    #[inline(always)]
    pub fn pmap6(&self) -> Pmap6R {
        Pmap6R::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - PMAP7"]
    #[inline(always)]
    pub fn pmap7(&self) -> Pmap7R {
        Pmap7R::new(((self.bits >> 7) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - PMAP0"]
    #[inline(always)]
    pub fn pmap0(&mut self) -> Pmap0W<'_, P2map0Spec> {
        Pmap0W::new(self, 0)
    }
    #[doc = "Bit 1 - PMAP1"]
    #[inline(always)]
    pub fn pmap1(&mut self) -> Pmap1W<'_, P2map0Spec> {
        Pmap1W::new(self, 1)
    }
    #[doc = "Bit 2 - PMAP2"]
    #[inline(always)]
    pub fn pmap2(&mut self) -> Pmap2W<'_, P2map0Spec> {
        Pmap2W::new(self, 2)
    }
    #[doc = "Bit 3 - PMAP3"]
    #[inline(always)]
    pub fn pmap3(&mut self) -> Pmap3W<'_, P2map0Spec> {
        Pmap3W::new(self, 3)
    }
    #[doc = "Bit 4 - PMAP4"]
    #[inline(always)]
    pub fn pmap4(&mut self) -> Pmap4W<'_, P2map0Spec> {
        Pmap4W::new(self, 4)
    }
    #[doc = "Bit 5 - PMAP5"]
    #[inline(always)]
    pub fn pmap5(&mut self) -> Pmap5W<'_, P2map0Spec> {
        Pmap5W::new(self, 5)
    }
    #[doc = "Bit 6 - PMAP6"]
    #[inline(always)]
    pub fn pmap6(&mut self) -> Pmap6W<'_, P2map0Spec> {
        Pmap6W::new(self, 6)
    }
    #[doc = "Bit 7 - PMAP7"]
    #[inline(always)]
    pub fn pmap7(&mut self) -> Pmap7W<'_, P2map0Spec> {
        Pmap7W::new(self, 7)
    }
}
#[doc = "Port P2.0 mapping register\n\nYou can [`read`](crate::Reg::read) this register and get [`p2map0::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`p2map0::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct P2map0Spec;
impl crate::RegisterSpec for P2map0Spec {
    type Ux = u8;
}
#[doc = "`read()` method returns [`p2map0::R`](R) reader structure"]
impl crate::Readable for P2map0Spec {}
#[doc = "`write(|w| ..)` method takes [`p2map0::W`](W) writer structure"]
impl crate::Writable for P2map0Spec {
    type Safety = crate::Safe;
}
#[doc = "`reset()` method sets P2MAP0 to value 0"]
impl crate::Resettable for P2map0Spec {}