#[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::AFRL {
#[doc = r" Modifies the contents of the register"]
#[inline]
pub fn modify<F>(&self, f: F)
where
for<'w> F: FnOnce(&R, &'w mut W) -> &'w mut W,
{
let bits = self.register.get();
let r = R { bits: bits };
let mut w = W { bits: bits };
f(&r, &mut w);
self.register.set(w.bits);
}
#[doc = r" Reads the contents of the register"]
#[inline]
pub fn read(&self) -> R {
R {
bits: self.register.get(),
}
}
#[doc = r" Writes to the register"]
#[inline]
pub fn write<F>(&self, f: F)
where
F: FnOnce(&mut W) -> &mut W,
{
let mut w = W::reset_value();
f(&mut w);
self.register.set(w.bits);
}
#[doc = r" Writes the reset value to the register"]
#[inline]
pub fn reset(&self) {
self.write(|w| w)
}
}
#[doc = "Possible values of the field `AFR0`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum AFR0R {
#[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 AFR0R {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
AFR0R::AF0 => 0,
AFR0R::AF1 => 1,
AFR0R::AF2 => 2,
AFR0R::AF3 => 3,
AFR0R::AF4 => 4,
AFR0R::AF5 => 5,
AFR0R::AF6 => 6,
AFR0R::AF7 => 7,
AFR0R::AF8 => 8,
AFR0R::AF9 => 9,
AFR0R::AF10 => 10,
AFR0R::AF11 => 11,
AFR0R::AF12 => 12,
AFR0R::AF13 => 13,
AFR0R::AF14 => 14,
AFR0R::AF15 => 15,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> AFR0R {
match value {
0 => AFR0R::AF0,
1 => AFR0R::AF1,
2 => AFR0R::AF2,
3 => AFR0R::AF3,
4 => AFR0R::AF4,
5 => AFR0R::AF5,
6 => AFR0R::AF6,
7 => AFR0R::AF7,
8 => AFR0R::AF8,
9 => AFR0R::AF9,
10 => AFR0R::AF10,
11 => AFR0R::AF11,
12 => AFR0R::AF12,
13 => AFR0R::AF13,
14 => AFR0R::AF14,
15 => AFR0R::AF15,
_ => unreachable!(),
}
}
#[doc = "Checks if the value of the field is `AF0`"]
#[inline]
pub fn is_af0(&self) -> bool {
*self == AFR0R::AF0
}
#[doc = "Checks if the value of the field is `AF1`"]
#[inline]
pub fn is_af1(&self) -> bool {
*self == AFR0R::AF1
}
#[doc = "Checks if the value of the field is `AF2`"]
#[inline]
pub fn is_af2(&self) -> bool {
*self == AFR0R::AF2
}
#[doc = "Checks if the value of the field is `AF3`"]
#[inline]
pub fn is_af3(&self) -> bool {
*self == AFR0R::AF3
}
#[doc = "Checks if the value of the field is `AF4`"]
#[inline]
pub fn is_af4(&self) -> bool {
*self == AFR0R::AF4
}
#[doc = "Checks if the value of the field is `AF5`"]
#[inline]
pub fn is_af5(&self) -> bool {
*self == AFR0R::AF5
}
#[doc = "Checks if the value of the field is `AF6`"]
#[inline]
pub fn is_af6(&self) -> bool {
*self == AFR0R::AF6
}
#[doc = "Checks if the value of the field is `AF7`"]
#[inline]
pub fn is_af7(&self) -> bool {
*self == AFR0R::AF7
}
#[doc = "Checks if the value of the field is `AF8`"]
#[inline]
pub fn is_af8(&self) -> bool {
*self == AFR0R::AF8
}
#[doc = "Checks if the value of the field is `AF9`"]
#[inline]
pub fn is_af9(&self) -> bool {
*self == AFR0R::AF9
}
#[doc = "Checks if the value of the field is `AF10`"]
#[inline]
pub fn is_af10(&self) -> bool {
*self == AFR0R::AF10
}
#[doc = "Checks if the value of the field is `AF11`"]
#[inline]
pub fn is_af11(&self) -> bool {
*self == AFR0R::AF11
}
#[doc = "Checks if the value of the field is `AF12`"]
#[inline]
pub fn is_af12(&self) -> bool {
*self == AFR0R::AF12
}
#[doc = "Checks if the value of the field is `AF13`"]
#[inline]
pub fn is_af13(&self) -> bool {
*self == AFR0R::AF13
}
#[doc = "Checks if the value of the field is `AF14`"]
#[inline]
pub fn is_af14(&self) -> bool {
*self == AFR0R::AF14
}
#[doc = "Checks if the value of the field is `AF15`"]
#[inline]
pub fn is_af15(&self) -> bool {
*self == AFR0R::AF15
}
}
#[doc = "Possible values of the field `AFR1`"]
pub type AFR1R = AFR0R;
#[doc = "Possible values of the field `AFR2`"]
pub type AFR2R = AFR0R;
#[doc = "Possible values of the field `AFR3`"]
pub type AFR3R = AFR0R;
#[doc = "Possible values of the field `AFR4`"]
pub type AFR4R = AFR0R;
#[doc = "Possible values of the field `AFR5`"]
pub type AFR5R = AFR0R;
#[doc = "Possible values of the field `AFR6`"]
pub type AFR6R = AFR0R;
#[doc = "Possible values of the field `AFR7`"]
pub type AFR7R = AFR0R;
#[doc = "Values that can be written to the field `AFR0`"]
pub enum AFR0W {
#[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 AFR0W {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
AFR0W::AF0 => 0,
AFR0W::AF1 => 1,
AFR0W::AF2 => 2,
AFR0W::AF3 => 3,
AFR0W::AF4 => 4,
AFR0W::AF5 => 5,
AFR0W::AF6 => 6,
AFR0W::AF7 => 7,
AFR0W::AF8 => 8,
AFR0W::AF9 => 9,
AFR0W::AF10 => 10,
AFR0W::AF11 => 11,
AFR0W::AF12 => 12,
AFR0W::AF13 => 13,
AFR0W::AF14 => 14,
AFR0W::AF15 => 15,
}
}
}
#[doc = r" Proxy"]
pub struct _AFR0W<'a> {
w: &'a mut W,
}
impl<'a> _AFR0W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: AFR0W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline]
pub fn af0(self) -> &'a mut W {
self.variant(AFR0W::AF0)
}
#[doc = "AF1"]
#[inline]
pub fn af1(self) -> &'a mut W {
self.variant(AFR0W::AF1)
}
#[doc = "AF2"]
#[inline]
pub fn af2(self) -> &'a mut W {
self.variant(AFR0W::AF2)
}
#[doc = "AF3"]
#[inline]
pub fn af3(self) -> &'a mut W {
self.variant(AFR0W::AF3)
}
#[doc = "AF4"]
#[inline]
pub fn af4(self) -> &'a mut W {
self.variant(AFR0W::AF4)
}
#[doc = "AF5"]
#[inline]
pub fn af5(self) -> &'a mut W {
self.variant(AFR0W::AF5)
}
#[doc = "AF6"]
#[inline]
pub fn af6(self) -> &'a mut W {
self.variant(AFR0W::AF6)
}
#[doc = "AF7"]
#[inline]
pub fn af7(self) -> &'a mut W {
self.variant(AFR0W::AF7)
}
#[doc = "AF8"]
#[inline]
pub fn af8(self) -> &'a mut W {
self.variant(AFR0W::AF8)
}
#[doc = "AF9"]
#[inline]
pub fn af9(self) -> &'a mut W {
self.variant(AFR0W::AF9)
}
#[doc = "AF10"]
#[inline]
pub fn af10(self) -> &'a mut W {
self.variant(AFR0W::AF10)
}
#[doc = "AF11"]
#[inline]
pub fn af11(self) -> &'a mut W {
self.variant(AFR0W::AF11)
}
#[doc = "AF12"]
#[inline]
pub fn af12(self) -> &'a mut W {
self.variant(AFR0W::AF12)
}
#[doc = "AF13"]
#[inline]
pub fn af13(self) -> &'a mut W {
self.variant(AFR0W::AF13)
}
#[doc = "AF14"]
#[inline]
pub fn af14(self) -> &'a mut W {
self.variant(AFR0W::AF14)
}
#[doc = "AF15"]
#[inline]
pub fn af15(self) -> &'a mut W {
self.variant(AFR0W::AF15)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 0;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `AFR1`"]
pub type AFR1W = AFR0W;
#[doc = r" Proxy"]
pub struct _AFR1W<'a> {
w: &'a mut W,
}
impl<'a> _AFR1W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: AFR1W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline]
pub fn af0(self) -> &'a mut W {
self.variant(AFR0W::AF0)
}
#[doc = "AF1"]
#[inline]
pub fn af1(self) -> &'a mut W {
self.variant(AFR0W::AF1)
}
#[doc = "AF2"]
#[inline]
pub fn af2(self) -> &'a mut W {
self.variant(AFR0W::AF2)
}
#[doc = "AF3"]
#[inline]
pub fn af3(self) -> &'a mut W {
self.variant(AFR0W::AF3)
}
#[doc = "AF4"]
#[inline]
pub fn af4(self) -> &'a mut W {
self.variant(AFR0W::AF4)
}
#[doc = "AF5"]
#[inline]
pub fn af5(self) -> &'a mut W {
self.variant(AFR0W::AF5)
}
#[doc = "AF6"]
#[inline]
pub fn af6(self) -> &'a mut W {
self.variant(AFR0W::AF6)
}
#[doc = "AF7"]
#[inline]
pub fn af7(self) -> &'a mut W {
self.variant(AFR0W::AF7)
}
#[doc = "AF8"]
#[inline]
pub fn af8(self) -> &'a mut W {
self.variant(AFR0W::AF8)
}
#[doc = "AF9"]
#[inline]
pub fn af9(self) -> &'a mut W {
self.variant(AFR0W::AF9)
}
#[doc = "AF10"]
#[inline]
pub fn af10(self) -> &'a mut W {
self.variant(AFR0W::AF10)
}
#[doc = "AF11"]
#[inline]
pub fn af11(self) -> &'a mut W {
self.variant(AFR0W::AF11)
}
#[doc = "AF12"]
#[inline]
pub fn af12(self) -> &'a mut W {
self.variant(AFR0W::AF12)
}
#[doc = "AF13"]
#[inline]
pub fn af13(self) -> &'a mut W {
self.variant(AFR0W::AF13)
}
#[doc = "AF14"]
#[inline]
pub fn af14(self) -> &'a mut W {
self.variant(AFR0W::AF14)
}
#[doc = "AF15"]
#[inline]
pub fn af15(self) -> &'a mut W {
self.variant(AFR0W::AF15)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 4;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `AFR2`"]
pub type AFR2W = AFR0W;
#[doc = r" Proxy"]
pub struct _AFR2W<'a> {
w: &'a mut W,
}
impl<'a> _AFR2W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: AFR2W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline]
pub fn af0(self) -> &'a mut W {
self.variant(AFR0W::AF0)
}
#[doc = "AF1"]
#[inline]
pub fn af1(self) -> &'a mut W {
self.variant(AFR0W::AF1)
}
#[doc = "AF2"]
#[inline]
pub fn af2(self) -> &'a mut W {
self.variant(AFR0W::AF2)
}
#[doc = "AF3"]
#[inline]
pub fn af3(self) -> &'a mut W {
self.variant(AFR0W::AF3)
}
#[doc = "AF4"]
#[inline]
pub fn af4(self) -> &'a mut W {
self.variant(AFR0W::AF4)
}
#[doc = "AF5"]
#[inline]
pub fn af5(self) -> &'a mut W {
self.variant(AFR0W::AF5)
}
#[doc = "AF6"]
#[inline]
pub fn af6(self) -> &'a mut W {
self.variant(AFR0W::AF6)
}
#[doc = "AF7"]
#[inline]
pub fn af7(self) -> &'a mut W {
self.variant(AFR0W::AF7)
}
#[doc = "AF8"]
#[inline]
pub fn af8(self) -> &'a mut W {
self.variant(AFR0W::AF8)
}
#[doc = "AF9"]
#[inline]
pub fn af9(self) -> &'a mut W {
self.variant(AFR0W::AF9)
}
#[doc = "AF10"]
#[inline]
pub fn af10(self) -> &'a mut W {
self.variant(AFR0W::AF10)
}
#[doc = "AF11"]
#[inline]
pub fn af11(self) -> &'a mut W {
self.variant(AFR0W::AF11)
}
#[doc = "AF12"]
#[inline]
pub fn af12(self) -> &'a mut W {
self.variant(AFR0W::AF12)
}
#[doc = "AF13"]
#[inline]
pub fn af13(self) -> &'a mut W {
self.variant(AFR0W::AF13)
}
#[doc = "AF14"]
#[inline]
pub fn af14(self) -> &'a mut W {
self.variant(AFR0W::AF14)
}
#[doc = "AF15"]
#[inline]
pub fn af15(self) -> &'a mut W {
self.variant(AFR0W::AF15)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 8;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `AFR3`"]
pub type AFR3W = AFR0W;
#[doc = r" Proxy"]
pub struct _AFR3W<'a> {
w: &'a mut W,
}
impl<'a> _AFR3W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: AFR3W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline]
pub fn af0(self) -> &'a mut W {
self.variant(AFR0W::AF0)
}
#[doc = "AF1"]
#[inline]
pub fn af1(self) -> &'a mut W {
self.variant(AFR0W::AF1)
}
#[doc = "AF2"]
#[inline]
pub fn af2(self) -> &'a mut W {
self.variant(AFR0W::AF2)
}
#[doc = "AF3"]
#[inline]
pub fn af3(self) -> &'a mut W {
self.variant(AFR0W::AF3)
}
#[doc = "AF4"]
#[inline]
pub fn af4(self) -> &'a mut W {
self.variant(AFR0W::AF4)
}
#[doc = "AF5"]
#[inline]
pub fn af5(self) -> &'a mut W {
self.variant(AFR0W::AF5)
}
#[doc = "AF6"]
#[inline]
pub fn af6(self) -> &'a mut W {
self.variant(AFR0W::AF6)
}
#[doc = "AF7"]
#[inline]
pub fn af7(self) -> &'a mut W {
self.variant(AFR0W::AF7)
}
#[doc = "AF8"]
#[inline]
pub fn af8(self) -> &'a mut W {
self.variant(AFR0W::AF8)
}
#[doc = "AF9"]
#[inline]
pub fn af9(self) -> &'a mut W {
self.variant(AFR0W::AF9)
}
#[doc = "AF10"]
#[inline]
pub fn af10(self) -> &'a mut W {
self.variant(AFR0W::AF10)
}
#[doc = "AF11"]
#[inline]
pub fn af11(self) -> &'a mut W {
self.variant(AFR0W::AF11)
}
#[doc = "AF12"]
#[inline]
pub fn af12(self) -> &'a mut W {
self.variant(AFR0W::AF12)
}
#[doc = "AF13"]
#[inline]
pub fn af13(self) -> &'a mut W {
self.variant(AFR0W::AF13)
}
#[doc = "AF14"]
#[inline]
pub fn af14(self) -> &'a mut W {
self.variant(AFR0W::AF14)
}
#[doc = "AF15"]
#[inline]
pub fn af15(self) -> &'a mut W {
self.variant(AFR0W::AF15)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 12;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `AFR4`"]
pub type AFR4W = AFR0W;
#[doc = r" Proxy"]
pub struct _AFR4W<'a> {
w: &'a mut W,
}
impl<'a> _AFR4W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: AFR4W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline]
pub fn af0(self) -> &'a mut W {
self.variant(AFR0W::AF0)
}
#[doc = "AF1"]
#[inline]
pub fn af1(self) -> &'a mut W {
self.variant(AFR0W::AF1)
}
#[doc = "AF2"]
#[inline]
pub fn af2(self) -> &'a mut W {
self.variant(AFR0W::AF2)
}
#[doc = "AF3"]
#[inline]
pub fn af3(self) -> &'a mut W {
self.variant(AFR0W::AF3)
}
#[doc = "AF4"]
#[inline]
pub fn af4(self) -> &'a mut W {
self.variant(AFR0W::AF4)
}
#[doc = "AF5"]
#[inline]
pub fn af5(self) -> &'a mut W {
self.variant(AFR0W::AF5)
}
#[doc = "AF6"]
#[inline]
pub fn af6(self) -> &'a mut W {
self.variant(AFR0W::AF6)
}
#[doc = "AF7"]
#[inline]
pub fn af7(self) -> &'a mut W {
self.variant(AFR0W::AF7)
}
#[doc = "AF8"]
#[inline]
pub fn af8(self) -> &'a mut W {
self.variant(AFR0W::AF8)
}
#[doc = "AF9"]
#[inline]
pub fn af9(self) -> &'a mut W {
self.variant(AFR0W::AF9)
}
#[doc = "AF10"]
#[inline]
pub fn af10(self) -> &'a mut W {
self.variant(AFR0W::AF10)
}
#[doc = "AF11"]
#[inline]
pub fn af11(self) -> &'a mut W {
self.variant(AFR0W::AF11)
}
#[doc = "AF12"]
#[inline]
pub fn af12(self) -> &'a mut W {
self.variant(AFR0W::AF12)
}
#[doc = "AF13"]
#[inline]
pub fn af13(self) -> &'a mut W {
self.variant(AFR0W::AF13)
}
#[doc = "AF14"]
#[inline]
pub fn af14(self) -> &'a mut W {
self.variant(AFR0W::AF14)
}
#[doc = "AF15"]
#[inline]
pub fn af15(self) -> &'a mut W {
self.variant(AFR0W::AF15)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 16;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `AFR5`"]
pub type AFR5W = AFR0W;
#[doc = r" Proxy"]
pub struct _AFR5W<'a> {
w: &'a mut W,
}
impl<'a> _AFR5W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: AFR5W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline]
pub fn af0(self) -> &'a mut W {
self.variant(AFR0W::AF0)
}
#[doc = "AF1"]
#[inline]
pub fn af1(self) -> &'a mut W {
self.variant(AFR0W::AF1)
}
#[doc = "AF2"]
#[inline]
pub fn af2(self) -> &'a mut W {
self.variant(AFR0W::AF2)
}
#[doc = "AF3"]
#[inline]
pub fn af3(self) -> &'a mut W {
self.variant(AFR0W::AF3)
}
#[doc = "AF4"]
#[inline]
pub fn af4(self) -> &'a mut W {
self.variant(AFR0W::AF4)
}
#[doc = "AF5"]
#[inline]
pub fn af5(self) -> &'a mut W {
self.variant(AFR0W::AF5)
}
#[doc = "AF6"]
#[inline]
pub fn af6(self) -> &'a mut W {
self.variant(AFR0W::AF6)
}
#[doc = "AF7"]
#[inline]
pub fn af7(self) -> &'a mut W {
self.variant(AFR0W::AF7)
}
#[doc = "AF8"]
#[inline]
pub fn af8(self) -> &'a mut W {
self.variant(AFR0W::AF8)
}
#[doc = "AF9"]
#[inline]
pub fn af9(self) -> &'a mut W {
self.variant(AFR0W::AF9)
}
#[doc = "AF10"]
#[inline]
pub fn af10(self) -> &'a mut W {
self.variant(AFR0W::AF10)
}
#[doc = "AF11"]
#[inline]
pub fn af11(self) -> &'a mut W {
self.variant(AFR0W::AF11)
}
#[doc = "AF12"]
#[inline]
pub fn af12(self) -> &'a mut W {
self.variant(AFR0W::AF12)
}
#[doc = "AF13"]
#[inline]
pub fn af13(self) -> &'a mut W {
self.variant(AFR0W::AF13)
}
#[doc = "AF14"]
#[inline]
pub fn af14(self) -> &'a mut W {
self.variant(AFR0W::AF14)
}
#[doc = "AF15"]
#[inline]
pub fn af15(self) -> &'a mut W {
self.variant(AFR0W::AF15)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 20;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `AFR6`"]
pub type AFR6W = AFR0W;
#[doc = r" Proxy"]
pub struct _AFR6W<'a> {
w: &'a mut W,
}
impl<'a> _AFR6W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: AFR6W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline]
pub fn af0(self) -> &'a mut W {
self.variant(AFR0W::AF0)
}
#[doc = "AF1"]
#[inline]
pub fn af1(self) -> &'a mut W {
self.variant(AFR0W::AF1)
}
#[doc = "AF2"]
#[inline]
pub fn af2(self) -> &'a mut W {
self.variant(AFR0W::AF2)
}
#[doc = "AF3"]
#[inline]
pub fn af3(self) -> &'a mut W {
self.variant(AFR0W::AF3)
}
#[doc = "AF4"]
#[inline]
pub fn af4(self) -> &'a mut W {
self.variant(AFR0W::AF4)
}
#[doc = "AF5"]
#[inline]
pub fn af5(self) -> &'a mut W {
self.variant(AFR0W::AF5)
}
#[doc = "AF6"]
#[inline]
pub fn af6(self) -> &'a mut W {
self.variant(AFR0W::AF6)
}
#[doc = "AF7"]
#[inline]
pub fn af7(self) -> &'a mut W {
self.variant(AFR0W::AF7)
}
#[doc = "AF8"]
#[inline]
pub fn af8(self) -> &'a mut W {
self.variant(AFR0W::AF8)
}
#[doc = "AF9"]
#[inline]
pub fn af9(self) -> &'a mut W {
self.variant(AFR0W::AF9)
}
#[doc = "AF10"]
#[inline]
pub fn af10(self) -> &'a mut W {
self.variant(AFR0W::AF10)
}
#[doc = "AF11"]
#[inline]
pub fn af11(self) -> &'a mut W {
self.variant(AFR0W::AF11)
}
#[doc = "AF12"]
#[inline]
pub fn af12(self) -> &'a mut W {
self.variant(AFR0W::AF12)
}
#[doc = "AF13"]
#[inline]
pub fn af13(self) -> &'a mut W {
self.variant(AFR0W::AF13)
}
#[doc = "AF14"]
#[inline]
pub fn af14(self) -> &'a mut W {
self.variant(AFR0W::AF14)
}
#[doc = "AF15"]
#[inline]
pub fn af15(self) -> &'a mut W {
self.variant(AFR0W::AF15)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 24;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
#[doc = "Values that can be written to the field `AFR7`"]
pub type AFR7W = AFR0W;
#[doc = r" Proxy"]
pub struct _AFR7W<'a> {
w: &'a mut W,
}
impl<'a> _AFR7W<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: AFR7W) -> &'a mut W {
{
self.bits(variant._bits())
}
}
#[doc = "AF0"]
#[inline]
pub fn af0(self) -> &'a mut W {
self.variant(AFR0W::AF0)
}
#[doc = "AF1"]
#[inline]
pub fn af1(self) -> &'a mut W {
self.variant(AFR0W::AF1)
}
#[doc = "AF2"]
#[inline]
pub fn af2(self) -> &'a mut W {
self.variant(AFR0W::AF2)
}
#[doc = "AF3"]
#[inline]
pub fn af3(self) -> &'a mut W {
self.variant(AFR0W::AF3)
}
#[doc = "AF4"]
#[inline]
pub fn af4(self) -> &'a mut W {
self.variant(AFR0W::AF4)
}
#[doc = "AF5"]
#[inline]
pub fn af5(self) -> &'a mut W {
self.variant(AFR0W::AF5)
}
#[doc = "AF6"]
#[inline]
pub fn af6(self) -> &'a mut W {
self.variant(AFR0W::AF6)
}
#[doc = "AF7"]
#[inline]
pub fn af7(self) -> &'a mut W {
self.variant(AFR0W::AF7)
}
#[doc = "AF8"]
#[inline]
pub fn af8(self) -> &'a mut W {
self.variant(AFR0W::AF8)
}
#[doc = "AF9"]
#[inline]
pub fn af9(self) -> &'a mut W {
self.variant(AFR0W::AF9)
}
#[doc = "AF10"]
#[inline]
pub fn af10(self) -> &'a mut W {
self.variant(AFR0W::AF10)
}
#[doc = "AF11"]
#[inline]
pub fn af11(self) -> &'a mut W {
self.variant(AFR0W::AF11)
}
#[doc = "AF12"]
#[inline]
pub fn af12(self) -> &'a mut W {
self.variant(AFR0W::AF12)
}
#[doc = "AF13"]
#[inline]
pub fn af13(self) -> &'a mut W {
self.variant(AFR0W::AF13)
}
#[doc = "AF14"]
#[inline]
pub fn af14(self) -> &'a mut W {
self.variant(AFR0W::AF14)
}
#[doc = "AF15"]
#[inline]
pub fn af15(self) -> &'a mut W {
self.variant(AFR0W::AF15)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 15;
const OFFSET: u8 = 28;
self.w.bits &= !((MASK as u32) << OFFSET);
self.w.bits |= ((value & MASK) as u32) << OFFSET;
self.w
}
}
impl R {
#[doc = r" Value of the register as raw bits"]
#[inline]
pub fn bits(&self) -> u32 {
self.bits
}
#[doc = "Bits 0:3 - 3:0\\]: Alternate function selection for port x pin y (y = 0..7) These bits are written by software to configure alternate function I/Os AFSELy selection:"]
#[inline]
pub fn afr0(&self) -> AFR0R {
AFR0R::_from({
const MASK: u8 = 15;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 4:7 - 3:0\\]: Alternate function selection for port x pin y (y = 0..7) These bits are written by software to configure alternate function I/Os AFSELy selection:"]
#[inline]
pub fn afr1(&self) -> AFR1R {
AFR1R::_from({
const MASK: u8 = 15;
const OFFSET: u8 = 4;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 8:11 - 3:0\\]: Alternate function selection for port x pin y (y = 0..7) These bits are written by software to configure alternate function I/Os AFSELy selection:"]
#[inline]
pub fn afr2(&self) -> AFR2R {
AFR2R::_from({
const MASK: u8 = 15;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 12:15 - 3:0\\]: Alternate function selection for port x pin y (y = 0..7) These bits are written by software to configure alternate function I/Os AFSELy selection:"]
#[inline]
pub fn afr3(&self) -> AFR3R {
AFR3R::_from({
const MASK: u8 = 15;
const OFFSET: u8 = 12;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 16:19 - 3:0\\]: Alternate function selection for port x pin y (y = 0..7) These bits are written by software to configure alternate function I/Os AFSELy selection:"]
#[inline]
pub fn afr4(&self) -> AFR4R {
AFR4R::_from({
const MASK: u8 = 15;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 20:23 - 3:0\\]: Alternate function selection for port x pin y (y = 0..7) These bits are written by software to configure alternate function I/Os AFSELy selection:"]
#[inline]
pub fn afr5(&self) -> AFR5R {
AFR5R::_from({
const MASK: u8 = 15;
const OFFSET: u8 = 20;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 24:27 - 3:0\\]: Alternate function selection for port x pin y (y = 0..7) These bits are written by software to configure alternate function I/Os AFSELy selection:"]
#[inline]
pub fn afr6(&self) -> AFR6R {
AFR6R::_from({
const MASK: u8 = 15;
const OFFSET: u8 = 24;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 28:31 - 3:0\\]: Alternate function selection for port x pin y (y = 0..7) These bits are written by software to configure alternate function I/Os AFSELy selection:"]
#[inline]
pub fn afr7(&self) -> AFR7R {
AFR7R::_from({
const MASK: u8 = 15;
const OFFSET: u8 = 28;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
}
impl W {
#[doc = r" Reset value of the register"]
#[inline]
pub fn reset_value() -> W {
W { bits: 0 }
}
#[doc = r" Writes raw bits to the register"]
#[inline]
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 = 0..7) These bits are written by software to configure alternate function I/Os AFSELy selection:"]
#[inline]
pub fn afr0(&mut self) -> _AFR0W {
_AFR0W { w: self }
}
#[doc = "Bits 4:7 - 3:0\\]: Alternate function selection for port x pin y (y = 0..7) These bits are written by software to configure alternate function I/Os AFSELy selection:"]
#[inline]
pub fn afr1(&mut self) -> _AFR1W {
_AFR1W { w: self }
}
#[doc = "Bits 8:11 - 3:0\\]: Alternate function selection for port x pin y (y = 0..7) These bits are written by software to configure alternate function I/Os AFSELy selection:"]
#[inline]
pub fn afr2(&mut self) -> _AFR2W {
_AFR2W { w: self }
}
#[doc = "Bits 12:15 - 3:0\\]: Alternate function selection for port x pin y (y = 0..7) These bits are written by software to configure alternate function I/Os AFSELy selection:"]
#[inline]
pub fn afr3(&mut self) -> _AFR3W {
_AFR3W { w: self }
}
#[doc = "Bits 16:19 - 3:0\\]: Alternate function selection for port x pin y (y = 0..7) These bits are written by software to configure alternate function I/Os AFSELy selection:"]
#[inline]
pub fn afr4(&mut self) -> _AFR4W {
_AFR4W { w: self }
}
#[doc = "Bits 20:23 - 3:0\\]: Alternate function selection for port x pin y (y = 0..7) These bits are written by software to configure alternate function I/Os AFSELy selection:"]
#[inline]
pub fn afr5(&mut self) -> _AFR5W {
_AFR5W { w: self }
}
#[doc = "Bits 24:27 - 3:0\\]: Alternate function selection for port x pin y (y = 0..7) These bits are written by software to configure alternate function I/Os AFSELy selection:"]
#[inline]
pub fn afr6(&mut self) -> _AFR6W {
_AFR6W { w: self }
}
#[doc = "Bits 28:31 - 3:0\\]: Alternate function selection for port x pin y (y = 0..7) These bits are written by software to configure alternate function I/Os AFSELy selection:"]
#[inline]
pub fn afr7(&mut self) -> _AFR7W {
_AFR7W { w: self }
}
}