#[doc = r"Value read from the register"]
pub struct R {
bits: u32,
}
#[doc = r"Value to write to the register"]
pub struct W {
bits: u32,
}
impl super::AFRH {
#[doc = r"Modifies the contents of the register"]
#[inline(always)]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
self.register.set(f(&R { bits }, &mut W { bits }).bits);
}
#[doc = r"Reads the contents of the register"]
#[inline(always)]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
#[doc = r"Writes to the register"]
#[inline(always)]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
self.register.set(
f(&mut W {
bits: Self::reset_value(),
})
.bits,
);
}
#[doc = r"Reset value of the register"]
#[inline(always)]
pub const fn reset_value() -> u32 {
0
}
#[doc = r"Writes the reset value to the register"]
#[inline(always)]
pub fn reset(&self) {
self.register.set(Self::reset_value())
}
}
#[doc = "Possible values of the field `AFSEL15`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AFSEL15R {
#[doc = "AF0"]
AF0,
#[doc = "AF1"]
AF1,
#[doc = "AF2"]
AF2,
#[doc = "AF3"]
AF3,
#[doc = "AF4"]
AF4,
#[doc = "AF5"]
AF5,
#[doc = "AF6"]
AF6,
#[doc = "AF7"]
AF7,
#[doc = "AF8"]
AF8,
#[doc = "AF9"]
AF9,
#[doc = "AF10"]
AF10,
#[doc = "AF11"]
AF11,
#[doc = "AF12"]
AF12,
#[doc = "AF13"]
AF13,
#[doc = "AF14"]
AF14,
#[doc = "AF15"]
AF15,
}
impl AFSEL15R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u8 {
match *self {
AFSEL15R::AF0 => 0,
AFSEL15R::AF1 => 0x01,
AFSEL15R::AF2 => 0x02,
AFSEL15R::AF3 => 0x03,
AFSEL15R::AF4 => 0x04,
AFSEL15R::AF5 => 0x05,
AFSEL15R::AF6 => 0x06,
AFSEL15R::AF7 => 0x07,
AFSEL15R::AF8 => 0x08,
AFSEL15R::AF9 => 0x09,
AFSEL15R::AF10 => 0x0a,
AFSEL15R::AF11 => 0x0b,
AFSEL15R::AF12 => 0x0c,
AFSEL15R::AF13 => 0x0d,
AFSEL15R::AF14 => 0x0e,
AFSEL15R::AF15 => 0x0f,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: u8) -> AFSEL15R {
match value {
0 => AFSEL15R::AF0,
1 => AFSEL15R::AF1,
2 => AFSEL15R::AF2,
3 => AFSEL15R::AF3,
4 => AFSEL15R::AF4,
5 => AFSEL15R::AF5,
6 => AFSEL15R::AF6,
7 => AFSEL15R::AF7,
8 => AFSEL15R::AF8,
9 => AFSEL15R::AF9,
10 => AFSEL15R::AF10,
11 => AFSEL15R::AF11,
12 => AFSEL15R::AF12,
13 => AFSEL15R::AF13,
14 => AFSEL15R::AF14,
15 => AFSEL15R::AF15,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `AF0`"]
#[inline(always)]
pub fn is_af0(&self) -> bool {
*self == AFSEL15R::AF0
}
#[doc = "Checks if the value of the field is `AF1`"]
#[inline(always)]
pub fn is_af1(&self) -> bool {
*self == AFSEL15R::AF1
}
#[doc = "Checks if the value of the field is `AF2`"]
#[inline(always)]
pub fn is_af2(&self) -> bool {
*self == AFSEL15R::AF2
}
#[doc = "Checks if the value of the field is `AF3`"]
#[inline(always)]
pub fn is_af3(&self) -> bool {
*self == AFSEL15R::AF3
}
#[doc = "Checks if the value of the field is `AF4`"]
#[inline(always)]
pub fn is_af4(&self) -> bool {
*self == AFSEL15R::AF4
}
#[doc = "Checks if the value of the field is `AF5`"]
#[inline(always)]
pub fn is_af5(&self) -> bool {
*self == AFSEL15R::AF5
}
#[doc = "Checks if the value of the field is `AF6`"]
#[inline(always)]
pub fn is_af6(&self) -> bool {
*self == AFSEL15R::AF6
}
#[doc = "Checks if the value of the field is `AF7`"]
#[inline(always)]
pub fn is_af7(&self) -> bool {
*self == AFSEL15R::AF7
}
#[doc = "Checks if the value of the field is `AF8`"]
#[inline(always)]
pub fn is_af8(&self) -> bool {
*self == AFSEL15R::AF8
}
#[doc = "Checks if the value of the field is `AF9`"]
#[inline(always)]
pub fn is_af9(&self) -> bool {
*self == AFSEL15R::AF9
}
#[doc = "Checks if the value of the field is `AF10`"]
#[inline(always)]
pub fn is_af10(&self) -> bool {
*self == AFSEL15R::AF10
}
#[doc = "Checks if the value of the field is `AF11`"]
#[inline(always)]
pub fn is_af11(&self) -> bool {
*self == AFSEL15R::AF11
}
#[doc = "Checks if the value of the field is `AF12`"]
#[inline(always)]
pub fn is_af12(&self) -> bool {
*self == AFSEL15R::AF12
}
#[doc = "Checks if the value of the field is `AF13`"]
#[inline(always)]
pub fn is_af13(&self) -> bool {
*self == AFSEL15R::AF13
}
#[doc = "Checks if the value of the field is `AF14`"]
#[inline(always)]
pub fn is_af14(&self) -> bool {
*self == AFSEL15R::AF14
}
#[doc = "Checks if the value of the field is `AF15`"]
#[inline(always)]
pub fn is_af15(&self) -> bool {
*self == AFSEL15R::AF15
}
}
#[doc = "Values that can be written to the field `AFSEL15`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AFSEL15W {
#[doc = "AF0"]
AF0,
#[doc = "AF1"]
AF1,
#[doc = "AF2"]
AF2,
#[doc = "AF3"]
AF3,
#[doc = "AF4"]
AF4,
#[doc = "AF5"]
AF5,
#[doc = "AF6"]
AF6,
#[doc = "AF7"]
AF7,
#[doc = "AF8"]
AF8,
#[doc = "AF9"]
AF9,
#[doc = "AF10"]
AF10,
#[doc = "AF11"]
AF11,
#[doc = "AF12"]
AF12,
#[doc = "AF13"]
AF13,
#[doc = "AF14"]
AF14,
#[doc = "AF15"]
AF15,
}
impl AFSEL15W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> u8 {
match *self {
AFSEL15W::AF0 => 0,
AFSEL15W::AF1 => 1,
AFSEL15W::AF2 => 2,
AFSEL15W::AF3 => 3,
AFSEL15W::AF4 => 4,
AFSEL15W::AF5 => 5,
AFSEL15W::AF6 => 6,
AFSEL15W::AF7 => 7,
AFSEL15W::AF8 => 8,
AFSEL15W::AF9 => 9,
AFSEL15W::AF10 => 10,
AFSEL15W::AF11 => 11,
AFSEL15W::AF12 => 12,
AFSEL15W::AF13 => 13,
AFSEL15W::AF14 => 14,
AFSEL15W::AF15 => 15,
}
}
}
#[doc = r"Proxy"]
pub struct _AFSEL15W<'a> {
w: &'a mut W,
}
impl<'a> _AFSEL15W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AFSEL15W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(AFSEL15W::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(AFSEL15W::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(AFSEL15W::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(AFSEL15W::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(AFSEL15W::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(AFSEL15W::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(AFSEL15W::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(AFSEL15W::AF7)
}
#[doc = "AF8"]
#[inline(always)]
pub fn af8(self) -> &'a mut W {
self.variant(AFSEL15W::AF8)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(AFSEL15W::AF9)
}
#[doc = "AF10"]
#[inline(always)]
pub fn af10(self) -> &'a mut W {
self.variant(AFSEL15W::AF10)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(AFSEL15W::AF11)
}
#[doc = "AF12"]
#[inline(always)]
pub fn af12(self) -> &'a mut W {
self.variant(AFSEL15W::AF12)
}
#[doc = "AF13"]
#[inline(always)]
pub fn af13(self) -> &'a mut W {
self.variant(AFSEL15W::AF13)
}
#[doc = "AF14"]
#[inline(always)]
pub fn af14(self) -> &'a mut W {
self.variant(AFSEL15W::AF14)
}
#[doc = "AF15"]
#[inline(always)]
pub fn af15(self) -> &'a mut W {
self.variant(AFSEL15W::AF15)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x0f << 28);
self.w.bits |= ((value as u32) & 0x0f) << 28;
self.w
}
}
#[doc = "Possible values of the field `AFSEL14`"]
pub type AFSEL14R = AFSEL15R;
#[doc = "Values that can be written to the field `AFSEL14`"]
pub type AFSEL14W = AFSEL15W;
#[doc = r"Proxy"]
pub struct _AFSEL14W<'a> {
w: &'a mut W,
}
impl<'a> _AFSEL14W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AFSEL14W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(AFSEL15W::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(AFSEL15W::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(AFSEL15W::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(AFSEL15W::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(AFSEL15W::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(AFSEL15W::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(AFSEL15W::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(AFSEL15W::AF7)
}
#[doc = "AF8"]
#[inline(always)]
pub fn af8(self) -> &'a mut W {
self.variant(AFSEL15W::AF8)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(AFSEL15W::AF9)
}
#[doc = "AF10"]
#[inline(always)]
pub fn af10(self) -> &'a mut W {
self.variant(AFSEL15W::AF10)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(AFSEL15W::AF11)
}
#[doc = "AF12"]
#[inline(always)]
pub fn af12(self) -> &'a mut W {
self.variant(AFSEL15W::AF12)
}
#[doc = "AF13"]
#[inline(always)]
pub fn af13(self) -> &'a mut W {
self.variant(AFSEL15W::AF13)
}
#[doc = "AF14"]
#[inline(always)]
pub fn af14(self) -> &'a mut W {
self.variant(AFSEL15W::AF14)
}
#[doc = "AF15"]
#[inline(always)]
pub fn af15(self) -> &'a mut W {
self.variant(AFSEL15W::AF15)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x0f << 24);
self.w.bits |= ((value as u32) & 0x0f) << 24;
self.w
}
}
#[doc = "Possible values of the field `AFSEL13`"]
pub type AFSEL13R = AFSEL15R;
#[doc = "Values that can be written to the field `AFSEL13`"]
pub type AFSEL13W = AFSEL15W;
#[doc = r"Proxy"]
pub struct _AFSEL13W<'a> {
w: &'a mut W,
}
impl<'a> _AFSEL13W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AFSEL13W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(AFSEL15W::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(AFSEL15W::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(AFSEL15W::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(AFSEL15W::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(AFSEL15W::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(AFSEL15W::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(AFSEL15W::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(AFSEL15W::AF7)
}
#[doc = "AF8"]
#[inline(always)]
pub fn af8(self) -> &'a mut W {
self.variant(AFSEL15W::AF8)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(AFSEL15W::AF9)
}
#[doc = "AF10"]
#[inline(always)]
pub fn af10(self) -> &'a mut W {
self.variant(AFSEL15W::AF10)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(AFSEL15W::AF11)
}
#[doc = "AF12"]
#[inline(always)]
pub fn af12(self) -> &'a mut W {
self.variant(AFSEL15W::AF12)
}
#[doc = "AF13"]
#[inline(always)]
pub fn af13(self) -> &'a mut W {
self.variant(AFSEL15W::AF13)
}
#[doc = "AF14"]
#[inline(always)]
pub fn af14(self) -> &'a mut W {
self.variant(AFSEL15W::AF14)
}
#[doc = "AF15"]
#[inline(always)]
pub fn af15(self) -> &'a mut W {
self.variant(AFSEL15W::AF15)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x0f << 20);
self.w.bits |= ((value as u32) & 0x0f) << 20;
self.w
}
}
#[doc = "Possible values of the field `AFSEL12`"]
pub type AFSEL12R = AFSEL15R;
#[doc = "Values that can be written to the field `AFSEL12`"]
pub type AFSEL12W = AFSEL15W;
#[doc = r"Proxy"]
pub struct _AFSEL12W<'a> {
w: &'a mut W,
}
impl<'a> _AFSEL12W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AFSEL12W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(AFSEL15W::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(AFSEL15W::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(AFSEL15W::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(AFSEL15W::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(AFSEL15W::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(AFSEL15W::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(AFSEL15W::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(AFSEL15W::AF7)
}
#[doc = "AF8"]
#[inline(always)]
pub fn af8(self) -> &'a mut W {
self.variant(AFSEL15W::AF8)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(AFSEL15W::AF9)
}
#[doc = "AF10"]
#[inline(always)]
pub fn af10(self) -> &'a mut W {
self.variant(AFSEL15W::AF10)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(AFSEL15W::AF11)
}
#[doc = "AF12"]
#[inline(always)]
pub fn af12(self) -> &'a mut W {
self.variant(AFSEL15W::AF12)
}
#[doc = "AF13"]
#[inline(always)]
pub fn af13(self) -> &'a mut W {
self.variant(AFSEL15W::AF13)
}
#[doc = "AF14"]
#[inline(always)]
pub fn af14(self) -> &'a mut W {
self.variant(AFSEL15W::AF14)
}
#[doc = "AF15"]
#[inline(always)]
pub fn af15(self) -> &'a mut W {
self.variant(AFSEL15W::AF15)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x0f << 16);
self.w.bits |= ((value as u32) & 0x0f) << 16;
self.w
}
}
#[doc = "Possible values of the field `AFSEL11`"]
pub type AFSEL11R = AFSEL15R;
#[doc = "Values that can be written to the field `AFSEL11`"]
pub type AFSEL11W = AFSEL15W;
#[doc = r"Proxy"]
pub struct _AFSEL11W<'a> {
w: &'a mut W,
}
impl<'a> _AFSEL11W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AFSEL11W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(AFSEL15W::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(AFSEL15W::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(AFSEL15W::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(AFSEL15W::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(AFSEL15W::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(AFSEL15W::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(AFSEL15W::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(AFSEL15W::AF7)
}
#[doc = "AF8"]
#[inline(always)]
pub fn af8(self) -> &'a mut W {
self.variant(AFSEL15W::AF8)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(AFSEL15W::AF9)
}
#[doc = "AF10"]
#[inline(always)]
pub fn af10(self) -> &'a mut W {
self.variant(AFSEL15W::AF10)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(AFSEL15W::AF11)
}
#[doc = "AF12"]
#[inline(always)]
pub fn af12(self) -> &'a mut W {
self.variant(AFSEL15W::AF12)
}
#[doc = "AF13"]
#[inline(always)]
pub fn af13(self) -> &'a mut W {
self.variant(AFSEL15W::AF13)
}
#[doc = "AF14"]
#[inline(always)]
pub fn af14(self) -> &'a mut W {
self.variant(AFSEL15W::AF14)
}
#[doc = "AF15"]
#[inline(always)]
pub fn af15(self) -> &'a mut W {
self.variant(AFSEL15W::AF15)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x0f << 12);
self.w.bits |= ((value as u32) & 0x0f) << 12;
self.w
}
}
#[doc = "Possible values of the field `AFSEL10`"]
pub type AFSEL10R = AFSEL15R;
#[doc = "Values that can be written to the field `AFSEL10`"]
pub type AFSEL10W = AFSEL15W;
#[doc = r"Proxy"]
pub struct _AFSEL10W<'a> {
w: &'a mut W,
}
impl<'a> _AFSEL10W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AFSEL10W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(AFSEL15W::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(AFSEL15W::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(AFSEL15W::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(AFSEL15W::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(AFSEL15W::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(AFSEL15W::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(AFSEL15W::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(AFSEL15W::AF7)
}
#[doc = "AF8"]
#[inline(always)]
pub fn af8(self) -> &'a mut W {
self.variant(AFSEL15W::AF8)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(AFSEL15W::AF9)
}
#[doc = "AF10"]
#[inline(always)]
pub fn af10(self) -> &'a mut W {
self.variant(AFSEL15W::AF10)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(AFSEL15W::AF11)
}
#[doc = "AF12"]
#[inline(always)]
pub fn af12(self) -> &'a mut W {
self.variant(AFSEL15W::AF12)
}
#[doc = "AF13"]
#[inline(always)]
pub fn af13(self) -> &'a mut W {
self.variant(AFSEL15W::AF13)
}
#[doc = "AF14"]
#[inline(always)]
pub fn af14(self) -> &'a mut W {
self.variant(AFSEL15W::AF14)
}
#[doc = "AF15"]
#[inline(always)]
pub fn af15(self) -> &'a mut W {
self.variant(AFSEL15W::AF15)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x0f << 8);
self.w.bits |= ((value as u32) & 0x0f) << 8;
self.w
}
}
#[doc = "Possible values of the field `AFSEL9`"]
pub type AFSEL9R = AFSEL15R;
#[doc = "Values that can be written to the field `AFSEL9`"]
pub type AFSEL9W = AFSEL15W;
#[doc = r"Proxy"]
pub struct _AFSEL9W<'a> {
w: &'a mut W,
}
impl<'a> _AFSEL9W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AFSEL9W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(AFSEL15W::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(AFSEL15W::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(AFSEL15W::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(AFSEL15W::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(AFSEL15W::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(AFSEL15W::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(AFSEL15W::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(AFSEL15W::AF7)
}
#[doc = "AF8"]
#[inline(always)]
pub fn af8(self) -> &'a mut W {
self.variant(AFSEL15W::AF8)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(AFSEL15W::AF9)
}
#[doc = "AF10"]
#[inline(always)]
pub fn af10(self) -> &'a mut W {
self.variant(AFSEL15W::AF10)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(AFSEL15W::AF11)
}
#[doc = "AF12"]
#[inline(always)]
pub fn af12(self) -> &'a mut W {
self.variant(AFSEL15W::AF12)
}
#[doc = "AF13"]
#[inline(always)]
pub fn af13(self) -> &'a mut W {
self.variant(AFSEL15W::AF13)
}
#[doc = "AF14"]
#[inline(always)]
pub fn af14(self) -> &'a mut W {
self.variant(AFSEL15W::AF14)
}
#[doc = "AF15"]
#[inline(always)]
pub fn af15(self) -> &'a mut W {
self.variant(AFSEL15W::AF15)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x0f << 4);
self.w.bits |= ((value as u32) & 0x0f) << 4;
self.w
}
}
#[doc = "Possible values of the field `AFSEL8`"]
pub type AFSEL8R = AFSEL15R;
#[doc = "Values that can be written to the field `AFSEL8`"]
pub type AFSEL8W = AFSEL15W;
#[doc = r"Proxy"]
pub struct _AFSEL8W<'a> {
w: &'a mut W,
}
impl<'a> _AFSEL8W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AFSEL8W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(AFSEL15W::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(AFSEL15W::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(AFSEL15W::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(AFSEL15W::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(AFSEL15W::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(AFSEL15W::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(AFSEL15W::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(AFSEL15W::AF7)
}
#[doc = "AF8"]
#[inline(always)]
pub fn af8(self) -> &'a mut W {
self.variant(AFSEL15W::AF8)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(AFSEL15W::AF9)
}
#[doc = "AF10"]
#[inline(always)]
pub fn af10(self) -> &'a mut W {
self.variant(AFSEL15W::AF10)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(AFSEL15W::AF11)
}
#[doc = "AF12"]
#[inline(always)]
pub fn af12(self) -> &'a mut W {
self.variant(AFSEL15W::AF12)
}
#[doc = "AF13"]
#[inline(always)]
pub fn af13(self) -> &'a mut W {
self.variant(AFSEL15W::AF13)
}
#[doc = "AF14"]
#[inline(always)]
pub fn af14(self) -> &'a mut W {
self.variant(AFSEL15W::AF14)
}
#[doc = "AF15"]
#[inline(always)]
pub fn af15(self) -> &'a mut W {
self.variant(AFSEL15W::AF15)
}
#[doc = r"Writes raw bits to the field"]
#[inline(always)]
pub fn bits(self, value: u8) -> &'a mut W {
self.w.bits &= !(0x0f << 0);
self.w.bits |= ((value as u32) & 0x0f) << 0;
self.w
}
}
impl R {
#[doc = r"Value of the register as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bits 28:31 - Alternate function selection for port x pin y (y = 8..15)"]
#[inline(always)]
pub fn afsel15(&self) -> AFSEL15R {
AFSEL15R::_from(((self.bits >> 28) & 0x0f) as u8)
}
#[doc = "Bits 24:27 - Alternate function selection for port x pin y (y = 8..15)"]
#[inline(always)]
pub fn afsel14(&self) -> AFSEL14R {
AFSEL14R::_from(((self.bits >> 24) & 0x0f) as u8)
}
#[doc = "Bits 20:23 - Alternate function selection for port x pin y (y = 8..15)"]
#[inline(always)]
pub fn afsel13(&self) -> AFSEL13R {
AFSEL13R::_from(((self.bits >> 20) & 0x0f) as u8)
}
#[doc = "Bits 16:19 - Alternate function selection for port x pin y (y = 8..15)"]
#[inline(always)]
pub fn afsel12(&self) -> AFSEL12R {
AFSEL12R::_from(((self.bits >> 16) & 0x0f) as u8)
}
#[doc = "Bits 12:15 - Alternate function selection for port x pin y (y = 8..15)"]
#[inline(always)]
pub fn afsel11(&self) -> AFSEL11R {
AFSEL11R::_from(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 8:11 - Alternate function selection for port x pin y (y = 8..15)"]
#[inline(always)]
pub fn afsel10(&self) -> AFSEL10R {
AFSEL10R::_from(((self.bits >> 8) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - Alternate function selection for port x pin y (y = 8..15)"]
#[inline(always)]
pub fn afsel9(&self) -> AFSEL9R {
AFSEL9R::_from(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 0:3 - Alternate function selection for port x pin y (y = 8..15)"]
#[inline(always)]
pub fn afsel8(&self) -> AFSEL8R {
AFSEL8R::_from(((self.bits >> 0) & 0x0f) as u8)
}
}
impl W {
#[doc = r"Writes raw bits to the register"]
#[inline(always)]
pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
self.bits = bits;
self
}
#[doc = "Bits 28:31 - Alternate function selection for port x pin y (y = 8..15)"]
#[inline(always)]
pub fn afsel15(&mut self) -> _AFSEL15W {
_AFSEL15W { w: self }
}
#[doc = "Bits 24:27 - Alternate function selection for port x pin y (y = 8..15)"]
#[inline(always)]
pub fn afsel14(&mut self) -> _AFSEL14W {
_AFSEL14W { w: self }
}
#[doc = "Bits 20:23 - Alternate function selection for port x pin y (y = 8..15)"]
#[inline(always)]
pub fn afsel13(&mut self) -> _AFSEL13W {
_AFSEL13W { w: self }
}
#[doc = "Bits 16:19 - Alternate function selection for port x pin y (y = 8..15)"]
#[inline(always)]
pub fn afsel12(&mut self) -> _AFSEL12W {
_AFSEL12W { w: self }
}
#[doc = "Bits 12:15 - Alternate function selection for port x pin y (y = 8..15)"]
#[inline(always)]
pub fn afsel11(&mut self) -> _AFSEL11W {
_AFSEL11W { w: self }
}
#[doc = "Bits 8:11 - Alternate function selection for port x pin y (y = 8..15)"]
#[inline(always)]
pub fn afsel10(&mut self) -> _AFSEL10W {
_AFSEL10W { w: self }
}
#[doc = "Bits 4:7 - Alternate function selection for port x pin y (y = 8..15)"]
#[inline(always)]
pub fn afsel9(&mut self) -> _AFSEL9W {
_AFSEL9W { w: self }
}
#[doc = "Bits 0:3 - Alternate function selection for port x pin y (y = 8..15)"]
#[inline(always)]
pub fn afsel8(&mut self) -> _AFSEL8W {
_AFSEL8W { w: self }
}
}