cc430f5137 0.1.0

Peripheral access API for CC430F5137 microcontroller
#[doc = "Register `PJIN` reader"]
pub type R = crate::R<PjinSpec>;
#[doc = "Register `PJIN` writer"]
pub type W = crate::W<PjinSpec>;
#[doc = "Field `PJIN0` reader - PJIN0"]
pub type Pjin0R = crate::BitReader;
#[doc = "Field `PJIN0` writer - PJIN0"]
pub type Pjin0W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PJIN1` reader - PJIN1"]
pub type Pjin1R = crate::BitReader;
#[doc = "Field `PJIN1` writer - PJIN1"]
pub type Pjin1W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PJIN2` reader - PJIN2"]
pub type Pjin2R = crate::BitReader;
#[doc = "Field `PJIN2` writer - PJIN2"]
pub type Pjin2W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `PJIN3` reader - PJIN3"]
pub type Pjin3R = crate::BitReader;
#[doc = "Field `PJIN3` writer - PJIN3"]
pub type Pjin3W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "Bit 0 - PJIN0"]
    #[inline(always)]
    pub fn pjin0(&self) -> Pjin0R {
        Pjin0R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - PJIN1"]
    #[inline(always)]
    pub fn pjin1(&self) -> Pjin1R {
        Pjin1R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - PJIN2"]
    #[inline(always)]
    pub fn pjin2(&self) -> Pjin2R {
        Pjin2R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - PJIN3"]
    #[inline(always)]
    pub fn pjin3(&self) -> Pjin3R {
        Pjin3R::new(((self.bits >> 3) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - PJIN0"]
    #[inline(always)]
    pub fn pjin0(&mut self) -> Pjin0W<'_, PjinSpec> {
        Pjin0W::new(self, 0)
    }
    #[doc = "Bit 1 - PJIN1"]
    #[inline(always)]
    pub fn pjin1(&mut self) -> Pjin1W<'_, PjinSpec> {
        Pjin1W::new(self, 1)
    }
    #[doc = "Bit 2 - PJIN2"]
    #[inline(always)]
    pub fn pjin2(&mut self) -> Pjin2W<'_, PjinSpec> {
        Pjin2W::new(self, 2)
    }
    #[doc = "Bit 3 - PJIN3"]
    #[inline(always)]
    pub fn pjin3(&mut self) -> Pjin3W<'_, PjinSpec> {
        Pjin3W::new(self, 3)
    }
}
#[doc = "Port J Input\n\nYou can [`read`](crate::Reg::read) this register and get [`pjin::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pjin::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct PjinSpec;
impl crate::RegisterSpec for PjinSpec {
    type Ux = u16;
}
#[doc = "`read()` method returns [`pjin::R`](R) reader structure"]
impl crate::Readable for PjinSpec {}
#[doc = "`write(|w| ..)` method takes [`pjin::W`](W) writer structure"]
impl crate::Writable for PjinSpec {
    type Safety = crate::Unsafe;
}
#[doc = "`reset()` method sets PJIN to value 0"]
impl crate::Resettable for PjinSpec {}