cc430f5137 0.1.0

Peripheral access API for CC430F5137 microcontroller
#[doc = "Register `P5DS` reader"]
pub type R = crate::R<P5dsSpec>;
#[doc = "Register `P5DS` writer"]
pub type W = crate::W<P5dsSpec>;
#[doc = "Field `P5DS0` reader - P5DS0"]
pub type P5ds0R = crate::BitReader;
#[doc = "Field `P5DS0` writer - P5DS0"]
pub type P5ds0W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P5DS1` reader - P5DS1"]
pub type P5ds1R = crate::BitReader;
#[doc = "Field `P5DS1` writer - P5DS1"]
pub type P5ds1W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P5DS2` reader - P5DS2"]
pub type P5ds2R = crate::BitReader;
#[doc = "Field `P5DS2` writer - P5DS2"]
pub type P5ds2W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P5DS3` reader - P5DS3"]
pub type P5ds3R = crate::BitReader;
#[doc = "Field `P5DS3` writer - P5DS3"]
pub type P5ds3W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P5DS4` reader - P5DS4"]
pub type P5ds4R = crate::BitReader;
#[doc = "Field `P5DS4` writer - P5DS4"]
pub type P5ds4W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P5DS5` reader - P5DS5"]
pub type P5ds5R = crate::BitReader;
#[doc = "Field `P5DS5` writer - P5DS5"]
pub type P5ds5W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P5DS6` reader - P5DS6"]
pub type P5ds6R = crate::BitReader;
#[doc = "Field `P5DS6` writer - P5DS6"]
pub type P5ds6W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P5DS7` reader - P5DS7"]
pub type P5ds7R = crate::BitReader;
#[doc = "Field `P5DS7` writer - P5DS7"]
pub type P5ds7W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "Bit 0 - P5DS0"]
    #[inline(always)]
    pub fn p5ds0(&self) -> P5ds0R {
        P5ds0R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - P5DS1"]
    #[inline(always)]
    pub fn p5ds1(&self) -> P5ds1R {
        P5ds1R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - P5DS2"]
    #[inline(always)]
    pub fn p5ds2(&self) -> P5ds2R {
        P5ds2R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - P5DS3"]
    #[inline(always)]
    pub fn p5ds3(&self) -> P5ds3R {
        P5ds3R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 4 - P5DS4"]
    #[inline(always)]
    pub fn p5ds4(&self) -> P5ds4R {
        P5ds4R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - P5DS5"]
    #[inline(always)]
    pub fn p5ds5(&self) -> P5ds5R {
        P5ds5R::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - P5DS6"]
    #[inline(always)]
    pub fn p5ds6(&self) -> P5ds6R {
        P5ds6R::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - P5DS7"]
    #[inline(always)]
    pub fn p5ds7(&self) -> P5ds7R {
        P5ds7R::new(((self.bits >> 7) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - P5DS0"]
    #[inline(always)]
    pub fn p5ds0(&mut self) -> P5ds0W<'_, P5dsSpec> {
        P5ds0W::new(self, 0)
    }
    #[doc = "Bit 1 - P5DS1"]
    #[inline(always)]
    pub fn p5ds1(&mut self) -> P5ds1W<'_, P5dsSpec> {
        P5ds1W::new(self, 1)
    }
    #[doc = "Bit 2 - P5DS2"]
    #[inline(always)]
    pub fn p5ds2(&mut self) -> P5ds2W<'_, P5dsSpec> {
        P5ds2W::new(self, 2)
    }
    #[doc = "Bit 3 - P5DS3"]
    #[inline(always)]
    pub fn p5ds3(&mut self) -> P5ds3W<'_, P5dsSpec> {
        P5ds3W::new(self, 3)
    }
    #[doc = "Bit 4 - P5DS4"]
    #[inline(always)]
    pub fn p5ds4(&mut self) -> P5ds4W<'_, P5dsSpec> {
        P5ds4W::new(self, 4)
    }
    #[doc = "Bit 5 - P5DS5"]
    #[inline(always)]
    pub fn p5ds5(&mut self) -> P5ds5W<'_, P5dsSpec> {
        P5ds5W::new(self, 5)
    }
    #[doc = "Bit 6 - P5DS6"]
    #[inline(always)]
    pub fn p5ds6(&mut self) -> P5ds6W<'_, P5dsSpec> {
        P5ds6W::new(self, 6)
    }
    #[doc = "Bit 7 - P5DS7"]
    #[inline(always)]
    pub fn p5ds7(&mut self) -> P5ds7W<'_, P5dsSpec> {
        P5ds7W::new(self, 7)
    }
}
#[doc = "Port 5 Drive Strenght\n\nYou can [`read`](crate::Reg::read) this register and get [`p5ds::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`p5ds::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct P5dsSpec;
impl crate::RegisterSpec for P5dsSpec {
    type Ux = u8;
}
#[doc = "`read()` method returns [`p5ds::R`](R) reader structure"]
impl crate::Readable for P5dsSpec {}
#[doc = "`write(|w| ..)` method takes [`p5ds::W`](W) writer structure"]
impl crate::Writable for P5dsSpec {
    type Safety = crate::Safe;
}
#[doc = "`reset()` method sets P5DS to value 0"]
impl crate::Resettable for P5dsSpec {}