#[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 `AFR8`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AFR8R {
#[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 AFR8R {
#[doc = r"Value of the field as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u8 {
match *self {
AFR8R::AF0 => 0,
AFR8R::AF1 => 0x01,
AFR8R::AF2 => 0x02,
AFR8R::AF3 => 0x03,
AFR8R::AF4 => 0x04,
AFR8R::AF5 => 0x05,
AFR8R::AF6 => 0x06,
AFR8R::AF7 => 0x07,
AFR8R::AF8 => 0x08,
AFR8R::AF9 => 0x09,
AFR8R::AF10 => 0x0a,
AFR8R::AF11 => 0x0b,
AFR8R::AF12 => 0x0c,
AFR8R::AF13 => 0x0d,
AFR8R::AF14 => 0x0e,
AFR8R::AF15 => 0x0f,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _from(value: u8) -> AFR8R {
match value {
0 => AFR8R::AF0,
1 => AFR8R::AF1,
2 => AFR8R::AF2,
3 => AFR8R::AF3,
4 => AFR8R::AF4,
5 => AFR8R::AF5,
6 => AFR8R::AF6,
7 => AFR8R::AF7,
8 => AFR8R::AF8,
9 => AFR8R::AF9,
10 => AFR8R::AF10,
11 => AFR8R::AF11,
12 => AFR8R::AF12,
13 => AFR8R::AF13,
14 => AFR8R::AF14,
15 => AFR8R::AF15,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `AF0`"]
#[inline(always)]
pub fn is_af0(&self) -> bool {
*self == AFR8R::AF0
}
#[doc = "Checks if the value of the field is `AF1`"]
#[inline(always)]
pub fn is_af1(&self) -> bool {
*self == AFR8R::AF1
}
#[doc = "Checks if the value of the field is `AF2`"]
#[inline(always)]
pub fn is_af2(&self) -> bool {
*self == AFR8R::AF2
}
#[doc = "Checks if the value of the field is `AF3`"]
#[inline(always)]
pub fn is_af3(&self) -> bool {
*self == AFR8R::AF3
}
#[doc = "Checks if the value of the field is `AF4`"]
#[inline(always)]
pub fn is_af4(&self) -> bool {
*self == AFR8R::AF4
}
#[doc = "Checks if the value of the field is `AF5`"]
#[inline(always)]
pub fn is_af5(&self) -> bool {
*self == AFR8R::AF5
}
#[doc = "Checks if the value of the field is `AF6`"]
#[inline(always)]
pub fn is_af6(&self) -> bool {
*self == AFR8R::AF6
}
#[doc = "Checks if the value of the field is `AF7`"]
#[inline(always)]
pub fn is_af7(&self) -> bool {
*self == AFR8R::AF7
}
#[doc = "Checks if the value of the field is `AF8`"]
#[inline(always)]
pub fn is_af8(&self) -> bool {
*self == AFR8R::AF8
}
#[doc = "Checks if the value of the field is `AF9`"]
#[inline(always)]
pub fn is_af9(&self) -> bool {
*self == AFR8R::AF9
}
#[doc = "Checks if the value of the field is `AF10`"]
#[inline(always)]
pub fn is_af10(&self) -> bool {
*self == AFR8R::AF10
}
#[doc = "Checks if the value of the field is `AF11`"]
#[inline(always)]
pub fn is_af11(&self) -> bool {
*self == AFR8R::AF11
}
#[doc = "Checks if the value of the field is `AF12`"]
#[inline(always)]
pub fn is_af12(&self) -> bool {
*self == AFR8R::AF12
}
#[doc = "Checks if the value of the field is `AF13`"]
#[inline(always)]
pub fn is_af13(&self) -> bool {
*self == AFR8R::AF13
}
#[doc = "Checks if the value of the field is `AF14`"]
#[inline(always)]
pub fn is_af14(&self) -> bool {
*self == AFR8R::AF14
}
#[doc = "Checks if the value of the field is `AF15`"]
#[inline(always)]
pub fn is_af15(&self) -> bool {
*self == AFR8R::AF15
}
}
#[doc = "Values that can be written to the field `AFR8`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AFR8W {
#[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 AFR8W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline(always)]
pub fn _bits(&self) -> u8 {
match *self {
AFR8W::AF0 => 0,
AFR8W::AF1 => 1,
AFR8W::AF2 => 2,
AFR8W::AF3 => 3,
AFR8W::AF4 => 4,
AFR8W::AF5 => 5,
AFR8W::AF6 => 6,
AFR8W::AF7 => 7,
AFR8W::AF8 => 8,
AFR8W::AF9 => 9,
AFR8W::AF10 => 10,
AFR8W::AF11 => 11,
AFR8W::AF12 => 12,
AFR8W::AF13 => 13,
AFR8W::AF14 => 14,
AFR8W::AF15 => 15,
}
}
}
#[doc = r"Proxy"]
pub struct _AFR8W<'a> {
w: &'a mut W,
}
impl<'a> _AFR8W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AFR8W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(AFR8W::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(AFR8W::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(AFR8W::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(AFR8W::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(AFR8W::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(AFR8W::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(AFR8W::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(AFR8W::AF7)
}
#[doc = "AF8"]
#[inline(always)]
pub fn af8(self) -> &'a mut W {
self.variant(AFR8W::AF8)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(AFR8W::AF9)
}
#[doc = "AF10"]
#[inline(always)]
pub fn af10(self) -> &'a mut W {
self.variant(AFR8W::AF10)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(AFR8W::AF11)
}
#[doc = "AF12"]
#[inline(always)]
pub fn af12(self) -> &'a mut W {
self.variant(AFR8W::AF12)
}
#[doc = "AF13"]
#[inline(always)]
pub fn af13(self) -> &'a mut W {
self.variant(AFR8W::AF13)
}
#[doc = "AF14"]
#[inline(always)]
pub fn af14(self) -> &'a mut W {
self.variant(AFR8W::AF14)
}
#[doc = "AF15"]
#[inline(always)]
pub fn af15(self) -> &'a mut W {
self.variant(AFR8W::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
}
}
#[doc = "Possible values of the field `AFR9`"]
pub type AFR9R = AFR8R;
#[doc = "Values that can be written to the field `AFR9`"]
pub type AFR9W = AFR8W;
#[doc = r"Proxy"]
pub struct _AFR9W<'a> {
w: &'a mut W,
}
impl<'a> _AFR9W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AFR9W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(AFR8W::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(AFR8W::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(AFR8W::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(AFR8W::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(AFR8W::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(AFR8W::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(AFR8W::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(AFR8W::AF7)
}
#[doc = "AF8"]
#[inline(always)]
pub fn af8(self) -> &'a mut W {
self.variant(AFR8W::AF8)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(AFR8W::AF9)
}
#[doc = "AF10"]
#[inline(always)]
pub fn af10(self) -> &'a mut W {
self.variant(AFR8W::AF10)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(AFR8W::AF11)
}
#[doc = "AF12"]
#[inline(always)]
pub fn af12(self) -> &'a mut W {
self.variant(AFR8W::AF12)
}
#[doc = "AF13"]
#[inline(always)]
pub fn af13(self) -> &'a mut W {
self.variant(AFR8W::AF13)
}
#[doc = "AF14"]
#[inline(always)]
pub fn af14(self) -> &'a mut W {
self.variant(AFR8W::AF14)
}
#[doc = "AF15"]
#[inline(always)]
pub fn af15(self) -> &'a mut W {
self.variant(AFR8W::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 `AFR10`"]
pub type AFR10R = AFR8R;
#[doc = "Values that can be written to the field `AFR10`"]
pub type AFR10W = AFR8W;
#[doc = r"Proxy"]
pub struct _AFR10W<'a> {
w: &'a mut W,
}
impl<'a> _AFR10W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AFR10W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(AFR8W::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(AFR8W::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(AFR8W::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(AFR8W::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(AFR8W::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(AFR8W::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(AFR8W::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(AFR8W::AF7)
}
#[doc = "AF8"]
#[inline(always)]
pub fn af8(self) -> &'a mut W {
self.variant(AFR8W::AF8)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(AFR8W::AF9)
}
#[doc = "AF10"]
#[inline(always)]
pub fn af10(self) -> &'a mut W {
self.variant(AFR8W::AF10)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(AFR8W::AF11)
}
#[doc = "AF12"]
#[inline(always)]
pub fn af12(self) -> &'a mut W {
self.variant(AFR8W::AF12)
}
#[doc = "AF13"]
#[inline(always)]
pub fn af13(self) -> &'a mut W {
self.variant(AFR8W::AF13)
}
#[doc = "AF14"]
#[inline(always)]
pub fn af14(self) -> &'a mut W {
self.variant(AFR8W::AF14)
}
#[doc = "AF15"]
#[inline(always)]
pub fn af15(self) -> &'a mut W {
self.variant(AFR8W::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 `AFR11`"]
pub type AFR11R = AFR8R;
#[doc = "Values that can be written to the field `AFR11`"]
pub type AFR11W = AFR8W;
#[doc = r"Proxy"]
pub struct _AFR11W<'a> {
w: &'a mut W,
}
impl<'a> _AFR11W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AFR11W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(AFR8W::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(AFR8W::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(AFR8W::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(AFR8W::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(AFR8W::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(AFR8W::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(AFR8W::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(AFR8W::AF7)
}
#[doc = "AF8"]
#[inline(always)]
pub fn af8(self) -> &'a mut W {
self.variant(AFR8W::AF8)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(AFR8W::AF9)
}
#[doc = "AF10"]
#[inline(always)]
pub fn af10(self) -> &'a mut W {
self.variant(AFR8W::AF10)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(AFR8W::AF11)
}
#[doc = "AF12"]
#[inline(always)]
pub fn af12(self) -> &'a mut W {
self.variant(AFR8W::AF12)
}
#[doc = "AF13"]
#[inline(always)]
pub fn af13(self) -> &'a mut W {
self.variant(AFR8W::AF13)
}
#[doc = "AF14"]
#[inline(always)]
pub fn af14(self) -> &'a mut W {
self.variant(AFR8W::AF14)
}
#[doc = "AF15"]
#[inline(always)]
pub fn af15(self) -> &'a mut W {
self.variant(AFR8W::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 `AFR12`"]
pub type AFR12R = AFR8R;
#[doc = "Values that can be written to the field `AFR12`"]
pub type AFR12W = AFR8W;
#[doc = r"Proxy"]
pub struct _AFR12W<'a> {
w: &'a mut W,
}
impl<'a> _AFR12W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AFR12W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(AFR8W::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(AFR8W::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(AFR8W::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(AFR8W::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(AFR8W::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(AFR8W::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(AFR8W::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(AFR8W::AF7)
}
#[doc = "AF8"]
#[inline(always)]
pub fn af8(self) -> &'a mut W {
self.variant(AFR8W::AF8)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(AFR8W::AF9)
}
#[doc = "AF10"]
#[inline(always)]
pub fn af10(self) -> &'a mut W {
self.variant(AFR8W::AF10)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(AFR8W::AF11)
}
#[doc = "AF12"]
#[inline(always)]
pub fn af12(self) -> &'a mut W {
self.variant(AFR8W::AF12)
}
#[doc = "AF13"]
#[inline(always)]
pub fn af13(self) -> &'a mut W {
self.variant(AFR8W::AF13)
}
#[doc = "AF14"]
#[inline(always)]
pub fn af14(self) -> &'a mut W {
self.variant(AFR8W::AF14)
}
#[doc = "AF15"]
#[inline(always)]
pub fn af15(self) -> &'a mut W {
self.variant(AFR8W::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 `AFR13`"]
pub type AFR13R = AFR8R;
#[doc = "Values that can be written to the field `AFR13`"]
pub type AFR13W = AFR8W;
#[doc = r"Proxy"]
pub struct _AFR13W<'a> {
w: &'a mut W,
}
impl<'a> _AFR13W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AFR13W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(AFR8W::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(AFR8W::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(AFR8W::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(AFR8W::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(AFR8W::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(AFR8W::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(AFR8W::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(AFR8W::AF7)
}
#[doc = "AF8"]
#[inline(always)]
pub fn af8(self) -> &'a mut W {
self.variant(AFR8W::AF8)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(AFR8W::AF9)
}
#[doc = "AF10"]
#[inline(always)]
pub fn af10(self) -> &'a mut W {
self.variant(AFR8W::AF10)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(AFR8W::AF11)
}
#[doc = "AF12"]
#[inline(always)]
pub fn af12(self) -> &'a mut W {
self.variant(AFR8W::AF12)
}
#[doc = "AF13"]
#[inline(always)]
pub fn af13(self) -> &'a mut W {
self.variant(AFR8W::AF13)
}
#[doc = "AF14"]
#[inline(always)]
pub fn af14(self) -> &'a mut W {
self.variant(AFR8W::AF14)
}
#[doc = "AF15"]
#[inline(always)]
pub fn af15(self) -> &'a mut W {
self.variant(AFR8W::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 `AFR14`"]
pub type AFR14R = AFR8R;
#[doc = "Values that can be written to the field `AFR14`"]
pub type AFR14W = AFR8W;
#[doc = r"Proxy"]
pub struct _AFR14W<'a> {
w: &'a mut W,
}
impl<'a> _AFR14W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AFR14W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(AFR8W::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(AFR8W::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(AFR8W::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(AFR8W::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(AFR8W::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(AFR8W::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(AFR8W::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(AFR8W::AF7)
}
#[doc = "AF8"]
#[inline(always)]
pub fn af8(self) -> &'a mut W {
self.variant(AFR8W::AF8)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(AFR8W::AF9)
}
#[doc = "AF10"]
#[inline(always)]
pub fn af10(self) -> &'a mut W {
self.variant(AFR8W::AF10)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(AFR8W::AF11)
}
#[doc = "AF12"]
#[inline(always)]
pub fn af12(self) -> &'a mut W {
self.variant(AFR8W::AF12)
}
#[doc = "AF13"]
#[inline(always)]
pub fn af13(self) -> &'a mut W {
self.variant(AFR8W::AF13)
}
#[doc = "AF14"]
#[inline(always)]
pub fn af14(self) -> &'a mut W {
self.variant(AFR8W::AF14)
}
#[doc = "AF15"]
#[inline(always)]
pub fn af15(self) -> &'a mut W {
self.variant(AFR8W::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 `AFR15`"]
pub type AFR15R = AFR8R;
#[doc = "Values that can be written to the field `AFR15`"]
pub type AFR15W = AFR8W;
#[doc = r"Proxy"]
pub struct _AFR15W<'a> {
w: &'a mut W,
}
impl<'a> _AFR15W<'a> {
#[doc = r"Writes `variant` to the field"]
#[inline(always)]
pub fn variant(self, variant: AFR15W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline(always)]
pub fn af0(self) -> &'a mut W {
self.variant(AFR8W::AF0)
}
#[doc = "AF1"]
#[inline(always)]
pub fn af1(self) -> &'a mut W {
self.variant(AFR8W::AF1)
}
#[doc = "AF2"]
#[inline(always)]
pub fn af2(self) -> &'a mut W {
self.variant(AFR8W::AF2)
}
#[doc = "AF3"]
#[inline(always)]
pub fn af3(self) -> &'a mut W {
self.variant(AFR8W::AF3)
}
#[doc = "AF4"]
#[inline(always)]
pub fn af4(self) -> &'a mut W {
self.variant(AFR8W::AF4)
}
#[doc = "AF5"]
#[inline(always)]
pub fn af5(self) -> &'a mut W {
self.variant(AFR8W::AF5)
}
#[doc = "AF6"]
#[inline(always)]
pub fn af6(self) -> &'a mut W {
self.variant(AFR8W::AF6)
}
#[doc = "AF7"]
#[inline(always)]
pub fn af7(self) -> &'a mut W {
self.variant(AFR8W::AF7)
}
#[doc = "AF8"]
#[inline(always)]
pub fn af8(self) -> &'a mut W {
self.variant(AFR8W::AF8)
}
#[doc = "AF9"]
#[inline(always)]
pub fn af9(self) -> &'a mut W {
self.variant(AFR8W::AF9)
}
#[doc = "AF10"]
#[inline(always)]
pub fn af10(self) -> &'a mut W {
self.variant(AFR8W::AF10)
}
#[doc = "AF11"]
#[inline(always)]
pub fn af11(self) -> &'a mut W {
self.variant(AFR8W::AF11)
}
#[doc = "AF12"]
#[inline(always)]
pub fn af12(self) -> &'a mut W {
self.variant(AFR8W::AF12)
}
#[doc = "AF13"]
#[inline(always)]
pub fn af13(self) -> &'a mut W {
self.variant(AFR8W::AF13)
}
#[doc = "AF14"]
#[inline(always)]
pub fn af14(self) -> &'a mut W {
self.variant(AFR8W::AF14)
}
#[doc = "AF15"]
#[inline(always)]
pub fn af15(self) -> &'a mut W {
self.variant(AFR8W::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
}
}
impl R {
#[doc = r"Value of the register as raw bits"]
#[inline(always)]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bits 0:3 - 3:0\\]: Alternate function selection for port x pin y (y = 8..15) These bits are written by software to configure alternate function I/Os"]
#[inline(always)]
pub fn afr8(&self) -> AFR8R {
AFR8R::_from(((self.bits >> 0) & 0x0f) as u8)
}
#[doc = "Bits 4:7 - 3:0\\]: Alternate function selection for port x pin y (y = 8..15) These bits are written by software to configure alternate function I/Os"]
#[inline(always)]
pub fn afr9(&self) -> AFR9R {
AFR9R::_from(((self.bits >> 4) & 0x0f) as u8)
}
#[doc = "Bits 8:11 - 3:0\\]: Alternate function selection for port x pin y (y = 8..15) These bits are written by software to configure alternate function I/Os"]
#[inline(always)]
pub fn afr10(&self) -> AFR10R {
AFR10R::_from(((self.bits >> 8) & 0x0f) as u8)
}
#[doc = "Bits 12:15 - 3:0\\]: Alternate function selection for port x pin y (y = 8..15) These bits are written by software to configure alternate function I/Os"]
#[inline(always)]
pub fn afr11(&self) -> AFR11R {
AFR11R::_from(((self.bits >> 12) & 0x0f) as u8)
}
#[doc = "Bits 16:19 - 3:0\\]: Alternate function selection for port x pin y (y = 8..15) These bits are written by software to configure alternate function I/Os"]
#[inline(always)]
pub fn afr12(&self) -> AFR12R {
AFR12R::_from(((self.bits >> 16) & 0x0f) as u8)
}
#[doc = "Bits 20:23 - 3:0\\]: Alternate function selection for port x pin y (y = 8..15) These bits are written by software to configure alternate function I/Os"]
#[inline(always)]
pub fn afr13(&self) -> AFR13R {
AFR13R::_from(((self.bits >> 20) & 0x0f) as u8)
}
#[doc = "Bits 24:27 - 3:0\\]: Alternate function selection for port x pin y (y = 8..15) These bits are written by software to configure alternate function I/Os"]
#[inline(always)]
pub fn afr14(&self) -> AFR14R {
AFR14R::_from(((self.bits >> 24) & 0x0f) as u8)
}
#[doc = "Bits 28:31 - 3:0\\]: Alternate function selection for port x pin y (y = 8..15) These bits are written by software to configure alternate function I/Os"]
#[inline(always)]
pub fn afr15(&self) -> AFR15R {
AFR15R::_from(((self.bits >> 28) & 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 0:3 - 3:0\\]: Alternate function selection for port x pin y (y = 8..15) These bits are written by software to configure alternate function I/Os"]
#[inline(always)]
pub fn afr8(&mut self) -> _AFR8W {
_AFR8W { w: self }
}
#[doc = "Bits 4:7 - 3:0\\]: Alternate function selection for port x pin y (y = 8..15) These bits are written by software to configure alternate function I/Os"]
#[inline(always)]
pub fn afr9(&mut self) -> _AFR9W {
_AFR9W { w: self }
}
#[doc = "Bits 8:11 - 3:0\\]: Alternate function selection for port x pin y (y = 8..15) These bits are written by software to configure alternate function I/Os"]
#[inline(always)]
pub fn afr10(&mut self) -> _AFR10W {
_AFR10W { w: self }
}
#[doc = "Bits 12:15 - 3:0\\]: Alternate function selection for port x pin y (y = 8..15) These bits are written by software to configure alternate function I/Os"]
#[inline(always)]
pub fn afr11(&mut self) -> _AFR11W {
_AFR11W { w: self }
}
#[doc = "Bits 16:19 - 3:0\\]: Alternate function selection for port x pin y (y = 8..15) These bits are written by software to configure alternate function I/Os"]
#[inline(always)]
pub fn afr12(&mut self) -> _AFR12W {
_AFR12W { w: self }
}
#[doc = "Bits 20:23 - 3:0\\]: Alternate function selection for port x pin y (y = 8..15) These bits are written by software to configure alternate function I/Os"]
#[inline(always)]
pub fn afr13(&mut self) -> _AFR13W {
_AFR13W { w: self }
}
#[doc = "Bits 24:27 - 3:0\\]: Alternate function selection for port x pin y (y = 8..15) These bits are written by software to configure alternate function I/Os"]
#[inline(always)]
pub fn afr14(&mut self) -> _AFR14W {
_AFR14W { w: self }
}
#[doc = "Bits 28:31 - 3:0\\]: Alternate function selection for port x pin y (y = 8..15) These bits are written by software to configure alternate function I/Os"]
#[inline(always)]
pub fn afr15(&mut self) -> _AFR15W {
_AFR15W { w: self }
}
}