cc430f5137 0.1.0

Peripheral access API for CC430F5137 microcontroller
#[doc = "Register `PJDS` reader"]
pub type R = crate::R<PjdsSpec>;
#[doc = "Register `PJDS` writer"]
pub type W = crate::W<PjdsSpec>;
#[doc = "Field `PJDS0` reader - PJDS0"]
pub type Pjds0R = crate::BitReader;
#[doc = "Field `PJDS0` writer - PJDS0"]
pub type Pjds0W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PJDS1` reader - PJDS1"]
pub type Pjds1R = crate::BitReader;
#[doc = "Field `PJDS1` writer - PJDS1"]
pub type Pjds1W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PJDS2` reader - PJDS2"]
pub type Pjds2R = crate::BitReader;
#[doc = "Field `PJDS2` writer - PJDS2"]
pub type Pjds2W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PJDS3` reader - PJDS3"]
pub type Pjds3R = crate::BitReader;
#[doc = "Field `PJDS3` writer - PJDS3"]
pub type Pjds3W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "Bit 0 - PJDS0"]
    #[inline(always)]
    pub fn pjds0(&self) -> Pjds0R {
        Pjds0R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - PJDS1"]
    #[inline(always)]
    pub fn pjds1(&self) -> Pjds1R {
        Pjds1R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - PJDS2"]
    #[inline(always)]
    pub fn pjds2(&self) -> Pjds2R {
        Pjds2R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - PJDS3"]
    #[inline(always)]
    pub fn pjds3(&self) -> Pjds3R {
        Pjds3R::new(((self.bits >> 3) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - PJDS0"]
    #[inline(always)]
    pub fn pjds0(&mut self) -> Pjds0W<'_, PjdsSpec> {
        Pjds0W::new(self, 0)
    }
    #[doc = "Bit 1 - PJDS1"]
    #[inline(always)]
    pub fn pjds1(&mut self) -> Pjds1W<'_, PjdsSpec> {
        Pjds1W::new(self, 1)
    }
    #[doc = "Bit 2 - PJDS2"]
    #[inline(always)]
    pub fn pjds2(&mut self) -> Pjds2W<'_, PjdsSpec> {
        Pjds2W::new(self, 2)
    }
    #[doc = "Bit 3 - PJDS3"]
    #[inline(always)]
    pub fn pjds3(&mut self) -> Pjds3W<'_, PjdsSpec> {
        Pjds3W::new(self, 3)
    }
}
#[doc = "Port J Drive Strenght\n\nYou can [`read`](crate::Reg::read) this register and get [`pjds::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pjds::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct PjdsSpec;
impl crate::RegisterSpec for PjdsSpec {
    type Ux = u16;
}
#[doc = "`read()` method returns [`pjds::R`](R) reader structure"]
impl crate::Readable for PjdsSpec {}
#[doc = "`write(|w| ..)` method takes [`pjds::W`](W) writer structure"]
impl crate::Writable for PjdsSpec {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets PJDS to value 0"]
impl crate::Resettable for PjdsSpec {}