cc430f5137 0.1.0

Peripheral access API for CC430F5137 microcontroller
#[doc = "Register `P3DS` reader"]
pub type R = crate::R<P3dsSpec>;
#[doc = "Register `P3DS` writer"]
pub type W = crate::W<P3dsSpec>;
#[doc = "Field `P3DS0` reader - P3DS0"]
pub type P3ds0R = crate::BitReader;
#[doc = "Field `P3DS0` writer - P3DS0"]
pub type P3ds0W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P3DS1` reader - P3DS1"]
pub type P3ds1R = crate::BitReader;
#[doc = "Field `P3DS1` writer - P3DS1"]
pub type P3ds1W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P3DS2` reader - P3DS2"]
pub type P3ds2R = crate::BitReader;
#[doc = "Field `P3DS2` writer - P3DS2"]
pub type P3ds2W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P3DS3` reader - P3DS3"]
pub type P3ds3R = crate::BitReader;
#[doc = "Field `P3DS3` writer - P3DS3"]
pub type P3ds3W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P3DS4` reader - P3DS4"]
pub type P3ds4R = crate::BitReader;
#[doc = "Field `P3DS4` writer - P3DS4"]
pub type P3ds4W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P3DS5` reader - P3DS5"]
pub type P3ds5R = crate::BitReader;
#[doc = "Field `P3DS5` writer - P3DS5"]
pub type P3ds5W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P3DS6` reader - P3DS6"]
pub type P3ds6R = crate::BitReader;
#[doc = "Field `P3DS6` writer - P3DS6"]
pub type P3ds6W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P3DS7` reader - P3DS7"]
pub type P3ds7R = crate::BitReader;
#[doc = "Field `P3DS7` writer - P3DS7"]
pub type P3ds7W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
    #[doc = "Bit 0 - P3DS0"]
    #[inline(always)]
    pub fn p3ds0(&self) -> P3ds0R {
        P3ds0R::new((self.bits & 1) != 0)
    }
    #[doc = "Bit 1 - P3DS1"]
    #[inline(always)]
    pub fn p3ds1(&self) -> P3ds1R {
        P3ds1R::new(((self.bits >> 1) & 1) != 0)
    }
    #[doc = "Bit 2 - P3DS2"]
    #[inline(always)]
    pub fn p3ds2(&self) -> P3ds2R {
        P3ds2R::new(((self.bits >> 2) & 1) != 0)
    }
    #[doc = "Bit 3 - P3DS3"]
    #[inline(always)]
    pub fn p3ds3(&self) -> P3ds3R {
        P3ds3R::new(((self.bits >> 3) & 1) != 0)
    }
    #[doc = "Bit 4 - P3DS4"]
    #[inline(always)]
    pub fn p3ds4(&self) -> P3ds4R {
        P3ds4R::new(((self.bits >> 4) & 1) != 0)
    }
    #[doc = "Bit 5 - P3DS5"]
    #[inline(always)]
    pub fn p3ds5(&self) -> P3ds5R {
        P3ds5R::new(((self.bits >> 5) & 1) != 0)
    }
    #[doc = "Bit 6 - P3DS6"]
    #[inline(always)]
    pub fn p3ds6(&self) -> P3ds6R {
        P3ds6R::new(((self.bits >> 6) & 1) != 0)
    }
    #[doc = "Bit 7 - P3DS7"]
    #[inline(always)]
    pub fn p3ds7(&self) -> P3ds7R {
        P3ds7R::new(((self.bits >> 7) & 1) != 0)
    }
}
impl W {
    #[doc = "Bit 0 - P3DS0"]
    #[inline(always)]
    pub fn p3ds0(&mut self) -> P3ds0W<'_, P3dsSpec> {
        P3ds0W::new(self, 0)
    }
    #[doc = "Bit 1 - P3DS1"]
    #[inline(always)]
    pub fn p3ds1(&mut self) -> P3ds1W<'_, P3dsSpec> {
        P3ds1W::new(self, 1)
    }
    #[doc = "Bit 2 - P3DS2"]
    #[inline(always)]
    pub fn p3ds2(&mut self) -> P3ds2W<'_, P3dsSpec> {
        P3ds2W::new(self, 2)
    }
    #[doc = "Bit 3 - P3DS3"]
    #[inline(always)]
    pub fn p3ds3(&mut self) -> P3ds3W<'_, P3dsSpec> {
        P3ds3W::new(self, 3)
    }
    #[doc = "Bit 4 - P3DS4"]
    #[inline(always)]
    pub fn p3ds4(&mut self) -> P3ds4W<'_, P3dsSpec> {
        P3ds4W::new(self, 4)
    }
    #[doc = "Bit 5 - P3DS5"]
    #[inline(always)]
    pub fn p3ds5(&mut self) -> P3ds5W<'_, P3dsSpec> {
        P3ds5W::new(self, 5)
    }
    #[doc = "Bit 6 - P3DS6"]
    #[inline(always)]
    pub fn p3ds6(&mut self) -> P3ds6W<'_, P3dsSpec> {
        P3ds6W::new(self, 6)
    }
    #[doc = "Bit 7 - P3DS7"]
    #[inline(always)]
    pub fn p3ds7(&mut self) -> P3ds7W<'_, P3dsSpec> {
        P3ds7W::new(self, 7)
    }
}
#[doc = "Port 3 Drive Strenght\n\nYou can [`read`](crate::Reg::read) this register and get [`p3ds::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`p3ds::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct P3dsSpec;
impl crate::RegisterSpec for P3dsSpec {
    type Ux = u8;
}
#[doc = "`read()` method returns [`p3ds::R`](R) reader structure"]
impl crate::Readable for P3dsSpec {}
#[doc = "`write(|w| ..)` method takes [`p3ds::W`](W) writer structure"]
impl crate::Writable for P3dsSpec {
    type Safety = crate::Safe;
}
#[doc = "`reset()` method sets P3DS to value 0"]
impl crate::Resettable for P3dsSpec {}