stm32wb_pac/flash/
wrp1ar.rs1#[doc = "Reader of register WRP1AR"]
2pub type R = crate::R<u32, super::WRP1AR>;
3#[doc = "Writer for register WRP1AR"]
4pub type W = crate::W<u32, super::WRP1AR>;
5#[doc = "Register WRP1AR `reset()`'s with value 0xff00_ff00"]
6impl crate::ResetValue for super::WRP1AR {
7 type Type = u32;
8 #[inline(always)]
9 fn reset_value() -> Self::Type {
10 0xff00_ff00
11 }
12}
13#[doc = "Reader of field `WRP1A_STRT`"]
14pub type WRP1A_STRT_R = crate::R<u8, u8>;
15#[doc = "Write proxy for field `WRP1A_STRT`"]
16pub struct WRP1A_STRT_W<'a> {
17 w: &'a mut W,
18}
19impl<'a> WRP1A_STRT_W<'a> {
20 #[doc = r"Writes raw bits to the field"]
21 #[inline(always)]
22 pub unsafe fn bits(self, value: u8) -> &'a mut W {
23 self.w.bits = (self.w.bits & !0xff) | ((value as u32) & 0xff);
24 self.w
25 }
26}
27#[doc = "Reader of field `WRP1A_END`"]
28pub type WRP1A_END_R = crate::R<u8, u8>;
29#[doc = "Write proxy for field `WRP1A_END`"]
30pub struct WRP1A_END_W<'a> {
31 w: &'a mut W,
32}
33impl<'a> WRP1A_END_W<'a> {
34 #[doc = r"Writes raw bits to the field"]
35 #[inline(always)]
36 pub unsafe fn bits(self, value: u8) -> &'a mut W {
37 self.w.bits = (self.w.bits & !(0xff << 16)) | (((value as u32) & 0xff) << 16);
38 self.w
39 }
40}
41impl R {
42 #[doc = "Bits 0:7 - Bank 1 WRP first area A start offset"]
43 #[inline(always)]
44 pub fn wrp1a_strt(&self) -> WRP1A_STRT_R {
45 WRP1A_STRT_R::new((self.bits & 0xff) as u8)
46 }
47 #[doc = "Bits 16:23 - Bank 1 WRP first area A end offset"]
48 #[inline(always)]
49 pub fn wrp1a_end(&self) -> WRP1A_END_R {
50 WRP1A_END_R::new(((self.bits >> 16) & 0xff) as u8)
51 }
52}
53impl W {
54 #[doc = "Bits 0:7 - Bank 1 WRP first area A start offset"]
55 #[inline(always)]
56 pub fn wrp1a_strt(&mut self) -> WRP1A_STRT_W {
57 WRP1A_STRT_W { w: self }
58 }
59 #[doc = "Bits 16:23 - Bank 1 WRP first area A end offset"]
60 #[inline(always)]
61 pub fn wrp1a_end(&mut self) -> WRP1A_END_W {
62 WRP1A_END_W { w: self }
63 }
64}