1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224
#[doc = "Reader of register ROUTELOC1"] pub type R = crate::R<u32, super::ROUTELOC1>; #[doc = "Writer for register ROUTELOC1"] pub type W = crate::W<u32, super::ROUTELOC1>; #[doc = "Register ROUTELOC1 `reset()`'s with value 0"] impl crate::ResetValue for super::ROUTELOC1 { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "I/O Location\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum CTSLOC_A { #[doc = "0: Location 0"] LOC0 = 0, #[doc = "1: Location 1"] LOC1 = 1, #[doc = "2: Location 2"] LOC2 = 2, #[doc = "3: Location 3"] LOC3 = 3, #[doc = "4: Location 4"] LOC4 = 4, #[doc = "5: Location 5"] LOC5 = 5, #[doc = "6: Location 6"] LOC6 = 6, } impl From<CTSLOC_A> for u8 { #[inline(always)] fn from(variant: CTSLOC_A) -> Self { variant as _ } } #[doc = "Reader of field `CTSLOC`"] pub type CTSLOC_R = crate::R<u8, CTSLOC_A>; impl CTSLOC_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, CTSLOC_A> { use crate::Variant::*; match self.bits { 0 => Val(CTSLOC_A::LOC0), 1 => Val(CTSLOC_A::LOC1), 2 => Val(CTSLOC_A::LOC2), 3 => Val(CTSLOC_A::LOC3), 4 => Val(CTSLOC_A::LOC4), 5 => Val(CTSLOC_A::LOC5), 6 => Val(CTSLOC_A::LOC6), i => Res(i), } } #[doc = "Checks if the value of the field is `LOC0`"] #[inline(always)] pub fn is_loc0(&self) -> bool { *self == CTSLOC_A::LOC0 } #[doc = "Checks if the value of the field is `LOC1`"] #[inline(always)] pub fn is_loc1(&self) -> bool { *self == CTSLOC_A::LOC1 } #[doc = "Checks if the value of the field is `LOC2`"] #[inline(always)] pub fn is_loc2(&self) -> bool { *self == CTSLOC_A::LOC2 } #[doc = "Checks if the value of the field is `LOC3`"] #[inline(always)] pub fn is_loc3(&self) -> bool { *self == CTSLOC_A::LOC3 } #[doc = "Checks if the value of the field is `LOC4`"] #[inline(always)] pub fn is_loc4(&self) -> bool { *self == CTSLOC_A::LOC4 } #[doc = "Checks if the value of the field is `LOC5`"] #[inline(always)] pub fn is_loc5(&self) -> bool { *self == CTSLOC_A::LOC5 } #[doc = "Checks if the value of the field is `LOC6`"] #[inline(always)] pub fn is_loc6(&self) -> bool { *self == CTSLOC_A::LOC6 } } #[doc = "Write proxy for field `CTSLOC`"] pub struct CTSLOC_W<'a> { w: &'a mut W, } impl<'a> CTSLOC_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: CTSLOC_A) -> &'a mut W { unsafe { self.bits(variant.into()) } } #[doc = "Location 0"] #[inline(always)] pub fn loc0(self) -> &'a mut W { self.variant(CTSLOC_A::LOC0) } #[doc = "Location 1"] #[inline(always)] pub fn loc1(self) -> &'a mut W { self.variant(CTSLOC_A::LOC1) } #[doc = "Location 2"] #[inline(always)] pub fn loc2(self) -> &'a mut W { self.variant(CTSLOC_A::LOC2) } #[doc = "Location 3"] #[inline(always)] pub fn loc3(self) -> &'a mut W { self.variant(CTSLOC_A::LOC3) } #[doc = "Location 4"] #[inline(always)] pub fn loc4(self) -> &'a mut W { self.variant(CTSLOC_A::LOC4) } #[doc = "Location 5"] #[inline(always)] pub fn loc5(self) -> &'a mut W { self.variant(CTSLOC_A::LOC5) } #[doc = "Location 6"] #[inline(always)] pub fn loc6(self) -> &'a mut W { self.variant(CTSLOC_A::LOC6) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !0x3f) | ((value as u32) & 0x3f); self.w } } #[doc = "I/O Location\n\nValue on reset: 0"] #[derive(Clone, Copy, Debug, PartialEq)] #[repr(u8)] pub enum RTSLOC_A { #[doc = "0: Location 0"] LOC0 = 0, #[doc = "1: Location 1"] LOC1 = 1, #[doc = "2: Location 2"] LOC2 = 2, #[doc = "3: Location 3"] LOC3 = 3, #[doc = "4: Location 4"] LOC4 = 4, #[doc = "5: Location 5"] LOC5 = 5, #[doc = "6: Location 6"] LOC6 = 6, } impl From<RTSLOC_A> for u8 { #[inline(always)] fn from(variant: RTSLOC_A) -> Self { variant as _ } } #[doc = "Reader of field `RTSLOC`"] pub type RTSLOC_R = crate::R<u8, RTSLOC_A>; impl RTSLOC_R { #[doc = r"Get enumerated values variant"] #[inline(always)] pub fn variant(&self) -> crate::Variant<u8, RTSLOC_A> { use crate::Variant::*; match self.bits { 0 => Val(RTSLOC_A::LOC0), 1 => Val(RTSLOC_A::LOC1), 2 => Val(RTSLOC_A::LOC2), 3 => Val(RTSLOC_A::LOC3), 4 => Val(RTSLOC_A::LOC4), 5 => Val(RTSLOC_A::LOC5), 6 => Val(RTSLOC_A::LOC6), i => Res(i), } } #[doc = "Checks if the value of the field is `LOC0`"] #[inline(always)] pub fn is_loc0(&self) -> bool { *self == RTSLOC_A::LOC0 } #[doc = "Checks if the value of the field is `LOC1`"] #[inline(always)] pub fn is_loc1(&self) -> bool { *self == RTSLOC_A::LOC1 } #[doc = "Checks if the value of the field is `LOC2`"] #[inline(always)] pub fn is_loc2(&self) -> bool { *self == RTSLOC_A::LOC2 } #[doc = "Checks if the value of the field is `LOC3`"] #[inline(always)] pub fn is_loc3(&self) -> bool { *self == RTSLOC_A::LOC3 } #[doc = "Checks if the value of the field is `LOC4`"] #[inline(always)] pub fn is_loc4(&self) -> bool { *self == RTSLOC_A::LOC4 } #[doc = "Checks if the value of the field is `LOC5`"] #[inline(always)] pub fn is_loc5(&self) -> bool { *self == RTSLOC_A::LOC5 } #[doc = "Checks if the value of the field is `LOC6`"] #[inline(always)] pub fn is_loc6(&self) -> bool { *self == RTSLOC_A::LOC6 } } #[doc = "Write proxy for field `RTSLOC`"] pub struct RTSLOC_W<'a> { w: &'a mut W, } impl<'a> RTSLOC_W<'a> { #[doc = r"Writes `variant` to the field"] #[inline(always)] pub fn variant(self, variant: RTSLOC_A) -> &'a mut W { unsafe { self.bits(variant.into()) } } #[doc = "Location 0"] #[inline(always)] pub fn loc0(self) -> &'a mut W { self.variant(RTSLOC_A::LOC0) } #[doc = "Location 1"] #[inline(always)] pub fn loc1(self) -> &'a mut W { self.variant(RTSLOC_A::LOC1) } #[doc = "Location 2"] #[inline(always)] pub fn loc2(self) -> &'a mut W { self.variant(RTSLOC_A::LOC2) } #[doc = "Location 3"] #[inline(always)] pub fn loc3(self) -> &'a mut W { self.variant(RTSLOC_A::LOC3) } #[doc = "Location 4"] #[inline(always)] pub fn loc4(self) -> &'a mut W { self.variant(RTSLOC_A::LOC4) } #[doc = "Location 5"] #[inline(always)] pub fn loc5(self) -> &'a mut W { self.variant(RTSLOC_A::LOC5) } #[doc = "Location 6"] #[inline(always)] pub fn loc6(self) -> &'a mut W { self.variant(RTSLOC_A::LOC6) } #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u8) -> &'a mut W { self.w.bits = (self.w.bits & !(0x3f << 8)) | (((value as u32) & 0x3f) << 8); self.w } } impl R { #[doc = "Bits 0:5 - I/O Location"] #[inline(always)] pub fn ctsloc(&self) -> CTSLOC_R { CTSLOC_R::new((self.bits & 0x3f) as u8) } #[doc = "Bits 8:13 - I/O Location"] #[inline(always)] pub fn rtsloc(&self) -> RTSLOC_R { RTSLOC_R::new(((self.bits >> 8) & 0x3f) as u8) } } impl W { #[doc = "Bits 0:5 - I/O Location"] #[inline(always)] pub fn ctsloc(&mut self) -> CTSLOC_W { CTSLOC_W { w: self } } #[doc = "Bits 8:13 - I/O Location"] #[inline(always)] pub fn rtsloc(&mut self) -> RTSLOC_W { RTSLOC_W { w: self } } }