Skip to main content

rk3399_pac/pcie_client/
msg_code1.rs

1#[doc = "Register `MSG_CODE1` reader"]
2pub type R = crate::R<MsgCode1Spec>;
3#[doc = "Register `MSG_CODE1` writer"]
4pub type W = crate::W<MsgCode1Spec>;
5#[doc = "Field `MTPAT5` reader - Match pattern 5\n\nPattern5"]
6pub type Mtpat5R = crate::FieldReader;
7#[doc = "Field `MTPAT5` writer - Match pattern 5\n\nPattern5"]
8pub type Mtpat5W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `MTPAT6` reader - Match pattern 6\n\nPattern6"]
10pub type Mtpat6R = crate::FieldReader;
11#[doc = "Field `MTPAT6` writer - Match pattern 6\n\nPattern6"]
12pub type Mtpat6W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
13#[doc = "Field `MTPAT7` reader - Match pattern 7\n\nPattern7"]
14pub type Mtpat7R = crate::FieldReader;
15#[doc = "Field `MTPAT7` writer - Match pattern 7\n\nPattern7"]
16pub type Mtpat7W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
17#[doc = "Field `MTPAT8` reader - Match pattern 8\n\nPattern8"]
18pub type Mtpat8R = crate::FieldReader;
19#[doc = "Field `MTPAT8` writer - Match pattern 8\n\nPattern8"]
20pub type Mtpat8W<'a, REG> = crate::FieldWriter<'a, REG, 8>;
21impl R {
22    #[doc = "Bits 0:7 - Match pattern 5\n\nPattern5"]
23    #[inline(always)]
24    pub fn mtpat5(&self) -> Mtpat5R {
25        Mtpat5R::new((self.bits & 0xff) as u8)
26    }
27    #[doc = "Bits 8:15 - Match pattern 6\n\nPattern6"]
28    #[inline(always)]
29    pub fn mtpat6(&self) -> Mtpat6R {
30        Mtpat6R::new(((self.bits >> 8) & 0xff) as u8)
31    }
32    #[doc = "Bits 16:23 - Match pattern 7\n\nPattern7"]
33    #[inline(always)]
34    pub fn mtpat7(&self) -> Mtpat7R {
35        Mtpat7R::new(((self.bits >> 16) & 0xff) as u8)
36    }
37    #[doc = "Bits 24:31 - Match pattern 8\n\nPattern8"]
38    #[inline(always)]
39    pub fn mtpat8(&self) -> Mtpat8R {
40        Mtpat8R::new(((self.bits >> 24) & 0xff) as u8)
41    }
42}
43impl W {
44    #[doc = "Bits 0:7 - Match pattern 5\n\nPattern5"]
45    #[inline(always)]
46    #[must_use]
47    pub fn mtpat5(&mut self) -> Mtpat5W<MsgCode1Spec> {
48        Mtpat5W::new(self, 0)
49    }
50    #[doc = "Bits 8:15 - Match pattern 6\n\nPattern6"]
51    #[inline(always)]
52    #[must_use]
53    pub fn mtpat6(&mut self) -> Mtpat6W<MsgCode1Spec> {
54        Mtpat6W::new(self, 8)
55    }
56    #[doc = "Bits 16:23 - Match pattern 7\n\nPattern7"]
57    #[inline(always)]
58    #[must_use]
59    pub fn mtpat7(&mut self) -> Mtpat7W<MsgCode1Spec> {
60        Mtpat7W::new(self, 16)
61    }
62    #[doc = "Bits 24:31 - Match pattern 8\n\nPattern8"]
63    #[inline(always)]
64    #[must_use]
65    pub fn mtpat8(&mut self) -> Mtpat8W<MsgCode1Spec> {
66        Mtpat8W::new(self, 24)
67    }
68}
69#[doc = "Message code 1\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`msg_code1::R`](R).  You can [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`msg_code1::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
70pub struct MsgCode1Spec;
71impl crate::RegisterSpec for MsgCode1Spec {
72    type Ux = u32;
73}
74#[doc = "`read()` method returns [`msg_code1::R`](R) reader structure"]
75impl crate::Readable for MsgCode1Spec {}
76#[doc = "`write(|w| ..)` method takes [`msg_code1::W`](W) writer structure"]
77impl crate::Writable for MsgCode1Spec {
78    type Safety = crate::Unsafe;
79    const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
80    const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
81}
82#[doc = "`reset()` method sets MSG_CODE1 to value 0"]
83impl crate::Resettable for MsgCode1Spec {
84    const RESET_VALUE: u32 = 0;
85}