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
#[doc = "Reader of register PLC_CONF0"] pub type R = crate::R<u32, super::PLC_CONF0>; #[doc = "Writer for register PLC_CONF0"] pub type W = crate::W<u32, super::PLC_CONF0>; #[doc = "Register PLC_CONF0 `reset()`'s with value 0"] impl crate::ResetValue for super::PLC_CONF0 { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0 } } #[doc = "Reader of field `N_MIN_ERR`"] pub type N_MIN_ERR_R = crate::R<u8, u8>; #[doc = "Write proxy for field `N_MIN_ERR`"] pub struct N_MIN_ERR_W<'a> { w: &'a mut W, } impl<'a> N_MIN_ERR_W<'a> { #[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 & !(0x07 << 25)) | (((value as u32) & 0x07) << 25); self.w } } #[doc = "Reader of field `PACK_LEN_8K`"] pub type PACK_LEN_8K_R = crate::R<u8, u8>; #[doc = "Write proxy for field `PACK_LEN_8K`"] pub struct PACK_LEN_8K_W<'a> { w: &'a mut W, } impl<'a> PACK_LEN_8K_W<'a> { #[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 & !(0x1f << 20)) | (((value as u32) & 0x1f) << 20); self.w } } #[doc = "Reader of field `MAX_SLIDE_SAMPLE`"] pub type MAX_SLIDE_SAMPLE_R = crate::R<u8, u8>; #[doc = "Write proxy for field `MAX_SLIDE_SAMPLE`"] pub struct MAX_SLIDE_SAMPLE_W<'a> { w: &'a mut W, } impl<'a> MAX_SLIDE_SAMPLE_W<'a> { #[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 & !(0xff << 12)) | (((value as u32) & 0xff) << 12); self.w } } #[doc = "Reader of field `SHIFT_RATE`"] pub type SHIFT_RATE_R = crate::R<u8, u8>; #[doc = "Write proxy for field `SHIFT_RATE`"] pub struct SHIFT_RATE_W<'a> { w: &'a mut W, } impl<'a> SHIFT_RATE_W<'a> { #[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 & !(0x07 << 9)) | (((value as u32) & 0x07) << 9); self.w } } #[doc = "Reader of field `N_ERR_SEG`"] pub type N_ERR_SEG_R = crate::R<u8, u8>; #[doc = "Write proxy for field `N_ERR_SEG`"] pub struct N_ERR_SEG_W<'a> { w: &'a mut W, } impl<'a> N_ERR_SEG_W<'a> { #[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 & !(0x07 << 6)) | (((value as u32) & 0x07) << 6); self.w } } #[doc = "Reader of field `GOOD_PACK_MAX`"] pub type GOOD_PACK_MAX_R = crate::R<u8, u8>; #[doc = "Write proxy for field `GOOD_PACK_MAX`"] pub struct GOOD_PACK_MAX_W<'a> { w: &'a mut W, } impl<'a> GOOD_PACK_MAX_W<'a> { #[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 } } impl R { #[doc = "Bits 25:27"] #[inline(always)] pub fn n_min_err(&self) -> N_MIN_ERR_R { N_MIN_ERR_R::new(((self.bits >> 25) & 0x07) as u8) } #[doc = "Bits 20:24"] #[inline(always)] pub fn pack_len_8k(&self) -> PACK_LEN_8K_R { PACK_LEN_8K_R::new(((self.bits >> 20) & 0x1f) as u8) } #[doc = "Bits 12:19"] #[inline(always)] pub fn max_slide_sample(&self) -> MAX_SLIDE_SAMPLE_R { MAX_SLIDE_SAMPLE_R::new(((self.bits >> 12) & 0xff) as u8) } #[doc = "Bits 9:11"] #[inline(always)] pub fn shift_rate(&self) -> SHIFT_RATE_R { SHIFT_RATE_R::new(((self.bits >> 9) & 0x07) as u8) } #[doc = "Bits 6:8"] #[inline(always)] pub fn n_err_seg(&self) -> N_ERR_SEG_R { N_ERR_SEG_R::new(((self.bits >> 6) & 0x07) as u8) } #[doc = "Bits 0:5"] #[inline(always)] pub fn good_pack_max(&self) -> GOOD_PACK_MAX_R { GOOD_PACK_MAX_R::new((self.bits & 0x3f) as u8) } } impl W { #[doc = "Bits 25:27"] #[inline(always)] pub fn n_min_err(&mut self) -> N_MIN_ERR_W { N_MIN_ERR_W { w: self } } #[doc = "Bits 20:24"] #[inline(always)] pub fn pack_len_8k(&mut self) -> PACK_LEN_8K_W { PACK_LEN_8K_W { w: self } } #[doc = "Bits 12:19"] #[inline(always)] pub fn max_slide_sample(&mut self) -> MAX_SLIDE_SAMPLE_W { MAX_SLIDE_SAMPLE_W { w: self } } #[doc = "Bits 9:11"] #[inline(always)] pub fn shift_rate(&mut self) -> SHIFT_RATE_W { SHIFT_RATE_W { w: self } } #[doc = "Bits 6:8"] #[inline(always)] pub fn n_err_seg(&mut self) -> N_ERR_SEG_W { N_ERR_SEG_W { w: self } } #[doc = "Bits 0:5"] #[inline(always)] pub fn good_pack_max(&mut self) -> GOOD_PACK_MAX_W { GOOD_PACK_MAX_W { w: self } } }