stm32f1_staging/stm32f100/flash/
sr.rs1pub type R = crate::R<SRrs>;
3pub type W = crate::W<SRrs>;
5pub type BSY_R = crate::BitReader;
7pub type PGERR_R = crate::BitReader;
9pub type PGERR_W<'a, REG> = crate::BitWriter<'a, REG>;
11pub type WRPRTERR_R = crate::BitReader;
13pub type WRPRTERR_W<'a, REG> = crate::BitWriter<'a, REG>;
15pub type EOP_R = crate::BitReader;
17pub type EOP_W<'a, REG> = crate::BitWriter<'a, REG>;
19impl R {
20 #[inline(always)]
22 pub fn bsy(&self) -> BSY_R {
23 BSY_R::new((self.bits & 1) != 0)
24 }
25 #[inline(always)]
27 pub fn pgerr(&self) -> PGERR_R {
28 PGERR_R::new(((self.bits >> 2) & 1) != 0)
29 }
30 #[inline(always)]
32 pub fn wrprterr(&self) -> WRPRTERR_R {
33 WRPRTERR_R::new(((self.bits >> 4) & 1) != 0)
34 }
35 #[inline(always)]
37 pub fn eop(&self) -> EOP_R {
38 EOP_R::new(((self.bits >> 5) & 1) != 0)
39 }
40}
41impl core::fmt::Debug for R {
42 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
43 f.debug_struct("SR")
44 .field("eop", &self.eop())
45 .field("wrprterr", &self.wrprterr())
46 .field("pgerr", &self.pgerr())
47 .field("bsy", &self.bsy())
48 .finish()
49 }
50}
51impl W {
52 #[inline(always)]
54 pub fn pgerr(&mut self) -> PGERR_W<SRrs> {
55 PGERR_W::new(self, 2)
56 }
57 #[inline(always)]
59 pub fn wrprterr(&mut self) -> WRPRTERR_W<SRrs> {
60 WRPRTERR_W::new(self, 4)
61 }
62 #[inline(always)]
64 pub fn eop(&mut self) -> EOP_W<SRrs> {
65 EOP_W::new(self, 5)
66 }
67}
68pub struct SRrs;
74impl crate::RegisterSpec for SRrs {
75 type Ux = u32;
76}
77impl crate::Readable for SRrs {}
79impl crate::Writable for SRrs {
81 type Safety = crate::Unsafe;
82}
83impl crate::Resettable for SRrs {}