stm32h5_staging/common/sbs/6cd589c8/
dbglockr.rs

1///Register `DBGLOCKR` reader
2pub type R = crate::R<DBGLOCKRrs>;
3///Register `DBGLOCKR` writer
4pub type W = crate::W<DBGLOCKRrs>;
5///Field `DBGCFG_LOCK` reader - debug configuration lock
6pub type DBGCFG_LOCK_R = crate::FieldReader;
7///Field `DBGCFG_LOCK` writer - debug configuration lock
8pub type DBGCFG_LOCK_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9impl R {
10    ///Bits 0:7 - debug configuration lock
11    #[inline(always)]
12    pub fn dbgcfg_lock(&self) -> DBGCFG_LOCK_R {
13        DBGCFG_LOCK_R::new((self.bits & 0xff) as u8)
14    }
15}
16impl core::fmt::Debug for R {
17    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
18        f.debug_struct("DBGLOCKR").field("dbgcfg_lock", &self.dbgcfg_lock()).finish()
19    }
20}
21impl W {
22    ///Bits 0:7 - debug configuration lock
23    #[inline(always)]
24    pub fn dbgcfg_lock(&mut self) -> DBGCFG_LOCK_W<DBGLOCKRrs> {
25        DBGCFG_LOCK_W::new(self, 0)
26    }
27}
28/**SBS debug lock register
29
30You can [`read`](crate::Reg::read) this register and get [`dbglockr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`dbglockr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api).*/
31pub struct DBGLOCKRrs;
32impl crate::RegisterSpec for DBGLOCKRrs {
33    type Ux = u32;
34}
35///`read()` method returns [`dbglockr::R`](R) reader structure
36impl crate::Readable for DBGLOCKRrs {}
37///`write(|w| ..)` method takes [`dbglockr::W`](W) writer structure
38impl crate::Writable for DBGLOCKRrs {
39    type Safety = crate::Unsafe;
40    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
41    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
42}
43///`reset()` method sets DBGLOCKR to value 0xb4
44impl crate::Resettable for DBGLOCKRrs {
45    const RESET_VALUE: u32 = 0xb4;
46}