#[doc = "Register `P2SEL` reader"]
pub type R = crate::R<P2selSpec>;
#[doc = "Register `P2SEL` writer"]
pub type W = crate::W<P2selSpec>;
#[doc = "Field `P2SEL0` reader - P2SEL0"]
pub type P2sel0R = crate::BitReader;
#[doc = "Field `P2SEL0` writer - P2SEL0"]
pub type P2sel0W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P2SEL1` reader - P2SEL1"]
pub type P2sel1R = crate::BitReader;
#[doc = "Field `P2SEL1` writer - P2SEL1"]
pub type P2sel1W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P2SEL2` reader - P2SEL2"]
pub type P2sel2R = crate::BitReader;
#[doc = "Field `P2SEL2` writer - P2SEL2"]
pub type P2sel2W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P2SEL3` reader - P2SEL3"]
pub type P2sel3R = crate::BitReader;
#[doc = "Field `P2SEL3` writer - P2SEL3"]
pub type P2sel3W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P2SEL4` reader - P2SEL4"]
pub type P2sel4R = crate::BitReader;
#[doc = "Field `P2SEL4` writer - P2SEL4"]
pub type P2sel4W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P2SEL5` reader - P2SEL5"]
pub type P2sel5R = crate::BitReader;
#[doc = "Field `P2SEL5` writer - P2SEL5"]
pub type P2sel5W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P2SEL6` reader - P2SEL6"]
pub type P2sel6R = crate::BitReader;
#[doc = "Field `P2SEL6` writer - P2SEL6"]
pub type P2sel6W<'a, REG> = crate::BitWriter<'a, REG>;
#[doc = "Field `P2SEL7` reader - P2SEL7"]
pub type P2sel7R = crate::BitReader;
#[doc = "Field `P2SEL7` writer - P2SEL7"]
pub type P2sel7W<'a, REG> = crate::BitWriter<'a, REG>;
impl R {
#[doc = "Bit 0 - P2SEL0"]
#[inline(always)]
pub fn p2sel0(&self) -> P2sel0R {
P2sel0R::new((self.bits & 1) != 0)
}
#[doc = "Bit 1 - P2SEL1"]
#[inline(always)]
pub fn p2sel1(&self) -> P2sel1R {
P2sel1R::new(((self.bits >> 1) & 1) != 0)
}
#[doc = "Bit 2 - P2SEL2"]
#[inline(always)]
pub fn p2sel2(&self) -> P2sel2R {
P2sel2R::new(((self.bits >> 2) & 1) != 0)
}
#[doc = "Bit 3 - P2SEL3"]
#[inline(always)]
pub fn p2sel3(&self) -> P2sel3R {
P2sel3R::new(((self.bits >> 3) & 1) != 0)
}
#[doc = "Bit 4 - P2SEL4"]
#[inline(always)]
pub fn p2sel4(&self) -> P2sel4R {
P2sel4R::new(((self.bits >> 4) & 1) != 0)
}
#[doc = "Bit 5 - P2SEL5"]
#[inline(always)]
pub fn p2sel5(&self) -> P2sel5R {
P2sel5R::new(((self.bits >> 5) & 1) != 0)
}
#[doc = "Bit 6 - P2SEL6"]
#[inline(always)]
pub fn p2sel6(&self) -> P2sel6R {
P2sel6R::new(((self.bits >> 6) & 1) != 0)
}
#[doc = "Bit 7 - P2SEL7"]
#[inline(always)]
pub fn p2sel7(&self) -> P2sel7R {
P2sel7R::new(((self.bits >> 7) & 1) != 0)
}
}
impl W {
#[doc = "Bit 0 - P2SEL0"]
#[inline(always)]
pub fn p2sel0(&mut self) -> P2sel0W<'_, P2selSpec> {
P2sel0W::new(self, 0)
}
#[doc = "Bit 1 - P2SEL1"]
#[inline(always)]
pub fn p2sel1(&mut self) -> P2sel1W<'_, P2selSpec> {
P2sel1W::new(self, 1)
}
#[doc = "Bit 2 - P2SEL2"]
#[inline(always)]
pub fn p2sel2(&mut self) -> P2sel2W<'_, P2selSpec> {
P2sel2W::new(self, 2)
}
#[doc = "Bit 3 - P2SEL3"]
#[inline(always)]
pub fn p2sel3(&mut self) -> P2sel3W<'_, P2selSpec> {
P2sel3W::new(self, 3)
}
#[doc = "Bit 4 - P2SEL4"]
#[inline(always)]
pub fn p2sel4(&mut self) -> P2sel4W<'_, P2selSpec> {
P2sel4W::new(self, 4)
}
#[doc = "Bit 5 - P2SEL5"]
#[inline(always)]
pub fn p2sel5(&mut self) -> P2sel5W<'_, P2selSpec> {
P2sel5W::new(self, 5)
}
#[doc = "Bit 6 - P2SEL6"]
#[inline(always)]
pub fn p2sel6(&mut self) -> P2sel6W<'_, P2selSpec> {
P2sel6W::new(self, 6)
}
#[doc = "Bit 7 - P2SEL7"]
#[inline(always)]
pub fn p2sel7(&mut self) -> P2sel7W<'_, P2selSpec> {
P2sel7W::new(self, 7)
}
}
#[doc = "Port 2 Selection\n\nYou can [`read`](crate::Reg::read) this register and get [`p2sel::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`p2sel::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
pub struct P2selSpec;
impl crate::RegisterSpec for P2selSpec {
type Ux = u8;
}
#[doc = "`read()` method returns [`p2sel::R`](R) reader structure"]
impl crate::Readable for P2selSpec {}
#[doc = "`write(|w| ..)` method takes [`p2sel::W`](W) writer structure"]
impl crate::Writable for P2selSpec {
type Safety = crate::Safe;
}
#[doc = "`reset()` method sets P2SEL to value 0"]
impl crate::Resettable for P2selSpec {}