stm32g4_staging/stm32g484/tim1/
dcr.rs1pub type R = crate::R<DCRrs>;
3pub type W = crate::W<DCRrs>;
5pub type DBA_R = crate::FieldReader;
7pub type DBA_W<'a, REG> = crate::FieldWriter<'a, REG, 5, u8, crate::Safe>;
9pub type DBL_R = crate::FieldReader;
11pub type DBL_W<'a, REG> = crate::FieldWriter<'a, REG, 5>;
13impl R {
14 #[inline(always)]
16 pub fn dba(&self) -> DBA_R {
17 DBA_R::new((self.bits & 0x1f) as u8)
18 }
19 #[inline(always)]
21 pub fn dbl(&self) -> DBL_R {
22 DBL_R::new(((self.bits >> 8) & 0x1f) as u8)
23 }
24}
25impl core::fmt::Debug for R {
26 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
27 f.debug_struct("DCR")
28 .field("dbl", &self.dbl())
29 .field("dba", &self.dba())
30 .finish()
31 }
32}
33impl W {
34 #[inline(always)]
36 pub fn dba(&mut self) -> DBA_W<DCRrs> {
37 DBA_W::new(self, 0)
38 }
39 #[inline(always)]
41 pub fn dbl(&mut self) -> DBL_W<DCRrs> {
42 DBL_W::new(self, 8)
43 }
44}
45pub struct DCRrs;
51impl crate::RegisterSpec for DCRrs {
52 type Ux = u32;
53}
54impl crate::Readable for DCRrs {}
56impl crate::Writable for DCRrs {
58 type Safety = crate::Unsafe;
59}
60impl crate::Resettable for DCRrs {}