#[doc = "Register `P2DS` reader"]
pub type R = crate::R<P2dsSpec>;
#[doc = "Register `P2DS` writer"]
pub type W = crate::W<P2dsSpec>;
#[doc = "Field `P2DS0` reader - P2DS0"]
pub type P2ds0R = crate::BitReader;
#[doc = "Field `P2DS0` writer - P2DS0"]
pub type P2ds0W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P2DS1` reader - P2DS1"]
pub type P2ds1R = crate::BitReader;
#[doc = "Field `P2DS1` writer - P2DS1"]
pub type P2ds1W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P2DS2` reader - P2DS2"]
pub type P2ds2R = crate::BitReader;
#[doc = "Field `P2DS2` writer - P2DS2"]
pub type P2ds2W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P2DS3` reader - P2DS3"]
pub type P2ds3R = crate::BitReader;
#[doc = "Field `P2DS3` writer - P2DS3"]
pub type P2ds3W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P2DS4` reader - P2DS4"]
pub type P2ds4R = crate::BitReader;
#[doc = "Field `P2DS4` writer - P2DS4"]
pub type P2ds4W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P2DS5` reader - P2DS5"]
pub type P2ds5R = crate::BitReader;
#[doc = "Field `P2DS5` writer - P2DS5"]
pub type P2ds5W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P2DS6` reader - P2DS6"]
pub type P2ds6R = crate::BitReader;
#[doc = "Field `P2DS6` writer - P2DS6"]
pub type P2ds6W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P2DS7` reader - P2DS7"]
pub type P2ds7R = crate::BitReader;
#[doc = "Field `P2DS7` writer - P2DS7"]
pub type P2ds7W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[doc = "Bit 0 - P2DS0"]
#[inline(always)]
pub fn p2ds0(&self) -> P2ds0R {
P2ds0R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - P2DS1"]
#[inline(always)]
pub fn p2ds1(&self) -> P2ds1R {
P2ds1R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - P2DS2"]
#[inline(always)]
pub fn p2ds2(&self) -> P2ds2R {
P2ds2R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - P2DS3"]
#[inline(always)]
pub fn p2ds3(&self) -> P2ds3R {
P2ds3R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - P2DS4"]
#[inline(always)]
pub fn p2ds4(&self) -> P2ds4R {
P2ds4R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - P2DS5"]
#[inline(always)]
pub fn p2ds5(&self) -> P2ds5R {
P2ds5R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - P2DS6"]
#[inline(always)]
pub fn p2ds6(&self) -> P2ds6R {
P2ds6R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - P2DS7"]
#[inline(always)]
pub fn p2ds7(&self) -> P2ds7R {
P2ds7R::new(((self.bits >> 7) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - P2DS0"]
#[inline(always)]
pub fn p2ds0(&mut self) -> P2ds0W<'_, P2dsSpec> {
P2ds0W::new(self, 0)
}
#[doc = "Bit 1 - P2DS1"]
#[inline(always)]
pub fn p2ds1(&mut self) -> P2ds1W<'_, P2dsSpec> {
P2ds1W::new(self, 1)
}
#[doc = "Bit 2 - P2DS2"]
#[inline(always)]
pub fn p2ds2(&mut self) -> P2ds2W<'_, P2dsSpec> {
P2ds2W::new(self, 2)
}
#[doc = "Bit 3 - P2DS3"]
#[inline(always)]
pub fn p2ds3(&mut self) -> P2ds3W<'_, P2dsSpec> {
P2ds3W::new(self, 3)
}
#[doc = "Bit 4 - P2DS4"]
#[inline(always)]
pub fn p2ds4(&mut self) -> P2ds4W<'_, P2dsSpec> {
P2ds4W::new(self, 4)
}
#[doc = "Bit 5 - P2DS5"]
#[inline(always)]
pub fn p2ds5(&mut self) -> P2ds5W<'_, P2dsSpec> {
P2ds5W::new(self, 5)
}
#[doc = "Bit 6 - P2DS6"]
#[inline(always)]
pub fn p2ds6(&mut self) -> P2ds6W<'_, P2dsSpec> {
P2ds6W::new(self, 6)
}
#[doc = "Bit 7 - P2DS7"]
#[inline(always)]
pub fn p2ds7(&mut self) -> P2ds7W<'_, P2dsSpec> {
P2ds7W::new(self, 7)
}
}
#[doc = "Port 2 Drive Strenght\n\nYou can [`read`](crate::Reg::read) this register and get [`p2ds::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`p2ds::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct P2dsSpec;
impl crate::RegisterSpec for P2dsSpec {
type Ux = u8;
}
#[doc = "`read()` method returns [`p2ds::R`](R) reader structure"]
impl crate::Readable for P2dsSpec {}
#[doc = "`write(|w| ..)` method takes [`p2ds::W`](W) writer structure"]
impl crate::Writable for P2dsSpec {
type Safety = crate::Safe;
}
#[doc = "`reset()` method sets P2DS to value 0"]
impl crate::Resettable for P2dsSpec {}