stm32f1_staging/stm32f101/dbgmcu/
idcode.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
///Register `IDCODE` reader
pub type R = crate::R<IDCODErs>;
///Field `DEV_ID` reader - DEV_ID
pub type DEV_ID_R = crate::FieldReader<u16>;
///Field `REV_ID` reader - REV_ID
pub type REV_ID_R = crate::FieldReader<u16>;
impl R {
    ///Bits 0:11 - DEV_ID
    #[inline(always)]
    pub fn dev_id(&self) -> DEV_ID_R {
        DEV_ID_R::new((self.bits & 0x0fff) as u16)
    }
    ///Bits 16:31 - REV_ID
    #[inline(always)]
    pub fn rev_id(&self) -> REV_ID_R {
        REV_ID_R::new(((self.bits >> 16) & 0xffff) as u16)
    }
}
impl core::fmt::Debug for R {
    fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
        f.debug_struct("IDCODE")
            .field("dev_id", &self.dev_id())
            .field("rev_id", &self.rev_id())
            .finish()
    }
}
/**DBGMCU_IDCODE

You can [`read`](crate::Reg::read) this register and get [`idcode::R`](R). See [API](https://docs.rs/svd2rust/#read--modify--write-api).

See register [structure](https://stm32-rs.github.io/stm32-rs/STM32F101.html#DBGMCU:IDCODE)*/
pub struct IDCODErs;
impl crate::RegisterSpec for IDCODErs {
    type Ux = u32;
}
///`read()` method returns [`idcode::R`](R) reader structure
impl crate::Readable for IDCODErs {}
///`reset()` method sets IDCODE to value 0
impl crate::Resettable for IDCODErs {
    const RESET_VALUE: u32 = 0;
}