efm32pg22_pac/efm32pg22c200/euart0_ns/
cmd.rs

1#[doc = "Register `CMD` writer"]
2pub struct W(crate::W<CMD_SPEC>);
3impl core::ops::Deref for W {
4    type Target = crate::W<CMD_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl core::ops::DerefMut for W {
11    #[inline(always)]
12    fn deref_mut(&mut self) -> &mut Self::Target {
13        &mut self.0
14    }
15}
16impl From<crate::W<CMD_SPEC>> for W {
17    #[inline(always)]
18    fn from(writer: crate::W<CMD_SPEC>) -> Self {
19        W(writer)
20    }
21}
22#[doc = "Field `RXEN` writer - Receiver Enable"]
23pub type RXEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CMD_SPEC, bool, O>;
24#[doc = "Field `RXDIS` writer - Receiver Disable"]
25pub type RXDIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, CMD_SPEC, bool, O>;
26#[doc = "Field `TXEN` writer - Transmitter Enable"]
27pub type TXEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CMD_SPEC, bool, O>;
28#[doc = "Field `TXDIS` writer - Transmitter Disable"]
29pub type TXDIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, CMD_SPEC, bool, O>;
30#[doc = "Field `RXBLOCKEN` writer - Receiver Block Enable"]
31pub type RXBLOCKEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CMD_SPEC, bool, O>;
32#[doc = "Field `RXBLOCKDIS` writer - Receiver Block Disable"]
33pub type RXBLOCKDIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, CMD_SPEC, bool, O>;
34#[doc = "Field `TXTRIEN` writer - Transmitter Tristate Enable"]
35pub type TXTRIEN_W<'a, const O: u8> = crate::BitWriter<'a, u32, CMD_SPEC, bool, O>;
36#[doc = "Field `TXTRIDIS` writer - Transmitter Tristate Disable"]
37pub type TXTRIDIS_W<'a, const O: u8> = crate::BitWriter<'a, u32, CMD_SPEC, bool, O>;
38#[doc = "Field `CLEARTX` writer - Clear TX FIFO"]
39pub type CLEARTX_W<'a, const O: u8> = crate::BitWriter<'a, u32, CMD_SPEC, bool, O>;
40impl W {
41    #[doc = "Bit 0 - Receiver Enable"]
42    #[inline(always)]
43    #[must_use]
44    pub fn rxen(&mut self) -> RXEN_W<0> {
45        RXEN_W::new(self)
46    }
47    #[doc = "Bit 1 - Receiver Disable"]
48    #[inline(always)]
49    #[must_use]
50    pub fn rxdis(&mut self) -> RXDIS_W<1> {
51        RXDIS_W::new(self)
52    }
53    #[doc = "Bit 2 - Transmitter Enable"]
54    #[inline(always)]
55    #[must_use]
56    pub fn txen(&mut self) -> TXEN_W<2> {
57        TXEN_W::new(self)
58    }
59    #[doc = "Bit 3 - Transmitter Disable"]
60    #[inline(always)]
61    #[must_use]
62    pub fn txdis(&mut self) -> TXDIS_W<3> {
63        TXDIS_W::new(self)
64    }
65    #[doc = "Bit 4 - Receiver Block Enable"]
66    #[inline(always)]
67    #[must_use]
68    pub fn rxblocken(&mut self) -> RXBLOCKEN_W<4> {
69        RXBLOCKEN_W::new(self)
70    }
71    #[doc = "Bit 5 - Receiver Block Disable"]
72    #[inline(always)]
73    #[must_use]
74    pub fn rxblockdis(&mut self) -> RXBLOCKDIS_W<5> {
75        RXBLOCKDIS_W::new(self)
76    }
77    #[doc = "Bit 6 - Transmitter Tristate Enable"]
78    #[inline(always)]
79    #[must_use]
80    pub fn txtrien(&mut self) -> TXTRIEN_W<6> {
81        TXTRIEN_W::new(self)
82    }
83    #[doc = "Bit 7 - Transmitter Tristate Disable"]
84    #[inline(always)]
85    #[must_use]
86    pub fn txtridis(&mut self) -> TXTRIDIS_W<7> {
87        TXTRIDIS_W::new(self)
88    }
89    #[doc = "Bit 8 - Clear TX FIFO"]
90    #[inline(always)]
91    #[must_use]
92    pub fn cleartx(&mut self) -> CLEARTX_W<8> {
93        CLEARTX_W::new(self)
94    }
95    #[doc = "Writes raw bits to the register."]
96    #[inline(always)]
97    pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
98        self.0.bits(bits);
99        self
100    }
101}
102#[doc = "No Description\n\nThis register you can [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [cmd](index.html) module"]
103pub struct CMD_SPEC;
104impl crate::RegisterSpec for CMD_SPEC {
105    type Ux = u32;
106}
107#[doc = "`write(|w| ..)` method takes [cmd::W](W) writer structure"]
108impl crate::Writable for CMD_SPEC {
109    type Writer = W;
110    const ZERO_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
111    const ONE_TO_MODIFY_FIELDS_BITMAP: Self::Ux = 0;
112}
113#[doc = "`reset()` method sets CMD to value 0"]
114impl crate::Resettable for CMD_SPEC {
115    const RESET_VALUE: Self::Ux = 0;
116}