avr_device/devices/atmega4809/usart2/
rxdatah.rs1#[doc = "Register `RXDATAH` reader"]
2pub struct R(crate::R<RXDATAH_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<RXDATAH_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<RXDATAH_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<RXDATAH_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Field `DATA8` reader - Receiver Data Register"]
17pub type DATA8_R = crate::BitReader<bool>;
18#[doc = "Field `PERR` reader - Parity Error"]
19pub type PERR_R = crate::BitReader<bool>;
20#[doc = "Field `FERR` reader - Frame Error"]
21pub type FERR_R = crate::BitReader<bool>;
22#[doc = "Field `BUFOVF` reader - Buffer Overflow"]
23pub type BUFOVF_R = crate::BitReader<bool>;
24#[doc = "Field `RXCIF` reader - Receive Complete Interrupt Flag"]
25pub type RXCIF_R = crate::BitReader<bool>;
26impl R {
27 #[doc = "Bit 0 - Receiver Data Register"]
28 #[inline(always)]
29 pub fn data8(&self) -> DATA8_R {
30 DATA8_R::new((self.bits & 1) != 0)
31 }
32 #[doc = "Bit 1 - Parity Error"]
33 #[inline(always)]
34 pub fn perr(&self) -> PERR_R {
35 PERR_R::new(((self.bits >> 1) & 1) != 0)
36 }
37 #[doc = "Bit 2 - Frame Error"]
38 #[inline(always)]
39 pub fn ferr(&self) -> FERR_R {
40 FERR_R::new(((self.bits >> 2) & 1) != 0)
41 }
42 #[doc = "Bit 6 - Buffer Overflow"]
43 #[inline(always)]
44 pub fn bufovf(&self) -> BUFOVF_R {
45 BUFOVF_R::new(((self.bits >> 6) & 1) != 0)
46 }
47 #[doc = "Bit 7 - Receive Complete Interrupt Flag"]
48 #[inline(always)]
49 pub fn rxcif(&self) -> RXCIF_R {
50 RXCIF_R::new(((self.bits >> 7) & 1) != 0)
51 }
52}
53#[doc = "Receive Data High Byte\n\nThis register you can [`read`](crate::generic::Reg::read). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [rxdatah](index.html) module"]
54pub struct RXDATAH_SPEC;
55impl crate::RegisterSpec for RXDATAH_SPEC {
56 type Ux = u8;
57}
58#[doc = "`read()` method returns [rxdatah::R](R) reader structure"]
59impl crate::Readable for RXDATAH_SPEC {
60 type Reader = R;
61}
62#[doc = "`reset()` method sets RXDATAH to value 0"]
63impl crate::Resettable for RXDATAH_SPEC {
64 const RESET_VALUE: Self::Ux = 0;
65}