stm32l476/flash/
pcrop2sr.rs1#[doc = "Register `PCROP2SR` reader"]
2pub type R = crate::R<Pcrop2srSpec>;
3#[doc = "Register `PCROP2SR` writer"]
4pub type W = crate::W<Pcrop2srSpec>;
5#[doc = "Field `PCROP2_STRT` reader - Bank 2 PCROP area start offset"]
6pub type Pcrop2StrtR = crate::FieldReader<u16>;
7#[doc = "Field `PCROP2_STRT` writer - Bank 2 PCROP area start offset"]
8pub type Pcrop2StrtW<'a, REG> = crate::FieldWriter<'a, REG, 16, u16>;
9impl R {
10 #[doc = "Bits 0:15 - Bank 2 PCROP area start offset"]
11 #[inline(always)]
12 pub fn pcrop2_strt(&self) -> Pcrop2StrtR {
13 Pcrop2StrtR::new((self.bits & 0xffff) as u16)
14 }
15}
16impl W {
17 #[doc = "Bits 0:15 - Bank 2 PCROP area start offset"]
18 #[inline(always)]
19 pub fn pcrop2_strt(&mut self) -> Pcrop2StrtW<Pcrop2srSpec> {
20 Pcrop2StrtW::new(self, 0)
21 }
22}
23#[doc = "Flash Bank 2 PCROP Start address register\n\nYou can [`read`](crate::Reg::read) this register and get [`pcrop2sr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pcrop2sr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
24pub struct Pcrop2srSpec;
25impl crate::RegisterSpec for Pcrop2srSpec {
26 type Ux = u32;
27}
28#[doc = "`read()` method returns [`pcrop2sr::R`](R) reader structure"]
29impl crate::Readable for Pcrop2srSpec {}
30#[doc = "`write(|w| ..)` method takes [`pcrop2sr::W`](W) writer structure"]
31impl crate::Writable for Pcrop2srSpec {
32 type Safety = crate::Unsafe;
33}
34#[doc = "`reset()` method sets PCROP2SR to value 0xffff_0000"]
35impl crate::Resettable for Pcrop2srSpec {
36 const RESET_VALUE: u32 = 0xffff_0000;
37}