cc430f5137 0.1.0

Peripheral access API for CC430F5137 microcontroller
#[doc = "Register `PJOUT` reader"]
pub type R = crate::R<PjoutSpec>;
#[doc = "Register `PJOUT` writer"]
pub type W = crate::W<PjoutSpec>;
#[doc = "Field `PJOUT0` reader - PJOUT0"]
pub type Pjout0R = crate::BitReader;
#[doc = "Field `PJOUT0` writer - PJOUT0"]
pub type Pjout0W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PJOUT1` reader - PJOUT1"]
pub type Pjout1R = crate::BitReader;
#[doc = "Field `PJOUT1` writer - PJOUT1"]
pub type Pjout1W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PJOUT2` reader - PJOUT2"]
pub type Pjout2R = crate::BitReader;
#[doc = "Field `PJOUT2` writer - PJOUT2"]
pub type Pjout2W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PJOUT3` reader - PJOUT3"]
pub type Pjout3R = crate::BitReader;
#[doc = "Field `PJOUT3` writer - PJOUT3"]
pub type Pjout3W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "Bit 0 - PJOUT0"]
    #[inline(always)]
    pub fn pjout0(&self) -> Pjout0R {
        Pjout0R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - PJOUT1"]
    #[inline(always)]
    pub fn pjout1(&self) -> Pjout1R {
        Pjout1R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - PJOUT2"]
    #[inline(always)]
    pub fn pjout2(&self) -> Pjout2R {
        Pjout2R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - PJOUT3"]
    #[inline(always)]
    pub fn pjout3(&self) -> Pjout3R {
        Pjout3R::new(((self.bits >> 3) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - PJOUT0"]
    #[inline(always)]
    pub fn pjout0(&mut self) -> Pjout0W<'_, PjoutSpec> {
        Pjout0W::new(self, 0)
    }
    #[doc = "Bit 1 - PJOUT1"]
    #[inline(always)]
    pub fn pjout1(&mut self) -> Pjout1W<'_, PjoutSpec> {
        Pjout1W::new(self, 1)
    }
    #[doc = "Bit 2 - PJOUT2"]
    #[inline(always)]
    pub fn pjout2(&mut self) -> Pjout2W<'_, PjoutSpec> {
        Pjout2W::new(self, 2)
    }
    #[doc = "Bit 3 - PJOUT3"]
    #[inline(always)]
    pub fn pjout3(&mut self) -> Pjout3W<'_, PjoutSpec> {
        Pjout3W::new(self, 3)
    }
}
#[doc = "Port J Output\n\nYou can [`read`](crate::Reg::read) this register and get [`pjout::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pjout::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct PjoutSpec;
impl crate::RegisterSpec for PjoutSpec {
    type Ux = u16;
}
#[doc = "`read()` method returns [`pjout::R`](R) reader structure"]
impl crate::Readable for PjoutSpec {}
#[doc = "`write(|w| ..)` method takes [`pjout::W`](W) writer structure"]
impl crate::Writable for PjoutSpec {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets PJOUT to value 0"]
impl crate::Resettable for PjoutSpec {}