#[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::ROUTELOC0 {
#[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 `CH0LOC`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH0LOCR {
#[doc = "Location 0"]
LOC0,
#[doc = "Location 1"]
LOC1,
#[doc = "Location 2"]
LOC2,
#[doc = "Location 3"]
LOC3,
#[doc = "Location 4"]
LOC4,
#[doc = "Location 5"]
LOC5,
#[doc = "Location 6"]
LOC6,
#[doc = "Location 7"]
LOC7,
#[doc = "Location 8"]
LOC8,
#[doc = "Location 9"]
LOC9,
#[doc = "Location 10"]
LOC10,
#[doc = "Location 11"]
LOC11,
#[doc = "Location 12"]
LOC12,
#[doc = "Location 13"]
LOC13,
#[doc = r" Reserved"]
_Reserved(u8),
}
impl CH0LOCR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
CH0LOCR::LOC0 => 0,
CH0LOCR::LOC1 => 1,
CH0LOCR::LOC2 => 2,
CH0LOCR::LOC3 => 3,
CH0LOCR::LOC4 => 4,
CH0LOCR::LOC5 => 5,
CH0LOCR::LOC6 => 6,
CH0LOCR::LOC7 => 7,
CH0LOCR::LOC8 => 8,
CH0LOCR::LOC9 => 9,
CH0LOCR::LOC10 => 10,
CH0LOCR::LOC11 => 11,
CH0LOCR::LOC12 => 12,
CH0LOCR::LOC13 => 13,
CH0LOCR::_Reserved(bits) => bits,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> CH0LOCR {
match value {
0 => CH0LOCR::LOC0,
1 => CH0LOCR::LOC1,
2 => CH0LOCR::LOC2,
3 => CH0LOCR::LOC3,
4 => CH0LOCR::LOC4,
5 => CH0LOCR::LOC5,
6 => CH0LOCR::LOC6,
7 => CH0LOCR::LOC7,
8 => CH0LOCR::LOC8,
9 => CH0LOCR::LOC9,
10 => CH0LOCR::LOC10,
11 => CH0LOCR::LOC11,
12 => CH0LOCR::LOC12,
13 => CH0LOCR::LOC13,
i => CH0LOCR::_Reserved(i),
}
}
#[doc = "Checks if the value of the field is `LOC0`"]
#[inline]
pub fn is_loc0(&self) -> bool {
*self == CH0LOCR::LOC0
}
#[doc = "Checks if the value of the field is `LOC1`"]
#[inline]
pub fn is_loc1(&self) -> bool {
*self == CH0LOCR::LOC1
}
#[doc = "Checks if the value of the field is `LOC2`"]
#[inline]
pub fn is_loc2(&self) -> bool {
*self == CH0LOCR::LOC2
}
#[doc = "Checks if the value of the field is `LOC3`"]
#[inline]
pub fn is_loc3(&self) -> bool {
*self == CH0LOCR::LOC3
}
#[doc = "Checks if the value of the field is `LOC4`"]
#[inline]
pub fn is_loc4(&self) -> bool {
*self == CH0LOCR::LOC4
}
#[doc = "Checks if the value of the field is `LOC5`"]
#[inline]
pub fn is_loc5(&self) -> bool {
*self == CH0LOCR::LOC5
}
#[doc = "Checks if the value of the field is `LOC6`"]
#[inline]
pub fn is_loc6(&self) -> bool {
*self == CH0LOCR::LOC6
}
#[doc = "Checks if the value of the field is `LOC7`"]
#[inline]
pub fn is_loc7(&self) -> bool {
*self == CH0LOCR::LOC7
}
#[doc = "Checks if the value of the field is `LOC8`"]
#[inline]
pub fn is_loc8(&self) -> bool {
*self == CH0LOCR::LOC8
}
#[doc = "Checks if the value of the field is `LOC9`"]
#[inline]
pub fn is_loc9(&self) -> bool {
*self == CH0LOCR::LOC9
}
#[doc = "Checks if the value of the field is `LOC10`"]
#[inline]
pub fn is_loc10(&self) -> bool {
*self == CH0LOCR::LOC10
}
#[doc = "Checks if the value of the field is `LOC11`"]
#[inline]
pub fn is_loc11(&self) -> bool {
*self == CH0LOCR::LOC11
}
#[doc = "Checks if the value of the field is `LOC12`"]
#[inline]
pub fn is_loc12(&self) -> bool {
*self == CH0LOCR::LOC12
}
#[doc = "Checks if the value of the field is `LOC13`"]
#[inline]
pub fn is_loc13(&self) -> bool {
*self == CH0LOCR::LOC13
}
}
#[doc = "Possible values of the field `CH1LOC`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH1LOCR {
#[doc = "Location 0"]
LOC0,
#[doc = "Location 1"]
LOC1,
#[doc = "Location 2"]
LOC2,
#[doc = "Location 3"]
LOC3,
#[doc = "Location 4"]
LOC4,
#[doc = "Location 5"]
LOC5,
#[doc = "Location 6"]
LOC6,
#[doc = "Location 7"]
LOC7,
#[doc = r" Reserved"]
_Reserved(u8),
}
impl CH1LOCR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
CH1LOCR::LOC0 => 0,
CH1LOCR::LOC1 => 1,
CH1LOCR::LOC2 => 2,
CH1LOCR::LOC3 => 3,
CH1LOCR::LOC4 => 4,
CH1LOCR::LOC5 => 5,
CH1LOCR::LOC6 => 6,
CH1LOCR::LOC7 => 7,
CH1LOCR::_Reserved(bits) => bits,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> CH1LOCR {
match value {
0 => CH1LOCR::LOC0,
1 => CH1LOCR::LOC1,
2 => CH1LOCR::LOC2,
3 => CH1LOCR::LOC3,
4 => CH1LOCR::LOC4,
5 => CH1LOCR::LOC5,
6 => CH1LOCR::LOC6,
7 => CH1LOCR::LOC7,
i => CH1LOCR::_Reserved(i),
}
}
#[doc = "Checks if the value of the field is `LOC0`"]
#[inline]
pub fn is_loc0(&self) -> bool {
*self == CH1LOCR::LOC0
}
#[doc = "Checks if the value of the field is `LOC1`"]
#[inline]
pub fn is_loc1(&self) -> bool {
*self == CH1LOCR::LOC1
}
#[doc = "Checks if the value of the field is `LOC2`"]
#[inline]
pub fn is_loc2(&self) -> bool {
*self == CH1LOCR::LOC2
}
#[doc = "Checks if the value of the field is `LOC3`"]
#[inline]
pub fn is_loc3(&self) -> bool {
*self == CH1LOCR::LOC3
}
#[doc = "Checks if the value of the field is `LOC4`"]
#[inline]
pub fn is_loc4(&self) -> bool {
*self == CH1LOCR::LOC4
}
#[doc = "Checks if the value of the field is `LOC5`"]
#[inline]
pub fn is_loc5(&self) -> bool {
*self == CH1LOCR::LOC5
}
#[doc = "Checks if the value of the field is `LOC6`"]
#[inline]
pub fn is_loc6(&self) -> bool {
*self == CH1LOCR::LOC6
}
#[doc = "Checks if the value of the field is `LOC7`"]
#[inline]
pub fn is_loc7(&self) -> bool {
*self == CH1LOCR::LOC7
}
}
#[doc = "Possible values of the field `CH2LOC`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH2LOCR {
#[doc = "Location 0"]
LOC0,
#[doc = "Location 1"]
LOC1,
#[doc = "Location 2"]
LOC2,
#[doc = "Location 3"]
LOC3,
#[doc = "Location 4"]
LOC4,
#[doc = "Location 5"]
LOC5,
#[doc = "Location 6"]
LOC6,
#[doc = "Location 7"]
LOC7,
#[doc = r" Reserved"]
_Reserved(u8),
}
impl CH2LOCR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
CH2LOCR::LOC0 => 0,
CH2LOCR::LOC1 => 1,
CH2LOCR::LOC2 => 2,
CH2LOCR::LOC3 => 3,
CH2LOCR::LOC4 => 4,
CH2LOCR::LOC5 => 5,
CH2LOCR::LOC6 => 6,
CH2LOCR::LOC7 => 7,
CH2LOCR::_Reserved(bits) => bits,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> CH2LOCR {
match value {
0 => CH2LOCR::LOC0,
1 => CH2LOCR::LOC1,
2 => CH2LOCR::LOC2,
3 => CH2LOCR::LOC3,
4 => CH2LOCR::LOC4,
5 => CH2LOCR::LOC5,
6 => CH2LOCR::LOC6,
7 => CH2LOCR::LOC7,
i => CH2LOCR::_Reserved(i),
}
}
#[doc = "Checks if the value of the field is `LOC0`"]
#[inline]
pub fn is_loc0(&self) -> bool {
*self == CH2LOCR::LOC0
}
#[doc = "Checks if the value of the field is `LOC1`"]
#[inline]
pub fn is_loc1(&self) -> bool {
*self == CH2LOCR::LOC1
}
#[doc = "Checks if the value of the field is `LOC2`"]
#[inline]
pub fn is_loc2(&self) -> bool {
*self == CH2LOCR::LOC2
}
#[doc = "Checks if the value of the field is `LOC3`"]
#[inline]
pub fn is_loc3(&self) -> bool {
*self == CH2LOCR::LOC3
}
#[doc = "Checks if the value of the field is `LOC4`"]
#[inline]
pub fn is_loc4(&self) -> bool {
*self == CH2LOCR::LOC4
}
#[doc = "Checks if the value of the field is `LOC5`"]
#[inline]
pub fn is_loc5(&self) -> bool {
*self == CH2LOCR::LOC5
}
#[doc = "Checks if the value of the field is `LOC6`"]
#[inline]
pub fn is_loc6(&self) -> bool {
*self == CH2LOCR::LOC6
}
#[doc = "Checks if the value of the field is `LOC7`"]
#[inline]
pub fn is_loc7(&self) -> bool {
*self == CH2LOCR::LOC7
}
}
#[doc = "Possible values of the field `CH3LOC`"]
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum CH3LOCR {
#[doc = "Location 0"]
LOC0,
#[doc = "Location 1"]
LOC1,
#[doc = "Location 2"]
LOC2,
#[doc = "Location 3"]
LOC3,
#[doc = "Location 4"]
LOC4,
#[doc = "Location 5"]
LOC5,
#[doc = "Location 6"]
LOC6,
#[doc = "Location 7"]
LOC7,
#[doc = "Location 8"]
LOC8,
#[doc = "Location 9"]
LOC9,
#[doc = "Location 10"]
LOC10,
#[doc = "Location 11"]
LOC11,
#[doc = "Location 12"]
LOC12,
#[doc = "Location 13"]
LOC13,
#[doc = "Location 14"]
LOC14,
#[doc = r" Reserved"]
_Reserved(u8),
}
impl CH3LOCR {
#[doc = r" Value of the field as raw bits"]
#[inline]
pub fn bits(&self) -> u8 {
match *self {
CH3LOCR::LOC0 => 0,
CH3LOCR::LOC1 => 1,
CH3LOCR::LOC2 => 2,
CH3LOCR::LOC3 => 3,
CH3LOCR::LOC4 => 4,
CH3LOCR::LOC5 => 5,
CH3LOCR::LOC6 => 6,
CH3LOCR::LOC7 => 7,
CH3LOCR::LOC8 => 8,
CH3LOCR::LOC9 => 9,
CH3LOCR::LOC10 => 10,
CH3LOCR::LOC11 => 11,
CH3LOCR::LOC12 => 12,
CH3LOCR::LOC13 => 13,
CH3LOCR::LOC14 => 14,
CH3LOCR::_Reserved(bits) => bits,
}
}
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _from(value: u8) -> CH3LOCR {
match value {
0 => CH3LOCR::LOC0,
1 => CH3LOCR::LOC1,
2 => CH3LOCR::LOC2,
3 => CH3LOCR::LOC3,
4 => CH3LOCR::LOC4,
5 => CH3LOCR::LOC5,
6 => CH3LOCR::LOC6,
7 => CH3LOCR::LOC7,
8 => CH3LOCR::LOC8,
9 => CH3LOCR::LOC9,
10 => CH3LOCR::LOC10,
11 => CH3LOCR::LOC11,
12 => CH3LOCR::LOC12,
13 => CH3LOCR::LOC13,
14 => CH3LOCR::LOC14,
i => CH3LOCR::_Reserved(i),
}
}
#[doc = "Checks if the value of the field is `LOC0`"]
#[inline]
pub fn is_loc0(&self) -> bool {
*self == CH3LOCR::LOC0
}
#[doc = "Checks if the value of the field is `LOC1`"]
#[inline]
pub fn is_loc1(&self) -> bool {
*self == CH3LOCR::LOC1
}
#[doc = "Checks if the value of the field is `LOC2`"]
#[inline]
pub fn is_loc2(&self) -> bool {
*self == CH3LOCR::LOC2
}
#[doc = "Checks if the value of the field is `LOC3`"]
#[inline]
pub fn is_loc3(&self) -> bool {
*self == CH3LOCR::LOC3
}
#[doc = "Checks if the value of the field is `LOC4`"]
#[inline]
pub fn is_loc4(&self) -> bool {
*self == CH3LOCR::LOC4
}
#[doc = "Checks if the value of the field is `LOC5`"]
#[inline]
pub fn is_loc5(&self) -> bool {
*self == CH3LOCR::LOC5
}
#[doc = "Checks if the value of the field is `LOC6`"]
#[inline]
pub fn is_loc6(&self) -> bool {
*self == CH3LOCR::LOC6
}
#[doc = "Checks if the value of the field is `LOC7`"]
#[inline]
pub fn is_loc7(&self) -> bool {
*self == CH3LOCR::LOC7
}
#[doc = "Checks if the value of the field is `LOC8`"]
#[inline]
pub fn is_loc8(&self) -> bool {
*self == CH3LOCR::LOC8
}
#[doc = "Checks if the value of the field is `LOC9`"]
#[inline]
pub fn is_loc9(&self) -> bool {
*self == CH3LOCR::LOC9
}
#[doc = "Checks if the value of the field is `LOC10`"]
#[inline]
pub fn is_loc10(&self) -> bool {
*self == CH3LOCR::LOC10
}
#[doc = "Checks if the value of the field is `LOC11`"]
#[inline]
pub fn is_loc11(&self) -> bool {
*self == CH3LOCR::LOC11
}
#[doc = "Checks if the value of the field is `LOC12`"]
#[inline]
pub fn is_loc12(&self) -> bool {
*self == CH3LOCR::LOC12
}
#[doc = "Checks if the value of the field is `LOC13`"]
#[inline]
pub fn is_loc13(&self) -> bool {
*self == CH3LOCR::LOC13
}
#[doc = "Checks if the value of the field is `LOC14`"]
#[inline]
pub fn is_loc14(&self) -> bool {
*self == CH3LOCR::LOC14
}
}
#[doc = "Values that can be written to the field `CH0LOC`"]
pub enum CH0LOCW {
#[doc = "Location 0"]
LOC0,
#[doc = "Location 1"]
LOC1,
#[doc = "Location 2"]
LOC2,
#[doc = "Location 3"]
LOC3,
#[doc = "Location 4"]
LOC4,
#[doc = "Location 5"]
LOC5,
#[doc = "Location 6"]
LOC6,
#[doc = "Location 7"]
LOC7,
#[doc = "Location 8"]
LOC8,
#[doc = "Location 9"]
LOC9,
#[doc = "Location 10"]
LOC10,
#[doc = "Location 11"]
LOC11,
#[doc = "Location 12"]
LOC12,
#[doc = "Location 13"]
LOC13,
}
impl CH0LOCW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
CH0LOCW::LOC0 => 0,
CH0LOCW::LOC1 => 1,
CH0LOCW::LOC2 => 2,
CH0LOCW::LOC3 => 3,
CH0LOCW::LOC4 => 4,
CH0LOCW::LOC5 => 5,
CH0LOCW::LOC6 => 6,
CH0LOCW::LOC7 => 7,
CH0LOCW::LOC8 => 8,
CH0LOCW::LOC9 => 9,
CH0LOCW::LOC10 => 10,
CH0LOCW::LOC11 => 11,
CH0LOCW::LOC12 => 12,
CH0LOCW::LOC13 => 13,
}
}
}
#[doc = r" Proxy"]
pub struct _CH0LOCW<'a> {
w: &'a mut W,
}
impl<'a> _CH0LOCW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: CH0LOCW) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "Location 0"]
#[inline]
pub fn loc0(self) -> &'a mut W {
self.variant(CH0LOCW::LOC0)
}
#[doc = "Location 1"]
#[inline]
pub fn loc1(self) -> &'a mut W {
self.variant(CH0LOCW::LOC1)
}
#[doc = "Location 2"]
#[inline]
pub fn loc2(self) -> &'a mut W {
self.variant(CH0LOCW::LOC2)
}
#[doc = "Location 3"]
#[inline]
pub fn loc3(self) -> &'a mut W {
self.variant(CH0LOCW::LOC3)
}
#[doc = "Location 4"]
#[inline]
pub fn loc4(self) -> &'a mut W {
self.variant(CH0LOCW::LOC4)
}
#[doc = "Location 5"]
#[inline]
pub fn loc5(self) -> &'a mut W {
self.variant(CH0LOCW::LOC5)
}
#[doc = "Location 6"]
#[inline]
pub fn loc6(self) -> &'a mut W {
self.variant(CH0LOCW::LOC6)
}
#[doc = "Location 7"]
#[inline]
pub fn loc7(self) -> &'a mut W {
self.variant(CH0LOCW::LOC7)
}
#[doc = "Location 8"]
#[inline]
pub fn loc8(self) -> &'a mut W {
self.variant(CH0LOCW::LOC8)
}
#[doc = "Location 9"]
#[inline]
pub fn loc9(self) -> &'a mut W {
self.variant(CH0LOCW::LOC9)
}
#[doc = "Location 10"]
#[inline]
pub fn loc10(self) -> &'a mut W {
self.variant(CH0LOCW::LOC10)
}
#[doc = "Location 11"]
#[inline]
pub fn loc11(self) -> &'a mut W {
self.variant(CH0LOCW::LOC11)
}
#[doc = "Location 12"]
#[inline]
pub fn loc12(self) -> &'a mut W {
self.variant(CH0LOCW::LOC12)
}
#[doc = "Location 13"]
#[inline]
pub fn loc13(self) -> &'a mut W {
self.variant(CH0LOCW::LOC13)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 63;
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 `CH1LOC`"]
pub enum CH1LOCW {
#[doc = "Location 0"]
LOC0,
#[doc = "Location 1"]
LOC1,
#[doc = "Location 2"]
LOC2,
#[doc = "Location 3"]
LOC3,
#[doc = "Location 4"]
LOC4,
#[doc = "Location 5"]
LOC5,
#[doc = "Location 6"]
LOC6,
#[doc = "Location 7"]
LOC7,
}
impl CH1LOCW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
CH1LOCW::LOC0 => 0,
CH1LOCW::LOC1 => 1,
CH1LOCW::LOC2 => 2,
CH1LOCW::LOC3 => 3,
CH1LOCW::LOC4 => 4,
CH1LOCW::LOC5 => 5,
CH1LOCW::LOC6 => 6,
CH1LOCW::LOC7 => 7,
}
}
}
#[doc = r" Proxy"]
pub struct _CH1LOCW<'a> {
w: &'a mut W,
}
impl<'a> _CH1LOCW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: CH1LOCW) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "Location 0"]
#[inline]
pub fn loc0(self) -> &'a mut W {
self.variant(CH1LOCW::LOC0)
}
#[doc = "Location 1"]
#[inline]
pub fn loc1(self) -> &'a mut W {
self.variant(CH1LOCW::LOC1)
}
#[doc = "Location 2"]
#[inline]
pub fn loc2(self) -> &'a mut W {
self.variant(CH1LOCW::LOC2)
}
#[doc = "Location 3"]
#[inline]
pub fn loc3(self) -> &'a mut W {
self.variant(CH1LOCW::LOC3)
}
#[doc = "Location 4"]
#[inline]
pub fn loc4(self) -> &'a mut W {
self.variant(CH1LOCW::LOC4)
}
#[doc = "Location 5"]
#[inline]
pub fn loc5(self) -> &'a mut W {
self.variant(CH1LOCW::LOC5)
}
#[doc = "Location 6"]
#[inline]
pub fn loc6(self) -> &'a mut W {
self.variant(CH1LOCW::LOC6)
}
#[doc = "Location 7"]
#[inline]
pub fn loc7(self) -> &'a mut W {
self.variant(CH1LOCW::LOC7)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 63;
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 `CH2LOC`"]
pub enum CH2LOCW {
#[doc = "Location 0"]
LOC0,
#[doc = "Location 1"]
LOC1,
#[doc = "Location 2"]
LOC2,
#[doc = "Location 3"]
LOC3,
#[doc = "Location 4"]
LOC4,
#[doc = "Location 5"]
LOC5,
#[doc = "Location 6"]
LOC6,
#[doc = "Location 7"]
LOC7,
}
impl CH2LOCW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
CH2LOCW::LOC0 => 0,
CH2LOCW::LOC1 => 1,
CH2LOCW::LOC2 => 2,
CH2LOCW::LOC3 => 3,
CH2LOCW::LOC4 => 4,
CH2LOCW::LOC5 => 5,
CH2LOCW::LOC6 => 6,
CH2LOCW::LOC7 => 7,
}
}
}
#[doc = r" Proxy"]
pub struct _CH2LOCW<'a> {
w: &'a mut W,
}
impl<'a> _CH2LOCW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: CH2LOCW) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "Location 0"]
#[inline]
pub fn loc0(self) -> &'a mut W {
self.variant(CH2LOCW::LOC0)
}
#[doc = "Location 1"]
#[inline]
pub fn loc1(self) -> &'a mut W {
self.variant(CH2LOCW::LOC1)
}
#[doc = "Location 2"]
#[inline]
pub fn loc2(self) -> &'a mut W {
self.variant(CH2LOCW::LOC2)
}
#[doc = "Location 3"]
#[inline]
pub fn loc3(self) -> &'a mut W {
self.variant(CH2LOCW::LOC3)
}
#[doc = "Location 4"]
#[inline]
pub fn loc4(self) -> &'a mut W {
self.variant(CH2LOCW::LOC4)
}
#[doc = "Location 5"]
#[inline]
pub fn loc5(self) -> &'a mut W {
self.variant(CH2LOCW::LOC5)
}
#[doc = "Location 6"]
#[inline]
pub fn loc6(self) -> &'a mut W {
self.variant(CH2LOCW::LOC6)
}
#[doc = "Location 7"]
#[inline]
pub fn loc7(self) -> &'a mut W {
self.variant(CH2LOCW::LOC7)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 63;
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 `CH3LOC`"]
pub enum CH3LOCW {
#[doc = "Location 0"]
LOC0,
#[doc = "Location 1"]
LOC1,
#[doc = "Location 2"]
LOC2,
#[doc = "Location 3"]
LOC3,
#[doc = "Location 4"]
LOC4,
#[doc = "Location 5"]
LOC5,
#[doc = "Location 6"]
LOC6,
#[doc = "Location 7"]
LOC7,
#[doc = "Location 8"]
LOC8,
#[doc = "Location 9"]
LOC9,
#[doc = "Location 10"]
LOC10,
#[doc = "Location 11"]
LOC11,
#[doc = "Location 12"]
LOC12,
#[doc = "Location 13"]
LOC13,
#[doc = "Location 14"]
LOC14,
}
impl CH3LOCW {
#[allow(missing_docs)]
#[doc(hidden)]
#[inline]
pub fn _bits(&self) -> u8 {
match *self {
CH3LOCW::LOC0 => 0,
CH3LOCW::LOC1 => 1,
CH3LOCW::LOC2 => 2,
CH3LOCW::LOC3 => 3,
CH3LOCW::LOC4 => 4,
CH3LOCW::LOC5 => 5,
CH3LOCW::LOC6 => 6,
CH3LOCW::LOC7 => 7,
CH3LOCW::LOC8 => 8,
CH3LOCW::LOC9 => 9,
CH3LOCW::LOC10 => 10,
CH3LOCW::LOC11 => 11,
CH3LOCW::LOC12 => 12,
CH3LOCW::LOC13 => 13,
CH3LOCW::LOC14 => 14,
}
}
}
#[doc = r" Proxy"]
pub struct _CH3LOCW<'a> {
w: &'a mut W,
}
impl<'a> _CH3LOCW<'a> {
#[doc = r" Writes `variant` to the field"]
#[inline]
pub fn variant(self, variant: CH3LOCW) -> &'a mut W {
unsafe { self.bits(variant._bits()) }
}
#[doc = "Location 0"]
#[inline]
pub fn loc0(self) -> &'a mut W {
self.variant(CH3LOCW::LOC0)
}
#[doc = "Location 1"]
#[inline]
pub fn loc1(self) -> &'a mut W {
self.variant(CH3LOCW::LOC1)
}
#[doc = "Location 2"]
#[inline]
pub fn loc2(self) -> &'a mut W {
self.variant(CH3LOCW::LOC2)
}
#[doc = "Location 3"]
#[inline]
pub fn loc3(self) -> &'a mut W {
self.variant(CH3LOCW::LOC3)
}
#[doc = "Location 4"]
#[inline]
pub fn loc4(self) -> &'a mut W {
self.variant(CH3LOCW::LOC4)
}
#[doc = "Location 5"]
#[inline]
pub fn loc5(self) -> &'a mut W {
self.variant(CH3LOCW::LOC5)
}
#[doc = "Location 6"]
#[inline]
pub fn loc6(self) -> &'a mut W {
self.variant(CH3LOCW::LOC6)
}
#[doc = "Location 7"]
#[inline]
pub fn loc7(self) -> &'a mut W {
self.variant(CH3LOCW::LOC7)
}
#[doc = "Location 8"]
#[inline]
pub fn loc8(self) -> &'a mut W {
self.variant(CH3LOCW::LOC8)
}
#[doc = "Location 9"]
#[inline]
pub fn loc9(self) -> &'a mut W {
self.variant(CH3LOCW::LOC9)
}
#[doc = "Location 10"]
#[inline]
pub fn loc10(self) -> &'a mut W {
self.variant(CH3LOCW::LOC10)
}
#[doc = "Location 11"]
#[inline]
pub fn loc11(self) -> &'a mut W {
self.variant(CH3LOCW::LOC11)
}
#[doc = "Location 12"]
#[inline]
pub fn loc12(self) -> &'a mut W {
self.variant(CH3LOCW::LOC12)
}
#[doc = "Location 13"]
#[inline]
pub fn loc13(self) -> &'a mut W {
self.variant(CH3LOCW::LOC13)
}
#[doc = "Location 14"]
#[inline]
pub fn loc14(self) -> &'a mut W {
self.variant(CH3LOCW::LOC14)
}
#[doc = r" Writes raw bits to the field"]
#[inline]
pub unsafe fn bits(self, value: u8) -> &'a mut W {
const MASK: u8 = 63;
const OFFSET: u8 = 24;
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:5 - I/O Location"]
#[inline]
pub fn ch0loc(&self) -> CH0LOCR {
CH0LOCR::_from({
const MASK: u8 = 63;
const OFFSET: u8 = 0;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 8:13 - I/O Location"]
#[inline]
pub fn ch1loc(&self) -> CH1LOCR {
CH1LOCR::_from({
const MASK: u8 = 63;
const OFFSET: u8 = 8;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 16:21 - I/O Location"]
#[inline]
pub fn ch2loc(&self) -> CH2LOCR {
CH2LOCR::_from({
const MASK: u8 = 63;
const OFFSET: u8 = 16;
((self.bits >> OFFSET) & MASK as u32) as u8
})
}
#[doc = "Bits 24:29 - I/O Location"]
#[inline]
pub fn ch3loc(&self) -> CH3LOCR {
CH3LOCR::_from({
const MASK: u8 = 63;
const OFFSET: u8 = 24;
((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:5 - I/O Location"]
#[inline]
pub fn ch0loc(&mut self) -> _CH0LOCW {
_CH0LOCW { w: self }
}
#[doc = "Bits 8:13 - I/O Location"]
#[inline]
pub fn ch1loc(&mut self) -> _CH1LOCW {
_CH1LOCW { w: self }
}
#[doc = "Bits 16:21 - I/O Location"]
#[inline]
pub fn ch2loc(&mut self) -> _CH2LOCW {
_CH2LOCW { w: self }
}
#[doc = "Bits 24:29 - I/O Location"]
#[inline]
pub fn ch3loc(&mut self) -> _CH3LOCW {
_CH3LOCW { w: self }
}
}