cc430f5137 0.1.0

Peripheral access API for CC430F5137 microcontroller
#[doc = "Register `PJREN` reader"]
pub type R = crate::R<PjrenSpec>;
#[doc = "Register `PJREN` writer"]
pub type W = crate::W<PjrenSpec>;
#[doc = "Field `PJREN0` reader - PJREN0"]
pub type Pjren0R = crate::BitReader;
#[doc = "Field `PJREN0` writer - PJREN0"]
pub type Pjren0W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PJREN1` reader - PJREN1"]
pub type Pjren1R = crate::BitReader;
#[doc = "Field `PJREN1` writer - PJREN1"]
pub type Pjren1W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PJREN2` reader - PJREN2"]
pub type Pjren2R = crate::BitReader;
#[doc = "Field `PJREN2` writer - PJREN2"]
pub type Pjren2W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PJREN3` reader - PJREN3"]
pub type Pjren3R = crate::BitReader;
#[doc = "Field `PJREN3` writer - PJREN3"]
pub type Pjren3W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "Bit 0 - PJREN0"]
    #[inline(always)]
    pub fn pjren0(&self) -> Pjren0R {
        Pjren0R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - PJREN1"]
    #[inline(always)]
    pub fn pjren1(&self) -> Pjren1R {
        Pjren1R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - PJREN2"]
    #[inline(always)]
    pub fn pjren2(&self) -> Pjren2R {
        Pjren2R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - PJREN3"]
    #[inline(always)]
    pub fn pjren3(&self) -> Pjren3R {
        Pjren3R::new(((self.bits >> 3) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - PJREN0"]
    #[inline(always)]
    pub fn pjren0(&mut self) -> Pjren0W<'_, PjrenSpec> {
        Pjren0W::new(self, 0)
    }
    #[doc = "Bit 1 - PJREN1"]
    #[inline(always)]
    pub fn pjren1(&mut self) -> Pjren1W<'_, PjrenSpec> {
        Pjren1W::new(self, 1)
    }
    #[doc = "Bit 2 - PJREN2"]
    #[inline(always)]
    pub fn pjren2(&mut self) -> Pjren2W<'_, PjrenSpec> {
        Pjren2W::new(self, 2)
    }
    #[doc = "Bit 3 - PJREN3"]
    #[inline(always)]
    pub fn pjren3(&mut self) -> Pjren3W<'_, PjrenSpec> {
        Pjren3W::new(self, 3)
    }
}
#[doc = "Port J Resistor Enable\n\nYou can [`read`](crate::Reg::read) this register and get [`pjren::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pjren::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct PjrenSpec;
impl crate::RegisterSpec for PjrenSpec {
    type Ux = u16;
}
#[doc = "`read()` method returns [`pjren::R`](R) reader structure"]
impl crate::Readable for PjrenSpec {}
#[doc = "`write(|w| ..)` method takes [`pjren::W`](W) writer structure"]
impl crate::Writable for PjrenSpec {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets PJREN to value 0"]
impl crate::Resettable for PjrenSpec {}