stm32g0_staging/stm32g030/tim1/
tisel.rs1pub type R = crate::R<TISELrs>;
3pub type W = crate::W<TISELrs>;
5pub type TI1SEL3_0_R = crate::FieldReader;
9pub type TI1SEL3_0_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
13pub type TI2SEL3_0_R = crate::FieldReader;
17pub type TI2SEL3_0_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
21pub type TI3SEL3_0_R = crate::FieldReader;
25pub type TI3SEL3_0_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
29pub type TI4SEL3_0_R = crate::FieldReader;
33pub type TI4SEL3_0_W<'a, REG> = crate::FieldWriter<'a, REG, 4>;
37impl R {
38 #[inline(always)]
42 pub fn ti1sel3_0(&self) -> TI1SEL3_0_R {
43 TI1SEL3_0_R::new((self.bits & 0x0f) as u8)
44 }
45 #[inline(always)]
49 pub fn ti2sel3_0(&self) -> TI2SEL3_0_R {
50 TI2SEL3_0_R::new(((self.bits >> 8) & 0x0f) as u8)
51 }
52 #[inline(always)]
56 pub fn ti3sel3_0(&self) -> TI3SEL3_0_R {
57 TI3SEL3_0_R::new(((self.bits >> 16) & 0x0f) as u8)
58 }
59 #[inline(always)]
63 pub fn ti4sel3_0(&self) -> TI4SEL3_0_R {
64 TI4SEL3_0_R::new(((self.bits >> 24) & 0x0f) as u8)
65 }
66}
67impl core::fmt::Debug for R {
68 fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result {
69 f.debug_struct("TISEL")
70 .field("ti1sel3_0", &self.ti1sel3_0())
71 .field("ti2sel3_0", &self.ti2sel3_0())
72 .field("ti3sel3_0", &self.ti3sel3_0())
73 .field("ti4sel3_0", &self.ti4sel3_0())
74 .finish()
75 }
76}
77impl W {
78 #[inline(always)]
82 pub fn ti1sel3_0(&mut self) -> TI1SEL3_0_W<TISELrs> {
83 TI1SEL3_0_W::new(self, 0)
84 }
85 #[inline(always)]
89 pub fn ti2sel3_0(&mut self) -> TI2SEL3_0_W<TISELrs> {
90 TI2SEL3_0_W::new(self, 8)
91 }
92 #[inline(always)]
96 pub fn ti3sel3_0(&mut self) -> TI3SEL3_0_W<TISELrs> {
97 TI3SEL3_0_W::new(self, 16)
98 }
99 #[inline(always)]
103 pub fn ti4sel3_0(&mut self) -> TI4SEL3_0_W<TISELrs> {
104 TI4SEL3_0_W::new(self, 24)
105 }
106}
107pub struct TISELrs;
113impl crate::RegisterSpec for TISELrs {
114 type Ux = u32;
115}
116impl crate::Readable for TISELrs {}
118impl crate::Writable for TISELrs {
120 type Safety = crate::Unsafe;
121 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
122 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
123}
124impl crate::Resettable for TISELrs {
126 const RESET_VALUE: u32 = 0;
127}