stm32g0_staging/stm32g0c1/flash/
pcrop2asr.rs

1///Register `PCROP2ASR` reader
2pub type R = crate::R<PCROP2ASRrs>;
3///Register `PCROP2ASR` writer
4pub type W = crate::W<PCROP2ASRrs>;
5///Field `PCROP2A_STRT` reader - PCROP2A area start offset, bank2
6pub type PCROP2A_STRT_R = crate::FieldReader<u16>;
7///Field `PCROP2A_STRT` writer - PCROP2A area start offset, bank2
8pub type PCROP2A_STRT_W<'a, REG> = crate::FieldWriter<'a, REG, 9, u16>;
9impl R {
10    ///Bits 0:8 - PCROP2A area start offset, bank2
11    #[inline(always)]
12    pub fn pcrop2a_strt(&self) -> PCROP2A_STRT_R {
13        PCROP2A_STRT_R::new((self.bits & 0x01ff) as u16)
14    }
15}
16impl core::fmt::Debug for R {
17    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
18        f.debug_struct("PCROP2ASR").field("pcrop2a_strt", &self.pcrop2a_strt()).finish()
19    }
20}
21impl W {
22    ///Bits 0:8 - PCROP2A area start offset, bank2
23    #[inline(always)]
24    pub fn pcrop2a_strt(&mut self) -> PCROP2A_STRT_W<PCROP2ASRrs> {
25        PCROP2A_STRT_W::new(self, 0)
26    }
27}
28/**Flash PCROP2 area A start address register
29
30You can [`read`](crate::Reg::read) this register and get [`pcrop2asr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`pcrop2asr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).
31
32See register [structure](https://stm32-rs.github.io/stm32-rs/STM32G0C1.html#FLASH:PCROP2ASR)*/
33pub struct PCROP2ASRrs;
34impl crate::RegisterSpec for PCROP2ASRrs {
35    type Ux = u32;
36}
37///`read()` method returns [`pcrop2asr::R`](R) reader structure
38impl crate::Readable for PCROP2ASRrs {}
39///`write(|w| ..)` method takes [`pcrop2asr::W`](W) writer structure
40impl crate::Writable for PCROP2ASRrs {
41    type Safety = crate::Unsafe;
42    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
43    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
44}
45///`reset()` method sets PCROP2ASR to value 0
46impl crate::Resettable for PCROP2ASRrs {
47    const RESET_VALUE: u32 = 0;
48}