#[doc = "Register `AFSEL0` reader"]
pub struct R(crate::R<AFSEL0_SPEC>);
impl core::ops::Deref for R {
type Target = crate::R<AFSEL0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl From<crate::R<AFSEL0_SPEC>> for R {
#[inline(always)]
fn from(reader: crate::R<AFSEL0_SPEC>) -> Self {
R(reader)
}
}
#[doc = "Register `AFSEL0` writer"]
pub struct W(crate::W<AFSEL0_SPEC>);
impl core::ops::Deref for W {
type Target = crate::W<AFSEL0_SPEC>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
impl core::ops::DerefMut for W {
#[inline(always)]
fn deref_mut(&mut self) -> &mut Self::Target {
&mut self.0
}
}
impl From<crate::W<AFSEL0_SPEC>> for W {
#[inline(always)]
fn from(writer: crate::W<AFSEL0_SPEC>) -> Self {
W(writer)
}
}
#[doc = "Pin 7 alternate function selected"]
pub type SEL7_A = SEL0_A;
#[doc = "Field `SEL7` reader - Pin 7 alternate function selected"]
pub type SEL7_R = SEL0_R;
#[doc = "Field `SEL7` writer - Pin 7 alternate function selected"]
pub struct SEL7_W<'a> {
w: &'a mut W,
}
impl<'a> SEL7_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SEL7_A) -> &'a mut W {
unsafe { self.bits(variant.into()) }
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(SEL7_A::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(SEL7_A::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(SEL7_A::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(SEL7_A::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(SEL7_A::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(SEL7_A::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(SEL7_A::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(SEL7_A::AF7)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(SEL7_A::AF9)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(SEL7_A::AF11)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 28)) | ((value as u32 & 0x0f) << 28);
self.w
}
}
#[doc = "Pin 6 alternate function selected"]
pub type SEL6_A = SEL0_A;
#[doc = "Field `SEL6` reader - Pin 6 alternate function selected"]
pub type SEL6_R = SEL0_R;
#[doc = "Field `SEL6` writer - Pin 6 alternate function selected"]
pub struct SEL6_W<'a> {
w: &'a mut W,
}
impl<'a> SEL6_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SEL6_A) -> &'a mut W {
unsafe { self.bits(variant.into()) }
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(SEL6_A::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(SEL6_A::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(SEL6_A::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(SEL6_A::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(SEL6_A::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(SEL6_A::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(SEL6_A::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(SEL6_A::AF7)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(SEL6_A::AF9)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(SEL6_A::AF11)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 24)) | ((value as u32 & 0x0f) << 24);
self.w
}
}
#[doc = "Pin 5 alternate function selected"]
pub type SEL5_A = SEL0_A;
#[doc = "Field `SEL5` reader - Pin 5 alternate function selected"]
pub type SEL5_R = SEL0_R;
#[doc = "Field `SEL5` writer - Pin 5 alternate function selected"]
pub struct SEL5_W<'a> {
w: &'a mut W,
}
impl<'a> SEL5_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SEL5_A) -> &'a mut W {
unsafe { self.bits(variant.into()) }
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(SEL5_A::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(SEL5_A::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(SEL5_A::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(SEL5_A::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(SEL5_A::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(SEL5_A::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(SEL5_A::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(SEL5_A::AF7)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(SEL5_A::AF9)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(SEL5_A::AF11)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 20)) | ((value as u32 & 0x0f) << 20);
self.w
}
}
#[doc = "Pin 4 alternate function selected"]
pub type SEL4_A = SEL0_A;
#[doc = "Field `SEL4` reader - Pin 4 alternate function selected"]
pub type SEL4_R = SEL0_R;
#[doc = "Field `SEL4` writer - Pin 4 alternate function selected"]
pub struct SEL4_W<'a> {
w: &'a mut W,
}
impl<'a> SEL4_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SEL4_A) -> &'a mut W {
unsafe { self.bits(variant.into()) }
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(SEL4_A::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(SEL4_A::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(SEL4_A::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(SEL4_A::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(SEL4_A::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(SEL4_A::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(SEL4_A::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(SEL4_A::AF7)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(SEL4_A::AF9)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(SEL4_A::AF11)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 16)) | ((value as u32 & 0x0f) << 16);
self.w
}
}
#[doc = "Pin 3 alternate function selected"]
pub type SEL3_A = SEL0_A;
#[doc = "Field `SEL3` reader - Pin 3 alternate function selected"]
pub type SEL3_R = SEL0_R;
#[doc = "Field `SEL3` writer - Pin 3 alternate function selected"]
pub struct SEL3_W<'a> {
w: &'a mut W,
}
impl<'a> SEL3_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SEL3_A) -> &'a mut W {
unsafe { self.bits(variant.into()) }
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(SEL3_A::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(SEL3_A::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(SEL3_A::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(SEL3_A::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(SEL3_A::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(SEL3_A::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(SEL3_A::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(SEL3_A::AF7)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(SEL3_A::AF9)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(SEL3_A::AF11)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 12)) | ((value as u32 & 0x0f) << 12);
self.w
}
}
#[doc = "Pin 2 alternate function selected"]
pub type SEL2_A = SEL0_A;
#[doc = "Field `SEL2` reader - Pin 2 alternate function selected"]
pub type SEL2_R = SEL0_R;
#[doc = "Field `SEL2` writer - Pin 2 alternate function selected"]
pub struct SEL2_W<'a> {
w: &'a mut W,
}
impl<'a> SEL2_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SEL2_A) -> &'a mut W {
unsafe { self.bits(variant.into()) }
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(SEL2_A::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(SEL2_A::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(SEL2_A::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(SEL2_A::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(SEL2_A::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(SEL2_A::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(SEL2_A::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(SEL2_A::AF7)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(SEL2_A::AF9)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(SEL2_A::AF11)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 8)) | ((value as u32 & 0x0f) << 8);
self.w
}
}
#[doc = "Pin 1 alternate function selected"]
pub type SEL1_A = SEL0_A;
#[doc = "Field `SEL1` reader - Pin 1 alternate function selected"]
pub type SEL1_R = SEL0_R;
#[doc = "Field `SEL1` writer - Pin 1 alternate function selected"]
pub struct SEL1_W<'a> {
w: &'a mut W,
}
impl<'a> SEL1_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SEL1_A) -> &'a mut W {
unsafe { self.bits(variant.into()) }
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(SEL1_A::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(SEL1_A::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(SEL1_A::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(SEL1_A::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(SEL1_A::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(SEL1_A::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(SEL1_A::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(SEL1_A::AF7)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(SEL1_A::AF9)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(SEL1_A::AF11)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !(0x0f << 4)) | ((value as u32 & 0x0f) << 4);
self.w
}
}
#[doc = "Pin 0 alternate function selected\n\nValue on reset: 0"]
#[derive(Clone, Copy, Debug, PartialEq)]
#[repr(u8)]
pub enum SEL0_A {
#[doc = "0: AF0"]
AF0 = 0,
#[doc = "1: AF1"]
AF1 = 1,
#[doc = "2: AF2"]
AF2 = 2,
#[doc = "3: AF3"]
AF3 = 3,
#[doc = "4: AF4"]
AF4 = 4,
#[doc = "5: AF5"]
AF5 = 5,
#[doc = "6: AF6"]
AF6 = 6,
#[doc = "7: AF7"]
AF7 = 7,
#[doc = "9: AF9"]
AF9 = 9,
#[doc = "11: AF11"]
AF11 = 11,
}
impl From<SEL0_A> for u8 {
#[inline(always)]
fn from(variant: SEL0_A) -> Self {
variant as _
}
}
#[doc = "Field `SEL0` reader - Pin 0 alternate function selected"]
pub struct SEL0_R(crate::FieldReader<u8, SEL0_A>);
impl SEL0_R {
pub(crate) fn new(bits: u8) -> Self {
SEL0_R(crate::FieldReader::new(bits))
}
#[doc = r"Get enumerated values variant"]
#[inline(always)]
pub fn variant(&self) -> Option<SEL0_A> {
match self.bits {
0 => Some(SEL0_A::AF0),
1 => Some(SEL0_A::AF1),
2 => Some(SEL0_A::AF2),
3 => Some(SEL0_A::AF3),
4 => Some(SEL0_A::AF4),
5 => Some(SEL0_A::AF5),
6 => Some(SEL0_A::AF6),
7 => Some(SEL0_A::AF7),
9 => Some(SEL0_A::AF9),
11 => Some(SEL0_A::AF11),
_ => None,
}
}
#[doc = "Checks if the value of the field is `AF0`"]
#[inline(always)]
pub fn is_af0(&self) -> bool {
**self == SEL0_A::AF0
}
#[doc = "Checks if the value of the field is `AF1`"]
#[inline(always)]
pub fn is_af1(&self) -> bool {
**self == SEL0_A::AF1
}
#[doc = "Checks if the value of the field is `AF2`"]
#[inline(always)]
pub fn is_af2(&self) -> bool {
**self == SEL0_A::AF2
}
#[doc = "Checks if the value of the field is `AF3`"]
#[inline(always)]
pub fn is_af3(&self) -> bool {
**self == SEL0_A::AF3
}
#[doc = "Checks if the value of the field is `AF4`"]
#[inline(always)]
pub fn is_af4(&self) -> bool {
**self == SEL0_A::AF4
}
#[doc = "Checks if the value of the field is `AF5`"]
#[inline(always)]
pub fn is_af5(&self) -> bool {
**self == SEL0_A::AF5
}
#[doc = "Checks if the value of the field is `AF6`"]
#[inline(always)]
pub fn is_af6(&self) -> bool {
**self == SEL0_A::AF6
}
#[doc = "Checks if the value of the field is `AF7`"]
#[inline(always)]
pub fn is_af7(&self) -> bool {
**self == SEL0_A::AF7
}
#[doc = "Checks if the value of the field is `AF9`"]
#[inline(always)]
pub fn is_af9(&self) -> bool {
**self == SEL0_A::AF9
}
#[doc = "Checks if the value of the field is `AF11`"]
#[inline(always)]
pub fn is_af11(&self) -> bool {
**self == SEL0_A::AF11
}
}
impl core::ops::Deref for SEL0_R {
type Target = crate::FieldReader<u8, SEL0_A>;
#[inline(always)]
fn deref(&self) -> &Self::Target {
&self.0
}
}
#[doc = "Field `SEL0` writer - Pin 0 alternate function selected"]
pub struct SEL0_W<'a> {
w: &'a mut W,
}
impl<'a> SEL0_W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: SEL0_A) -> &'a mut W {
unsafe { self.bits(variant.into()) }
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(SEL0_A::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(SEL0_A::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(SEL0_A::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(SEL0_A::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(SEL0_A::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(SEL0_A::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(SEL0_A::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(SEL0_A::AF7)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(SEL0_A::AF9)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(SEL0_A::AF11)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
self.w.bits = (self.w.bits & !0x0f) | (value as u32 & 0x0f);
self.w
}
}
impl R {
#[doc = "Bits 28:31 - Pin 7 alternate function selected"]
#[inline(always)]
pub fn sel7(&self) -> SEL7_R {
SEL7_R::new(((self.bits >> 28) & 0x0f) as u8)
}
#[doc = "Bits 24:27 - Pin 6 alternate function selected"]
#[inline(always)]
pub fn sel6(&self) -> SEL6_R {
SEL6_R::new(((self.bits >> 24) & 0x0f) as u8)
}
#[doc = "Bits 20:23 - Pin 5 alternate function selected"]
#[inline(always)]
pub fn sel5(&self) -> SEL5_R {
SEL5_R::new(((self.bits >> 20) & 0x0f) as u8)
}
#[doc = "Bits 16:19 - Pin 4 alternate function selected"]
#[inline(always)]
pub fn sel4(&self) -> SEL4_R {
SEL4_R::new(((self.bits >> 16) & 0x0f) as u8)
}
#[doc = "Bits 12:15 - Pin 3 alternate function selected"]
#[inline(always)]
pub fn sel3(&self) -> SEL3_R {
SEL3_R::new(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 8:11 - Pin 2 alternate function selected"]
#[inline(always)]
pub fn sel2(&self) -> SEL2_R {
SEL2_R::new(((self.bits >> 8) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Pin 1 alternate function selected"]
#[inline(always)]
pub fn sel1(&self) -> SEL1_R {
SEL1_R::new(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Pin 0 alternate function selected"]
#[inline(always)]
pub fn sel0(&self) -> SEL0_R {
SEL0_R::new((self.bits & 0x0f) as u8)
}
}
impl W {
#[doc = "Bits 28:31 - Pin 7 alternate function selected"]
#[inline(always)]
pub fn sel7(&mut self) -> SEL7_W {
SEL7_W { w: self }
}
#[doc = "Bits 24:27 - Pin 6 alternate function selected"]
#[inline(always)]
pub fn sel6(&mut self) -> SEL6_W {
SEL6_W { w: self }
}
#[doc = "Bits 20:23 - Pin 5 alternate function selected"]
#[inline(always)]
pub fn sel5(&mut self) -> SEL5_W {
SEL5_W { w: self }
}
#[doc = "Bits 16:19 - Pin 4 alternate function selected"]
#[inline(always)]
pub fn sel4(&mut self) -> SEL4_W {
SEL4_W { w: self }
}
#[doc = "Bits 12:15 - Pin 3 alternate function selected"]
#[inline(always)]
pub fn sel3(&mut self) -> SEL3_W {
SEL3_W { w: self }
}
#[doc = "Bits 8:11 - Pin 2 alternate function selected"]
#[inline(always)]
pub fn sel2(&mut self) -> SEL2_W {
SEL2_W { w: self }
}
#[doc = "Bits 4:7 - Pin 1 alternate function selected"]
#[inline(always)]
pub fn sel1(&mut self) -> SEL1_W {
SEL1_W { w: self }
}
#[doc = "Bits 0:3 - Pin 0 alternate function selected"]
#[inline(always)]
pub fn sel0(&mut self) -> SEL0_W {
SEL0_W { w: self }
}
#[doc = "Writes raw bits to the register."]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.0.bits(bits);
self
}
}
#[doc = "GPIO alternate function low register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [afsel0](index.html) module"]
pub struct AFSEL0_SPEC;
impl crate::RegisterSpec for AFSEL0_SPEC {
type Ux = u32;
}
#[doc = "`read()` method returns [afsel0::R](R) reader structure"]
impl crate::Readable for AFSEL0_SPEC {
type Reader = R;
}
#[doc = "`write(|w| ..)` method takes [afsel0::W](W) writer structure"]
impl crate::Writable for AFSEL0_SPEC {
type Writer = W;
}
#[doc = "`reset()` method sets AFSEL0 to value 0"]
impl crate::Resettable for AFSEL0_SPEC {
#[inline(always)]
fn reset_value() -> Self::Ux {
0
}
}