stm32g0/stm32g0c1/tim14/
tisel.rs1#[doc = "Register `TISEL` reader"]
2pub struct R(crate::R<TISEL_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<TISEL_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<TISEL_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<TISEL_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `TISEL` writer"]
17pub struct W(crate::W<TISEL_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<TISEL_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<TISEL_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<TISEL_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `TI1SEL` reader - selects TI1\\[0\\]
38to TI1\\[15\\]
39input Others: Reserved"]
40pub type TI1SEL_R = crate::FieldReader<u8, u8>;
41#[doc = "Field `TI1SEL` writer - selects TI1\\[0\\]
42to TI1\\[15\\]
43input Others: Reserved"]
44pub type TI1SEL_W<'a, const O: u8> = crate::FieldWriter<'a, u32, TISEL_SPEC, u8, u8, 4, O>;
45impl R {
46 #[doc = "Bits 0:3 - selects TI1\\[0\\]
47to TI1\\[15\\]
48input Others: Reserved"]
49 #[inline(always)]
50 pub fn ti1sel(&self) -> TI1SEL_R {
51 TI1SEL_R::new((self.bits & 0x0f) as u8)
52 }
53}
54impl W {
55 #[doc = "Bits 0:3 - selects TI1\\[0\\]
56to TI1\\[15\\]
57input Others: Reserved"]
58 #[inline(always)]
59 pub fn ti1sel(&mut self) -> TI1SEL_W<0> {
60 TI1SEL_W::new(self)
61 }
62 #[doc = "Writes raw bits to the register."]
63 #[inline(always)]
64 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
65 self.0.bits(bits);
66 self
67 }
68}
69#[doc = "TIM timer input selection register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [tisel](index.html) module"]
70pub struct TISEL_SPEC;
71impl crate::RegisterSpec for TISEL_SPEC {
72 type Ux = u32;
73}
74#[doc = "`read()` method returns [tisel::R](R) reader structure"]
75impl crate::Readable for TISEL_SPEC {
76 type Reader = R;
77}
78#[doc = "`write(|w| ..)` method takes [tisel::W](W) writer structure"]
79impl crate::Writable for TISEL_SPEC {
80 type Writer = W;
81}
82#[doc = "`reset()` method sets TISEL to value 0"]
83impl crate::Resettable for TISEL_SPEC {
84 #[inline(always)]
85 fn reset_value() -> Self::Ux {
86 0
87 }
88}