muscab1_pac/uart0/
uartdr.rs1#[doc = "Register `UARTDR` reader"]
2pub type R = crate::R<UartdrSpec>;
3#[doc = "Register `UARTDR` writer"]
4pub type W = crate::W<UartdrSpec>;
5#[doc = "Field `Data` reader - Receive/Transmit data"]
6pub type DataR = crate::FieldReader;
7#[doc = "Field `Data` writer - Receive/Transmit data"]
8pub type DataW<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `FE` reader - Framing error: Indicates the received character did not had a valid stop bit"]
10pub type FeR = crate::BitReader;
11#[doc = "Field `FE` writer - Framing error: Indicates the received character did not had a valid stop bit"]
12pub type FeW<'a, REG> = crate::BitWriter<'a, REG>;
13#[doc = "Field `PE` reader - Parity error: Indicates that the parity of the received data character does not match the parity selected"]
14pub type PeR = crate::BitReader;
15#[doc = "Field `PE` writer - Parity error: Indicates that the parity of the received data character does not match the parity selected"]
16pub type PeW<'a, REG> = crate::BitWriter<'a, REG>;
17#[doc = "Field `BE` reader - Break error: Indicates that the received data input was held LOW for longer than a full-word transmission time"]
18pub type BeR = crate::BitReader;
19#[doc = "Field `BE` writer - Break error: Indicates that the received data input was held LOW for longer than a full-word transmission time"]
20pub type BeW<'a, REG> = crate::BitWriter<'a, REG>;
21#[doc = "Field `OE` reader - Overrun error: Indicates if data is received and the receive FIFO is already full."]
22pub type OeR = crate::BitReader;
23#[doc = "Field `OE` writer - Overrun error: Indicates if data is received and the receive FIFO is already full."]
24pub type OeW<'a, REG> = crate::BitWriter<'a, REG>;
25impl R {
26 #[doc = "Bits 0:7 - Receive/Transmit data"]
27 #[inline(always)]
28 pub fn data(&self) -> DataR {
29 DataR::new((self.bits & 0xff) as u8)
30 }
31 #[doc = "Bit 8 - Framing error: Indicates the received character did not had a valid stop bit"]
32 #[inline(always)]
33 pub fn fe(&self) -> FeR {
34 FeR::new(((self.bits >> 8) & 1) != 0)
35 }
36 #[doc = "Bit 9 - Parity error: Indicates that the parity of the received data character does not match the parity selected"]
37 #[inline(always)]
38 pub fn pe(&self) -> PeR {
39 PeR::new(((self.bits >> 9) & 1) != 0)
40 }
41 #[doc = "Bit 10 - Break error: Indicates that the received data input was held LOW for longer than a full-word transmission time"]
42 #[inline(always)]
43 pub fn be(&self) -> BeR {
44 BeR::new(((self.bits >> 10) & 1) != 0)
45 }
46 #[doc = "Bit 11 - Overrun error: Indicates if data is received and the receive FIFO is already full."]
47 #[inline(always)]
48 pub fn oe(&self) -> OeR {
49 OeR::new(((self.bits >> 11) & 1) != 0)
50 }
51}
52impl W {
53 #[doc = "Bits 0:7 - Receive/Transmit data"]
54 #[inline(always)]
55 pub fn data(&mut self) -> DataW<UartdrSpec> {
56 DataW::new(self, 0)
57 }
58 #[doc = "Bit 8 - Framing error: Indicates the received character did not had a valid stop bit"]
59 #[inline(always)]
60 pub fn fe(&mut self) -> FeW<UartdrSpec> {
61 FeW::new(self, 8)
62 }
63 #[doc = "Bit 9 - Parity error: Indicates that the parity of the received data character does not match the parity selected"]
64 #[inline(always)]
65 pub fn pe(&mut self) -> PeW<UartdrSpec> {
66 PeW::new(self, 9)
67 }
68 #[doc = "Bit 10 - Break error: Indicates that the received data input was held LOW for longer than a full-word transmission time"]
69 #[inline(always)]
70 pub fn be(&mut self) -> BeW<UartdrSpec> {
71 BeW::new(self, 10)
72 }
73 #[doc = "Bit 11 - Overrun error: Indicates if data is received and the receive FIFO is already full."]
74 #[inline(always)]
75 pub fn oe(&mut self) -> OeW<UartdrSpec> {
76 OeW::new(self, 11)
77 }
78}
79#[doc = "Data register\n\nYou can [`read`](crate::Reg::read) this register and get [`uartdr::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`uartdr::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
80pub struct UartdrSpec;
81impl crate::RegisterSpec for UartdrSpec {
82 type Ux = u32;
83}
84#[doc = "`read()` method returns [`uartdr::R`](R) reader structure"]
85impl crate::Readable for UartdrSpec {}
86#[doc = "`write(|w| ..)` method takes [`uartdr::W`](W) writer structure"]
87impl crate::Writable for UartdrSpec {
88 type Safety = crate::Unsafe;
89 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
90 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
91}
92#[doc = "`reset()` method sets UARTDR to value 0"]
93impl crate::Resettable for UartdrSpec {
94 const RESET_VALUE: u32 = 0;
95}