xmc4200/can_mo0/
modatah.rs1#[doc = "Register `MODATAH` reader"]
2pub type R = crate::R<MODATAH_SPEC>;
3#[doc = "Register `MODATAH` writer"]
4pub type W = crate::W<MODATAH_SPEC>;
5#[doc = "Field `DB4` reader - Data Byte 4 of Message Object n"]
6pub type DB4_R = crate::FieldReader;
7#[doc = "Field `DB4` writer - Data Byte 4 of Message Object n"]
8pub type DB4_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `DB5` reader - Data Byte 5 of Message Object n"]
10pub type DB5_R = crate::FieldReader;
11#[doc = "Field `DB5` writer - Data Byte 5 of Message Object n"]
12pub type DB5_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13#[doc = "Field `DB6` reader - Data Byte 6 of Message Object n"]
14pub type DB6_R = crate::FieldReader;
15#[doc = "Field `DB6` writer - Data Byte 6 of Message Object n"]
16pub type DB6_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
17#[doc = "Field `DB7` reader - Data Byte 7 of Message Object n"]
18pub type DB7_R = crate::FieldReader;
19#[doc = "Field `DB7` writer - Data Byte 7 of Message Object n"]
20pub type DB7_W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
21impl R {
22 #[doc = "Bits 0:7 - Data Byte 4 of Message Object n"]
23 #[inline(always)]
24 pub fn db4(&self) -> DB4_R {
25 DB4_R::new((self.bits & 0xff) as u8)
26 }
27 #[doc = "Bits 8:15 - Data Byte 5 of Message Object n"]
28 #[inline(always)]
29 pub fn db5(&self) -> DB5_R {
30 DB5_R::new(((self.bits >> 8) & 0xff) as u8)
31 }
32 #[doc = "Bits 16:23 - Data Byte 6 of Message Object n"]
33 #[inline(always)]
34 pub fn db6(&self) -> DB6_R {
35 DB6_R::new(((self.bits >> 16) & 0xff) as u8)
36 }
37 #[doc = "Bits 24:31 - Data Byte 7 of Message Object n"]
38 #[inline(always)]
39 pub fn db7(&self) -> DB7_R {
40 DB7_R::new(((self.bits >> 24) & 0xff) as u8)
41 }
42}
43impl W {
44 #[doc = "Bits 0:7 - Data Byte 4 of Message Object n"]
45 #[inline(always)]
46 pub fn db4(&mut self) -> DB4_W<MODATAH_SPEC> {
47 DB4_W::new(self, 0)
48 }
49 #[doc = "Bits 8:15 - Data Byte 5 of Message Object n"]
50 #[inline(always)]
51 pub fn db5(&mut self) -> DB5_W<MODATAH_SPEC> {
52 DB5_W::new(self, 8)
53 }
54 #[doc = "Bits 16:23 - Data Byte 6 of Message Object n"]
55 #[inline(always)]
56 pub fn db6(&mut self) -> DB6_W<MODATAH_SPEC> {
57 DB6_W::new(self, 16)
58 }
59 #[doc = "Bits 24:31 - Data Byte 7 of Message Object n"]
60 #[inline(always)]
61 pub fn db7(&mut self) -> DB7_W<MODATAH_SPEC> {
62 DB7_W::new(self, 24)
63 }
64}
65#[doc = "Message Object Data Register High\n\nYou can [`read`](crate::Reg::read) this register and get [`modatah::R`](R). You can [`reset`](crate::Reg::reset), [`write`](crate::Reg::write), [`write_with_zero`](crate::Reg::write_with_zero) this register using [`modatah::W`](W). You can also [`modify`](crate::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
66pub struct MODATAH_SPEC;
67impl crate::RegisterSpec for MODATAH_SPEC {
68 type Ux = u32;
69}
70#[doc = "`read()` method returns [`modatah::R`](R) reader structure"]
71impl crate::Readable for MODATAH_SPEC {}
72#[doc = "`write(|w| ..)` method takes [`modatah::W`](W) writer structure"]
73impl crate::Writable for MODATAH_SPEC {
74 type Safety = crate::Unsafe;
75 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
76 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
77}
78#[doc = "`reset()` method sets MODATAH to value 0"]
79impl crate::Resettable for MODATAH_SPEC {
80 const RESET_VALUE: u32 = 0;
81}