pub type R = crate::R<ROUTELOC0rs>;
pub type W = crate::W<ROUTELOC0rs>;
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum SDALOC {
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,
Loc18 = 18,
Loc19 = 19,
Loc20 = 20,
Loc21 = 21,
Loc22 = 22,
Loc23 = 23,
Loc24 = 24,
Loc25 = 25,
Loc26 = 26,
Loc27 = 27,
Loc28 = 28,
Loc29 = 29,
Loc30 = 30,
Loc31 = 31,
}
impl From<SDALOC> for u8 {
#[inline(always)]
fn from(variant: SDALOC) -> Self {
variant as _
}
}
impl crate::FieldSpec for SDALOC {
type Ux = u8;
}
impl crate::IsEnum for SDALOC {}
pub type SdalocR = crate::FieldReader<SDALOC>;
impl SdalocR {
#[inline(always)]
pub const fn variant(&self) -> Option<SDALOC> {
match self.bits {
0 => Some(SDALOC::Loc0),
1 => Some(SDALOC::Loc1),
2 => Some(SDALOC::Loc2),
3 => Some(SDALOC::Loc3),
4 => Some(SDALOC::Loc4),
5 => Some(SDALOC::Loc5),
6 => Some(SDALOC::Loc6),
7 => Some(SDALOC::Loc7),
8 => Some(SDALOC::Loc8),
9 => Some(SDALOC::Loc9),
10 => Some(SDALOC::Loc10),
11 => Some(SDALOC::Loc11),
12 => Some(SDALOC::Loc12),
13 => Some(SDALOC::Loc13),
14 => Some(SDALOC::Loc14),
15 => Some(SDALOC::Loc15),
16 => Some(SDALOC::Loc16),
17 => Some(SDALOC::Loc17),
18 => Some(SDALOC::Loc18),
19 => Some(SDALOC::Loc19),
20 => Some(SDALOC::Loc20),
21 => Some(SDALOC::Loc21),
22 => Some(SDALOC::Loc22),
23 => Some(SDALOC::Loc23),
24 => Some(SDALOC::Loc24),
25 => Some(SDALOC::Loc25),
26 => Some(SDALOC::Loc26),
27 => Some(SDALOC::Loc27),
28 => Some(SDALOC::Loc28),
29 => Some(SDALOC::Loc29),
30 => Some(SDALOC::Loc30),
31 => Some(SDALOC::Loc31),
_ => None,
}
}
#[inline(always)]
pub fn is_loc0(&self) -> bool {
*self == SDALOC::Loc0
}
#[inline(always)]
pub fn is_loc1(&self) -> bool {
*self == SDALOC::Loc1
}
#[inline(always)]
pub fn is_loc2(&self) -> bool {
*self == SDALOC::Loc2
}
#[inline(always)]
pub fn is_loc3(&self) -> bool {
*self == SDALOC::Loc3
}
#[inline(always)]
pub fn is_loc4(&self) -> bool {
*self == SDALOC::Loc4
}
#[inline(always)]
pub fn is_loc5(&self) -> bool {
*self == SDALOC::Loc5
}
#[inline(always)]
pub fn is_loc6(&self) -> bool {
*self == SDALOC::Loc6
}
#[inline(always)]
pub fn is_loc7(&self) -> bool {
*self == SDALOC::Loc7
}
#[inline(always)]
pub fn is_loc8(&self) -> bool {
*self == SDALOC::Loc8
}
#[inline(always)]
pub fn is_loc9(&self) -> bool {
*self == SDALOC::Loc9
}
#[inline(always)]
pub fn is_loc10(&self) -> bool {
*self == SDALOC::Loc10
}
#[inline(always)]
pub fn is_loc11(&self) -> bool {
*self == SDALOC::Loc11
}
#[inline(always)]
pub fn is_loc12(&self) -> bool {
*self == SDALOC::Loc12
}
#[inline(always)]
pub fn is_loc13(&self) -> bool {
*self == SDALOC::Loc13
}
#[inline(always)]
pub fn is_loc14(&self) -> bool {
*self == SDALOC::Loc14
}
#[inline(always)]
pub fn is_loc15(&self) -> bool {
*self == SDALOC::Loc15
}
#[inline(always)]
pub fn is_loc16(&self) -> bool {
*self == SDALOC::Loc16
}
#[inline(always)]
pub fn is_loc17(&self) -> bool {
*self == SDALOC::Loc17
}
#[inline(always)]
pub fn is_loc18(&self) -> bool {
*self == SDALOC::Loc18
}
#[inline(always)]
pub fn is_loc19(&self) -> bool {
*self == SDALOC::Loc19
}
#[inline(always)]
pub fn is_loc20(&self) -> bool {
*self == SDALOC::Loc20
}
#[inline(always)]
pub fn is_loc21(&self) -> bool {
*self == SDALOC::Loc21
}
#[inline(always)]
pub fn is_loc22(&self) -> bool {
*self == SDALOC::Loc22
}
#[inline(always)]
pub fn is_loc23(&self) -> bool {
*self == SDALOC::Loc23
}
#[inline(always)]
pub fn is_loc24(&self) -> bool {
*self == SDALOC::Loc24
}
#[inline(always)]
pub fn is_loc25(&self) -> bool {
*self == SDALOC::Loc25
}
#[inline(always)]
pub fn is_loc26(&self) -> bool {
*self == SDALOC::Loc26
}
#[inline(always)]
pub fn is_loc27(&self) -> bool {
*self == SDALOC::Loc27
}
#[inline(always)]
pub fn is_loc28(&self) -> bool {
*self == SDALOC::Loc28
}
#[inline(always)]
pub fn is_loc29(&self) -> bool {
*self == SDALOC::Loc29
}
#[inline(always)]
pub fn is_loc30(&self) -> bool {
*self == SDALOC::Loc30
}
#[inline(always)]
pub fn is_loc31(&self) -> bool {
*self == SDALOC::Loc31
}
}
pub type SdalocW<'a, REG> = crate::FieldWriter<'a, REG, 6, SDALOC>;
impl<'a, REG> SdalocW<'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(SDALOC::Loc0)
}
#[inline(always)]
pub fn loc1(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc1)
}
#[inline(always)]
pub fn loc2(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc2)
}
#[inline(always)]
pub fn loc3(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc3)
}
#[inline(always)]
pub fn loc4(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc4)
}
#[inline(always)]
pub fn loc5(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc5)
}
#[inline(always)]
pub fn loc6(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc6)
}
#[inline(always)]
pub fn loc7(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc7)
}
#[inline(always)]
pub fn loc8(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc8)
}
#[inline(always)]
pub fn loc9(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc9)
}
#[inline(always)]
pub fn loc10(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc10)
}
#[inline(always)]
pub fn loc11(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc11)
}
#[inline(always)]
pub fn loc12(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc12)
}
#[inline(always)]
pub fn loc13(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc13)
}
#[inline(always)]
pub fn loc14(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc14)
}
#[inline(always)]
pub fn loc15(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc15)
}
#[inline(always)]
pub fn loc16(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc16)
}
#[inline(always)]
pub fn loc17(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc17)
}
#[inline(always)]
pub fn loc18(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc18)
}
#[inline(always)]
pub fn loc19(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc19)
}
#[inline(always)]
pub fn loc20(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc20)
}
#[inline(always)]
pub fn loc21(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc21)
}
#[inline(always)]
pub fn loc22(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc22)
}
#[inline(always)]
pub fn loc23(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc23)
}
#[inline(always)]
pub fn loc24(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc24)
}
#[inline(always)]
pub fn loc25(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc25)
}
#[inline(always)]
pub fn loc26(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc26)
}
#[inline(always)]
pub fn loc27(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc27)
}
#[inline(always)]
pub fn loc28(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc28)
}
#[inline(always)]
pub fn loc29(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc29)
}
#[inline(always)]
pub fn loc30(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc30)
}
#[inline(always)]
pub fn loc31(self) -> &'a mut crate::W<REG> {
self.variant(SDALOC::Loc31)
}
}
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[repr(u8)]
pub enum SCLLOC {
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,
Loc18 = 18,
Loc19 = 19,
Loc20 = 20,
Loc21 = 21,
Loc22 = 22,
Loc23 = 23,
Loc24 = 24,
Loc25 = 25,
Loc26 = 26,
Loc27 = 27,
Loc28 = 28,
Loc29 = 29,
Loc30 = 30,
Loc31 = 31,
}
impl From<SCLLOC> for u8 {
#[inline(always)]
fn from(variant: SCLLOC) -> Self {
variant as _
}
}
impl crate::FieldSpec for SCLLOC {
type Ux = u8;
}
impl crate::IsEnum for SCLLOC {}
pub type ScllocR = crate::FieldReader<SCLLOC>;
impl ScllocR {
#[inline(always)]
pub const fn variant(&self) -> Option<SCLLOC> {
match self.bits {
0 => Some(SCLLOC::Loc0),
1 => Some(SCLLOC::Loc1),
2 => Some(SCLLOC::Loc2),
3 => Some(SCLLOC::Loc3),
4 => Some(SCLLOC::Loc4),
5 => Some(SCLLOC::Loc5),
6 => Some(SCLLOC::Loc6),
7 => Some(SCLLOC::Loc7),
8 => Some(SCLLOC::Loc8),
9 => Some(SCLLOC::Loc9),
10 => Some(SCLLOC::Loc10),
11 => Some(SCLLOC::Loc11),
12 => Some(SCLLOC::Loc12),
13 => Some(SCLLOC::Loc13),
14 => Some(SCLLOC::Loc14),
15 => Some(SCLLOC::Loc15),
16 => Some(SCLLOC::Loc16),
17 => Some(SCLLOC::Loc17),
18 => Some(SCLLOC::Loc18),
19 => Some(SCLLOC::Loc19),
20 => Some(SCLLOC::Loc20),
21 => Some(SCLLOC::Loc21),
22 => Some(SCLLOC::Loc22),
23 => Some(SCLLOC::Loc23),
24 => Some(SCLLOC::Loc24),
25 => Some(SCLLOC::Loc25),
26 => Some(SCLLOC::Loc26),
27 => Some(SCLLOC::Loc27),
28 => Some(SCLLOC::Loc28),
29 => Some(SCLLOC::Loc29),
30 => Some(SCLLOC::Loc30),
31 => Some(SCLLOC::Loc31),
_ => None,
}
}
#[inline(always)]
pub fn is_loc0(&self) -> bool {
*self == SCLLOC::Loc0
}
#[inline(always)]
pub fn is_loc1(&self) -> bool {
*self == SCLLOC::Loc1
}
#[inline(always)]
pub fn is_loc2(&self) -> bool {
*self == SCLLOC::Loc2
}
#[inline(always)]
pub fn is_loc3(&self) -> bool {
*self == SCLLOC::Loc3
}
#[inline(always)]
pub fn is_loc4(&self) -> bool {
*self == SCLLOC::Loc4
}
#[inline(always)]
pub fn is_loc5(&self) -> bool {
*self == SCLLOC::Loc5
}
#[inline(always)]
pub fn is_loc6(&self) -> bool {
*self == SCLLOC::Loc6
}
#[inline(always)]
pub fn is_loc7(&self) -> bool {
*self == SCLLOC::Loc7
}
#[inline(always)]
pub fn is_loc8(&self) -> bool {
*self == SCLLOC::Loc8
}
#[inline(always)]
pub fn is_loc9(&self) -> bool {
*self == SCLLOC::Loc9
}
#[inline(always)]
pub fn is_loc10(&self) -> bool {
*self == SCLLOC::Loc10
}
#[inline(always)]
pub fn is_loc11(&self) -> bool {
*self == SCLLOC::Loc11
}
#[inline(always)]
pub fn is_loc12(&self) -> bool {
*self == SCLLOC::Loc12
}
#[inline(always)]
pub fn is_loc13(&self) -> bool {
*self == SCLLOC::Loc13
}
#[inline(always)]
pub fn is_loc14(&self) -> bool {
*self == SCLLOC::Loc14
}
#[inline(always)]
pub fn is_loc15(&self) -> bool {
*self == SCLLOC::Loc15
}
#[inline(always)]
pub fn is_loc16(&self) -> bool {
*self == SCLLOC::Loc16
}
#[inline(always)]
pub fn is_loc17(&self) -> bool {
*self == SCLLOC::Loc17
}
#[inline(always)]
pub fn is_loc18(&self) -> bool {
*self == SCLLOC::Loc18
}
#[inline(always)]
pub fn is_loc19(&self) -> bool {
*self == SCLLOC::Loc19
}
#[inline(always)]
pub fn is_loc20(&self) -> bool {
*self == SCLLOC::Loc20
}
#[inline(always)]
pub fn is_loc21(&self) -> bool {
*self == SCLLOC::Loc21
}
#[inline(always)]
pub fn is_loc22(&self) -> bool {
*self == SCLLOC::Loc22
}
#[inline(always)]
pub fn is_loc23(&self) -> bool {
*self == SCLLOC::Loc23
}
#[inline(always)]
pub fn is_loc24(&self) -> bool {
*self == SCLLOC::Loc24
}
#[inline(always)]
pub fn is_loc25(&self) -> bool {
*self == SCLLOC::Loc25
}
#[inline(always)]
pub fn is_loc26(&self) -> bool {
*self == SCLLOC::Loc26
}
#[inline(always)]
pub fn is_loc27(&self) -> bool {
*self == SCLLOC::Loc27
}
#[inline(always)]
pub fn is_loc28(&self) -> bool {
*self == SCLLOC::Loc28
}
#[inline(always)]
pub fn is_loc29(&self) -> bool {
*self == SCLLOC::Loc29
}
#[inline(always)]
pub fn is_loc30(&self) -> bool {
*self == SCLLOC::Loc30
}
#[inline(always)]
pub fn is_loc31(&self) -> bool {
*self == SCLLOC::Loc31
}
}
pub type ScllocW<'a, REG> = crate::FieldWriter<'a, REG, 6, SCLLOC>;
impl<'a, REG> ScllocW<'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(SCLLOC::Loc0)
}
#[inline(always)]
pub fn loc1(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc1)
}
#[inline(always)]
pub fn loc2(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc2)
}
#[inline(always)]
pub fn loc3(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc3)
}
#[inline(always)]
pub fn loc4(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc4)
}
#[inline(always)]
pub fn loc5(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc5)
}
#[inline(always)]
pub fn loc6(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc6)
}
#[inline(always)]
pub fn loc7(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc7)
}
#[inline(always)]
pub fn loc8(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc8)
}
#[inline(always)]
pub fn loc9(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc9)
}
#[inline(always)]
pub fn loc10(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc10)
}
#[inline(always)]
pub fn loc11(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc11)
}
#[inline(always)]
pub fn loc12(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc12)
}
#[inline(always)]
pub fn loc13(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc13)
}
#[inline(always)]
pub fn loc14(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc14)
}
#[inline(always)]
pub fn loc15(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc15)
}
#[inline(always)]
pub fn loc16(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc16)
}
#[inline(always)]
pub fn loc17(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc17)
}
#[inline(always)]
pub fn loc18(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc18)
}
#[inline(always)]
pub fn loc19(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc19)
}
#[inline(always)]
pub fn loc20(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc20)
}
#[inline(always)]
pub fn loc21(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc21)
}
#[inline(always)]
pub fn loc22(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc22)
}
#[inline(always)]
pub fn loc23(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc23)
}
#[inline(always)]
pub fn loc24(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc24)
}
#[inline(always)]
pub fn loc25(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc25)
}
#[inline(always)]
pub fn loc26(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc26)
}
#[inline(always)]
pub fn loc27(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc27)
}
#[inline(always)]
pub fn loc28(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc28)
}
#[inline(always)]
pub fn loc29(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc29)
}
#[inline(always)]
pub fn loc30(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc30)
}
#[inline(always)]
pub fn loc31(self) -> &'a mut crate::W<REG> {
self.variant(SCLLOC::Loc31)
}
}
impl R {
#[inline(always)]
pub fn sdaloc(&self) -> SdalocR {
SdalocR::new((self.bits & 0x3f) as u8)
}
#[inline(always)]
pub fn sclloc(&self) -> ScllocR {
ScllocR::new(((self.bits >> 8) & 0x3f) as u8)
}
}
impl core::fmt::Debug for R {
fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
f.debug_struct("ROUTELOC0")
.field("sdaloc", &self.sdaloc())
.field("sclloc", &self.sclloc())
.finish()
}
}
impl W {
#[inline(always)]
pub fn sdaloc(&mut self) -> SdalocW<'_, ROUTELOC0rs> {
SdalocW::new(self, 0)
}
#[inline(always)]
pub fn sclloc(&mut self) -> ScllocW<'_, ROUTELOC0rs> {
ScllocW::new(self, 8)
}
}
pub struct ROUTELOC0rs;
impl crate::RegisterSpec for ROUTELOC0rs {
type Ux = u32;
}
impl crate::Readable for ROUTELOC0rs {}
impl crate::Writable for ROUTELOC0rs {
type Safety = crate::Unsafe;
}
impl crate::Resettable for ROUTELOC0rs {}