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
#[doc = "Reader of register DEVSIZE"] pub type R = crate::R<u32, super::DEVSIZE>; #[doc = "Writer for register DEVSIZE"] pub type W = crate::W<u32, super::DEVSIZE>; #[doc = "Register DEVSIZE `reset()`'s with value 0x0010_1002"] impl crate::ResetValue for super::DEVSIZE { type Type = u32; #[inline(always)] fn reset_value() -> Self::Type { 0x0010_1002 } } #[doc = "Reader of field `FDEVSIZECS3`"] pub type FDEVSIZECS3_R = crate::R<u8, u8>; #[doc = "Write proxy for field `FDEVSIZECS3`"] pub struct FDEVSIZECS3_W<'a> { w: &'a mut W, } impl<'a> FDEVSIZECS3_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 & !(0x03 << 27)) | (((value as u32) & 0x03) << 27); self.w } } #[doc = "Reader of field `FDEVSIZECS2`"] pub type FDEVSIZECS2_R = crate::R<u8, u8>; #[doc = "Write proxy for field `FDEVSIZECS2`"] pub struct FDEVSIZECS2_W<'a> { w: &'a mut W, } impl<'a> FDEVSIZECS2_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 & !(0x03 << 25)) | (((value as u32) & 0x03) << 25); self.w } } #[doc = "Reader of field `FDEVSIZECS1`"] pub type FDEVSIZECS1_R = crate::R<u8, u8>; #[doc = "Write proxy for field `FDEVSIZECS1`"] pub struct FDEVSIZECS1_W<'a> { w: &'a mut W, } impl<'a> FDEVSIZECS1_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 & !(0x03 << 23)) | (((value as u32) & 0x03) << 23); self.w } } #[doc = "Reader of field `FDEVSIZECS0`"] pub type FDEVSIZECS0_R = crate::R<u8, u8>; #[doc = "Write proxy for field `FDEVSIZECS0`"] pub struct FDEVSIZECS0_W<'a> { w: &'a mut W, } impl<'a> FDEVSIZECS0_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 & !(0x03 << 21)) | (((value as u32) & 0x03) << 21); self.w } } #[doc = "Reader of field `BYTEPERBLKNUM`"] pub type BYTEPERBLKNUM_R = crate::R<u8, u8>; #[doc = "Write proxy for field `BYTEPERBLKNUM`"] pub struct BYTEPERBLKNUM_W<'a> { w: &'a mut W, } impl<'a> BYTEPERBLKNUM_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 << 16)) | (((value as u32) & 0x1f) << 16); self.w } } #[doc = "Reader of field `BYTEPERDEVPGNUM`"] pub type BYTEPERDEVPGNUM_R = crate::R<u16, u16>; #[doc = "Write proxy for field `BYTEPERDEVPGNUM`"] pub struct BYTEPERDEVPGNUM_W<'a> { w: &'a mut W, } impl<'a> BYTEPERDEVPGNUM_W<'a> { #[doc = r"Writes raw bits to the field"] #[inline(always)] pub unsafe fn bits(self, value: u16) -> &'a mut W { self.w.bits = (self.w.bits & !(0x0fff << 4)) | (((value as u32) & 0x0fff) << 4); self.w } } #[doc = "Reader of field `ADDRBYTENUM`"] pub type ADDRBYTENUM_R = crate::R<u8, u8>; #[doc = "Write proxy for field `ADDRBYTENUM`"] pub struct ADDRBYTENUM_W<'a> { w: &'a mut W, } impl<'a> ADDRBYTENUM_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 & !0x0f) | ((value as u32) & 0x0f); self.w } } impl R { #[doc = "Bits 27:28 - Size of Flash Device connected to CS\\[3\\] pin"] #[inline(always)] pub fn fdevsizecs3(&self) -> FDEVSIZECS3_R { FDEVSIZECS3_R::new(((self.bits >> 27) & 0x03) as u8) } #[doc = "Bits 25:26 - Size of Flash Device connected to CS\\[2\\] pin"] #[inline(always)] pub fn fdevsizecs2(&self) -> FDEVSIZECS2_R { FDEVSIZECS2_R::new(((self.bits >> 25) & 0x03) as u8) } #[doc = "Bits 23:24 - Size of Flash Device connected to CS\\[1\\] pin"] #[inline(always)] pub fn fdevsizecs1(&self) -> FDEVSIZECS1_R { FDEVSIZECS1_R::new(((self.bits >> 23) & 0x03) as u8) } #[doc = "Bits 21:22 - Size of Flash Device connected to CS\\[0\\] pin"] #[inline(always)] pub fn fdevsizecs0(&self) -> FDEVSIZECS0_R { FDEVSIZECS0_R::new(((self.bits >> 21) & 0x03) as u8) } #[doc = "Bits 16:20 - Number of bytes per block"] #[inline(always)] pub fn byteperblknum(&self) -> BYTEPERBLKNUM_R { BYTEPERBLKNUM_R::new(((self.bits >> 16) & 0x1f) as u8) } #[doc = "Bits 4:15 - Number of bytes per device page"] #[inline(always)] pub fn byteperdevpgnum(&self) -> BYTEPERDEVPGNUM_R { BYTEPERDEVPGNUM_R::new(((self.bits >> 4) & 0x0fff) as u16) } #[doc = "Bits 0:3 - Number of address bytes"] #[inline(always)] pub fn addrbytenum(&self) -> ADDRBYTENUM_R { ADDRBYTENUM_R::new((self.bits & 0x0f) as u8) } } impl W { #[doc = "Bits 27:28 - Size of Flash Device connected to CS\\[3\\] pin"] #[inline(always)] pub fn fdevsizecs3(&mut self) -> FDEVSIZECS3_W { FDEVSIZECS3_W { w: self } } #[doc = "Bits 25:26 - Size of Flash Device connected to CS\\[2\\] pin"] #[inline(always)] pub fn fdevsizecs2(&mut self) -> FDEVSIZECS2_W { FDEVSIZECS2_W { w: self } } #[doc = "Bits 23:24 - Size of Flash Device connected to CS\\[1\\] pin"] #[inline(always)] pub fn fdevsizecs1(&mut self) -> FDEVSIZECS1_W { FDEVSIZECS1_W { w: self } } #[doc = "Bits 21:22 - Size of Flash Device connected to CS\\[0\\] pin"] #[inline(always)] pub fn fdevsizecs0(&mut self) -> FDEVSIZECS0_W { FDEVSIZECS0_W { w: self } } #[doc = "Bits 16:20 - Number of bytes per block"] #[inline(always)] pub fn byteperblknum(&mut self) -> BYTEPERBLKNUM_W { BYTEPERBLKNUM_W { w: self } } #[doc = "Bits 4:15 - Number of bytes per device page"] #[inline(always)] pub fn byteperdevpgnum(&mut self) -> BYTEPERDEVPGNUM_W { BYTEPERDEVPGNUM_W { w: self } } #[doc = "Bits 0:3 - Number of address bytes"] #[inline(always)] pub fn addrbytenum(&mut self) -> ADDRBYTENUM_W { ADDRBYTENUM_W { w: self } } }