pub type R = crate::R<ROUTELOC1rs>;
pub type W = crate::W<ROUTELOC1rs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum CH4LOC {
Loc0 = 0,
Loc1 = 1,
Loc2 = 2,
Loc3 = 3,
Loc4 = 4,
Loc5 = 5,
Loc6 = 6,
}
impl From<CH4LOC> for u8 {
#[inline(always)]
fn from(variant: CH4LOC) -> Self {
variant as _
}
}
impl crate::FieldSpec for CH4LOC {
type Ux = u8;
}
impl crate::IsEnum for CH4LOC {}
pub type Ch4locR = crate::FieldReader<CH4LOC>;
impl Ch4locR {
#[inline(always)]
pub const fn variant(&self) -> Option<CH4LOC> {
match self.bits {
0 => Some(CH4LOC::Loc0),
1 => Some(CH4LOC::Loc1),
2 => Some(CH4LOC::Loc2),
3 => Some(CH4LOC::Loc3),
4 => Some(CH4LOC::Loc4),
5 => Some(CH4LOC::Loc5),
6 => Some(CH4LOC::Loc6),
_ => None,
}
}
#[inline(always)]
pub fn is_loc0(&self) -> bool {
*self == CH4LOC::Loc0
}
#[inline(always)]
pub fn is_loc1(&self) -> bool {
*self == CH4LOC::Loc1
}
#[inline(always)]
pub fn is_loc2(&self) -> bool {
*self == CH4LOC::Loc2
}
#[inline(always)]
pub fn is_loc3(&self) -> bool {
*self == CH4LOC::Loc3
}
#[inline(always)]
pub fn is_loc4(&self) -> bool {
*self == CH4LOC::Loc4
}
#[inline(always)]
pub fn is_loc5(&self) -> bool {
*self == CH4LOC::Loc5
}
#[inline(always)]
pub fn is_loc6(&self) -> bool {
*self == CH4LOC::Loc6
}
}
pub type Ch4locW<'a, REG> = crate::FieldWriter<'a, REG, 6, CH4LOC>;
impl<'a, REG> Ch4locW<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn loc0(self) -> &'a mut crate::W<REG> {
self.variant(CH4LOC::Loc0)
}
#[inline(always)]
pub fn loc1(self) -> &'a mut crate::W<REG> {
self.variant(CH4LOC::Loc1)
}
#[inline(always)]
pub fn loc2(self) -> &'a mut crate::W<REG> {
self.variant(CH4LOC::Loc2)
}
#[inline(always)]
pub fn loc3(self) -> &'a mut crate::W<REG> {
self.variant(CH4LOC::Loc3)
}
#[inline(always)]
pub fn loc4(self) -> &'a mut crate::W<REG> {
self.variant(CH4LOC::Loc4)
}
#[inline(always)]
pub fn loc5(self) -> &'a mut crate::W<REG> {
self.variant(CH4LOC::Loc5)
}
#[inline(always)]
pub fn loc6(self) -> &'a mut crate::W<REG> {
self.variant(CH4LOC::Loc6)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum CH5LOC {
Loc0 = 0,
Loc1 = 1,
Loc2 = 2,
Loc3 = 3,
Loc4 = 4,
Loc5 = 5,
Loc6 = 6,
}
impl From<CH5LOC> for u8 {
#[inline(always)]
fn from(variant: CH5LOC) -> Self {
variant as _
}
}
impl crate::FieldSpec for CH5LOC {
type Ux = u8;
}
impl crate::IsEnum for CH5LOC {}
pub type Ch5locR = crate::FieldReader<CH5LOC>;
impl Ch5locR {
#[inline(always)]
pub const fn variant(&self) -> Option<CH5LOC> {
match self.bits {
0 => Some(CH5LOC::Loc0),
1 => Some(CH5LOC::Loc1),
2 => Some(CH5LOC::Loc2),
3 => Some(CH5LOC::Loc3),
4 => Some(CH5LOC::Loc4),
5 => Some(CH5LOC::Loc5),
6 => Some(CH5LOC::Loc6),
_ => None,
}
}
#[inline(always)]
pub fn is_loc0(&self) -> bool {
*self == CH5LOC::Loc0
}
#[inline(always)]
pub fn is_loc1(&self) -> bool {
*self == CH5LOC::Loc1
}
#[inline(always)]
pub fn is_loc2(&self) -> bool {
*self == CH5LOC::Loc2
}
#[inline(always)]
pub fn is_loc3(&self) -> bool {
*self == CH5LOC::Loc3
}
#[inline(always)]
pub fn is_loc4(&self) -> bool {
*self == CH5LOC::Loc4
}
#[inline(always)]
pub fn is_loc5(&self) -> bool {
*self == CH5LOC::Loc5
}
#[inline(always)]
pub fn is_loc6(&self) -> bool {
*self == CH5LOC::Loc6
}
}
pub type Ch5locW<'a, REG> = crate::FieldWriter<'a, REG, 6, CH5LOC>;
impl<'a, REG> Ch5locW<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn loc0(self) -> &'a mut crate::W<REG> {
self.variant(CH5LOC::Loc0)
}
#[inline(always)]
pub fn loc1(self) -> &'a mut crate::W<REG> {
self.variant(CH5LOC::Loc1)
}
#[inline(always)]
pub fn loc2(self) -> &'a mut crate::W<REG> {
self.variant(CH5LOC::Loc2)
}
#[inline(always)]
pub fn loc3(self) -> &'a mut crate::W<REG> {
self.variant(CH5LOC::Loc3)
}
#[inline(always)]
pub fn loc4(self) -> &'a mut crate::W<REG> {
self.variant(CH5LOC::Loc4)
}
#[inline(always)]
pub fn loc5(self) -> &'a mut crate::W<REG> {
self.variant(CH5LOC::Loc5)
}
#[inline(always)]
pub fn loc6(self) -> &'a mut crate::W<REG> {
self.variant(CH5LOC::Loc6)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum CH6LOC {
Loc0 = 0,
Loc1 = 1,
Loc2 = 2,
Loc3 = 3,
Loc4 = 4,
Loc5 = 5,
Loc6 = 6,
Loc7 = 7,
Loc8 = 8,
Loc9 = 9,
Loc10 = 10,
Loc11 = 11,
Loc12 = 12,
Loc13 = 13,
Loc14 = 14,
Loc15 = 15,
Loc16 = 16,
Loc17 = 17,
}
impl From<CH6LOC> for u8 {
#[inline(always)]
fn from(variant: CH6LOC) -> Self {
variant as _
}
}
impl crate::FieldSpec for CH6LOC {
type Ux = u8;
}
impl crate::IsEnum for CH6LOC {}
pub type Ch6locR = crate::FieldReader<CH6LOC>;
impl Ch6locR {
#[inline(always)]
pub const fn variant(&self) -> Option<CH6LOC> {
match self.bits {
0 => Some(CH6LOC::Loc0),
1 => Some(CH6LOC::Loc1),
2 => Some(CH6LOC::Loc2),
3 => Some(CH6LOC::Loc3),
4 => Some(CH6LOC::Loc4),
5 => Some(CH6LOC::Loc5),
6 => Some(CH6LOC::Loc6),
7 => Some(CH6LOC::Loc7),
8 => Some(CH6LOC::Loc8),
9 => Some(CH6LOC::Loc9),
10 => Some(CH6LOC::Loc10),
11 => Some(CH6LOC::Loc11),
12 => Some(CH6LOC::Loc12),
13 => Some(CH6LOC::Loc13),
14 => Some(CH6LOC::Loc14),
15 => Some(CH6LOC::Loc15),
16 => Some(CH6LOC::Loc16),
17 => Some(CH6LOC::Loc17),
_ => None,
}
}
#[inline(always)]
pub fn is_loc0(&self) -> bool {
*self == CH6LOC::Loc0
}
#[inline(always)]
pub fn is_loc1(&self) -> bool {
*self == CH6LOC::Loc1
}
#[inline(always)]
pub fn is_loc2(&self) -> bool {
*self == CH6LOC::Loc2
}
#[inline(always)]
pub fn is_loc3(&self) -> bool {
*self == CH6LOC::Loc3
}
#[inline(always)]
pub fn is_loc4(&self) -> bool {
*self == CH6LOC::Loc4
}
#[inline(always)]
pub fn is_loc5(&self) -> bool {
*self == CH6LOC::Loc5
}
#[inline(always)]
pub fn is_loc6(&self) -> bool {
*self == CH6LOC::Loc6
}
#[inline(always)]
pub fn is_loc7(&self) -> bool {
*self == CH6LOC::Loc7
}
#[inline(always)]
pub fn is_loc8(&self) -> bool {
*self == CH6LOC::Loc8
}
#[inline(always)]
pub fn is_loc9(&self) -> bool {
*self == CH6LOC::Loc9
}
#[inline(always)]
pub fn is_loc10(&self) -> bool {
*self == CH6LOC::Loc10
}
#[inline(always)]
pub fn is_loc11(&self) -> bool {
*self == CH6LOC::Loc11
}
#[inline(always)]
pub fn is_loc12(&self) -> bool {
*self == CH6LOC::Loc12
}
#[inline(always)]
pub fn is_loc13(&self) -> bool {
*self == CH6LOC::Loc13
}
#[inline(always)]
pub fn is_loc14(&self) -> bool {
*self == CH6LOC::Loc14
}
#[inline(always)]
pub fn is_loc15(&self) -> bool {
*self == CH6LOC::Loc15
}
#[inline(always)]
pub fn is_loc16(&self) -> bool {
*self == CH6LOC::Loc16
}
#[inline(always)]
pub fn is_loc17(&self) -> bool {
*self == CH6LOC::Loc17
}
}
pub type Ch6locW<'a, REG> = crate::FieldWriter<'a, REG, 6, CH6LOC>;
impl<'a, REG> Ch6locW<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn loc0(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc0)
}
#[inline(always)]
pub fn loc1(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc1)
}
#[inline(always)]
pub fn loc2(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc2)
}
#[inline(always)]
pub fn loc3(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc3)
}
#[inline(always)]
pub fn loc4(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc4)
}
#[inline(always)]
pub fn loc5(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc5)
}
#[inline(always)]
pub fn loc6(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc6)
}
#[inline(always)]
pub fn loc7(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc7)
}
#[inline(always)]
pub fn loc8(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc8)
}
#[inline(always)]
pub fn loc9(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc9)
}
#[inline(always)]
pub fn loc10(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc10)
}
#[inline(always)]
pub fn loc11(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc11)
}
#[inline(always)]
pub fn loc12(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc12)
}
#[inline(always)]
pub fn loc13(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc13)
}
#[inline(always)]
pub fn loc14(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc14)
}
#[inline(always)]
pub fn loc15(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc15)
}
#[inline(always)]
pub fn loc16(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc16)
}
#[inline(always)]
pub fn loc17(self) -> &'a mut crate::W<REG> {
self.variant(CH6LOC::Loc17)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum CH7LOC {
Loc0 = 0,
Loc1 = 1,
Loc2 = 2,
Loc3 = 3,
Loc4 = 4,
Loc5 = 5,
Loc6 = 6,
Loc7 = 7,
Loc8 = 8,
Loc9 = 9,
Loc10 = 10,
}
impl From<CH7LOC> for u8 {
#[inline(always)]
fn from(variant: CH7LOC) -> Self {
variant as _
}
}
impl crate::FieldSpec for CH7LOC {
type Ux = u8;
}
impl crate::IsEnum for CH7LOC {}
pub type Ch7locR = crate::FieldReader<CH7LOC>;
impl Ch7locR {
#[inline(always)]
pub const fn variant(&self) -> Option<CH7LOC> {
match self.bits {
0 => Some(CH7LOC::Loc0),
1 => Some(CH7LOC::Loc1),
2 => Some(CH7LOC::Loc2),
3 => Some(CH7LOC::Loc3),
4 => Some(CH7LOC::Loc4),
5 => Some(CH7LOC::Loc5),
6 => Some(CH7LOC::Loc6),
7 => Some(CH7LOC::Loc7),
8 => Some(CH7LOC::Loc8),
9 => Some(CH7LOC::Loc9),
10 => Some(CH7LOC::Loc10),
_ => None,
}
}
#[inline(always)]
pub fn is_loc0(&self) -> bool {
*self == CH7LOC::Loc0
}
#[inline(always)]
pub fn is_loc1(&self) -> bool {
*self == CH7LOC::Loc1
}
#[inline(always)]
pub fn is_loc2(&self) -> bool {
*self == CH7LOC::Loc2
}
#[inline(always)]
pub fn is_loc3(&self) -> bool {
*self == CH7LOC::Loc3
}
#[inline(always)]
pub fn is_loc4(&self) -> bool {
*self == CH7LOC::Loc4
}
#[inline(always)]
pub fn is_loc5(&self) -> bool {
*self == CH7LOC::Loc5
}
#[inline(always)]
pub fn is_loc6(&self) -> bool {
*self == CH7LOC::Loc6
}
#[inline(always)]
pub fn is_loc7(&self) -> bool {
*self == CH7LOC::Loc7
}
#[inline(always)]
pub fn is_loc8(&self) -> bool {
*self == CH7LOC::Loc8
}
#[inline(always)]
pub fn is_loc9(&self) -> bool {
*self == CH7LOC::Loc9
}
#[inline(always)]
pub fn is_loc10(&self) -> bool {
*self == CH7LOC::Loc10
}
}
pub type Ch7locW<'a, REG> = crate::FieldWriter<'a, REG, 6, CH7LOC>;
impl<'a, REG> Ch7locW<'a, REG>
where
REG: crate::Writable + crate::RegisterSpec,
REG::Ux: From<u8>,
{
#[inline(always)]
pub fn loc0(self) -> &'a mut crate::W<REG> {
self.variant(CH7LOC::Loc0)
}
#[inline(always)]
pub fn loc1(self) -> &'a mut crate::W<REG> {
self.variant(CH7LOC::Loc1)
}
#[inline(always)]
pub fn loc2(self) -> &'a mut crate::W<REG> {
self.variant(CH7LOC::Loc2)
}
#[inline(always)]
pub fn loc3(self) -> &'a mut crate::W<REG> {
self.variant(CH7LOC::Loc3)
}
#[inline(always)]
pub fn loc4(self) -> &'a mut crate::W<REG> {
self.variant(CH7LOC::Loc4)
}
#[inline(always)]
pub fn loc5(self) -> &'a mut crate::W<REG> {
self.variant(CH7LOC::Loc5)
}
#[inline(always)]
pub fn loc6(self) -> &'a mut crate::W<REG> {
self.variant(CH7LOC::Loc6)
}
#[inline(always)]
pub fn loc7(self) -> &'a mut crate::W<REG> {
self.variant(CH7LOC::Loc7)
}
#[inline(always)]
pub fn loc8(self) -> &'a mut crate::W<REG> {
self.variant(CH7LOC::Loc8)
}
#[inline(always)]
pub fn loc9(self) -> &'a mut crate::W<REG> {
self.variant(CH7LOC::Loc9)
}
#[inline(always)]
pub fn loc10(self) -> &'a mut crate::W<REG> {
self.variant(CH7LOC::Loc10)
}
}
impl R {
#[inline(always)]
pub fn ch4loc(&self) -> Ch4locR {
Ch4locR::new((self.bits & 0x3f) as u8)
}
#[inline(always)]
pub fn ch5loc(&self) -> Ch5locR {
Ch5locR::new(((self.bits >> 8) & 0x3f) as u8)
}
#[inline(always)]
pub fn ch6loc(&self) -> Ch6locR {
Ch6locR::new(((self.bits >> 16) & 0x3f) as u8)
}
#[inline(always)]
pub fn ch7loc(&self) -> Ch7locR {
Ch7locR::new(((self.bits >> 24) & 0x3f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ROUTELOC1")
.field("ch4loc", &self.ch4loc())
.field("ch5loc", &self.ch5loc())
.field("ch6loc", &self.ch6loc())
.field("ch7loc", &self.ch7loc())
.finish()
}
}
impl W {
#[inline(always)]
pub fn ch4loc(&mut self) -> Ch4locW<'_, ROUTELOC1rs> {
Ch4locW::new(self, 0)
}
#[inline(always)]
pub fn ch5loc(&mut self) -> Ch5locW<'_, ROUTELOC1rs> {
Ch5locW::new(self, 8)
}
#[inline(always)]
pub fn ch6loc(&mut self) -> Ch6locW<'_, ROUTELOC1rs> {
Ch6locW::new(self, 16)
}
#[inline(always)]
pub fn ch7loc(&mut self) -> Ch7locW<'_, ROUTELOC1rs> {
Ch7locW::new(self, 24)
}
}
pub struct ROUTELOC1rs;
impl crate::RegisterSpec for ROUTELOC1rs {
type Ux = u32;
}
impl crate::Readable for ROUTELOC1rs {}
impl crate::Writable for ROUTELOC1rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for ROUTELOC1rs {}