gd32vf103_pac/can0/
rfifomdata11.rs

1#[doc = "Register `RFIFOMDATA11` reader"]
2pub struct R(crate::R<RFIFOMDATA11_SPEC>);
3impl core::ops::Deref for R {
4    type Target = crate::R<RFIFOMDATA11_SPEC>;
5    #[inline(always)]
6    fn deref(&self) -> &Self::Target {
7        &self.0
8    }
9}
10impl From<crate::R<RFIFOMDATA11_SPEC>> for R {
11    #[inline(always)]
12    fn from(reader: crate::R<RFIFOMDATA11_SPEC>) -> Self {
13        R(reader)
14    }
15}
16#[doc = "Field `DB4` reader - Data byte 4"]
17pub type DB4_R = crate::FieldReader<u8, u8>;
18#[doc = "Field `DB5` reader - Data byte 5"]
19pub type DB5_R = crate::FieldReader<u8, u8>;
20#[doc = "Field `DB6` reader - Data byte 6"]
21pub type DB6_R = crate::FieldReader<u8, u8>;
22#[doc = "Field `DB7` reader - Data byte 7"]
23pub type DB7_R = crate::FieldReader<u8, u8>;
24impl R {
25    #[doc = "Bits 0:7 - Data byte 4"]
26    #[inline(always)]
27    pub fn db4(&self) -> DB4_R {
28        DB4_R::new((self.bits & 0xff) as u8)
29    }
30    #[doc = "Bits 8:15 - Data byte 5"]
31    #[inline(always)]
32    pub fn db5(&self) -> DB5_R {
33        DB5_R::new(((self.bits >> 8) & 0xff) as u8)
34    }
35    #[doc = "Bits 16:23 - Data byte 6"]
36    #[inline(always)]
37    pub fn db6(&self) -> DB6_R {
38        DB6_R::new(((self.bits >> 16) & 0xff) as u8)
39    }
40    #[doc = "Bits 24:31 - Data byte 7"]
41    #[inline(always)]
42    pub fn db7(&self) -> DB7_R {
43        DB7_R::new(((self.bits >> 24) & 0xff) as u8)
44    }
45}
46#[doc = "Receive FIFO1 mailbox data1 register\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 [rfifomdata11](index.html) module"]
47pub struct RFIFOMDATA11_SPEC;
48impl crate::RegisterSpec for RFIFOMDATA11_SPEC {
49    type Ux = u32;
50}
51#[doc = "`read()` method returns [rfifomdata11::R](R) reader structure"]
52impl crate::Readable for RFIFOMDATA11_SPEC {
53    type Reader = R;
54}
55#[doc = "`reset()` method sets RFIFOMDATA11 to value 0"]
56impl crate::Resettable for RFIFOMDATA11_SPEC {
57    const RESET_VALUE: Self::Ux = 0;
58}