atsam3u2c/matrix/
pras1.rs1#[doc = "Register `PRAS1` reader"]
2pub type R = crate::R<Pras1Spec>;
3#[doc = "Register `PRAS1` writer"]
4pub type W = crate::W<Pras1Spec>;
5#[doc = "Field `M0PR` reader - Master 0 Priority"]
6pub type M0prR = crate::FieldReader;
7#[doc = "Field `M0PR` writer - Master 0 Priority"]
8pub type M0prW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
9#[doc = "Field `M1PR` reader - Master 1 Priority"]
10pub type M1prR = crate::FieldReader;
11#[doc = "Field `M1PR` writer - Master 1 Priority"]
12pub type M1prW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
13#[doc = "Field `M2PR` reader - Master 2 Priority"]
14pub type M2prR = crate::FieldReader;
15#[doc = "Field `M2PR` writer - Master 2 Priority"]
16pub type M2prW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
17#[doc = "Field `M3PR` reader - Master 3 Priority"]
18pub type M3prR = crate::FieldReader;
19#[doc = "Field `M3PR` writer - Master 3 Priority"]
20pub type M3prW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
21#[doc = "Field `M4PR` reader - Master 4 Priority"]
22pub type M4prR = crate::FieldReader;
23#[doc = "Field `M4PR` writer - Master 4 Priority"]
24pub type M4prW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
25impl R {
26 #[doc = "Bits 0:1 - Master 0 Priority"]
27 #[inline(always)]
28 pub fn m0pr(&self) -> M0prR {
29 M0prR::new((self.bits & 3) as u8)
30 }
31 #[doc = "Bits 4:5 - Master 1 Priority"]
32 #[inline(always)]
33 pub fn m1pr(&self) -> M1prR {
34 M1prR::new(((self.bits >> 4) & 3) as u8)
35 }
36 #[doc = "Bits 8:9 - Master 2 Priority"]
37 #[inline(always)]
38 pub fn m2pr(&self) -> M2prR {
39 M2prR::new(((self.bits >> 8) & 3) as u8)
40 }
41 #[doc = "Bits 12:13 - Master 3 Priority"]
42 #[inline(always)]
43 pub fn m3pr(&self) -> M3prR {
44 M3prR::new(((self.bits >> 12) & 3) as u8)
45 }
46 #[doc = "Bits 16:17 - Master 4 Priority"]
47 #[inline(always)]
48 pub fn m4pr(&self) -> M4prR {
49 M4prR::new(((self.bits >> 16) & 3) as u8)
50 }
51}
52impl W {
53 #[doc = "Bits 0:1 - Master 0 Priority"]
54 #[inline(always)]
55 #[must_use]
56 pub fn m0pr(&mut self) -> M0prW<Pras1Spec> {
57 M0prW::new(self, 0)
58 }
59 #[doc = "Bits 4:5 - Master 1 Priority"]
60 #[inline(always)]
61 #[must_use]
62 pub fn m1pr(&mut self) -> M1prW<Pras1Spec> {
63 M1prW::new(self, 4)
64 }
65 #[doc = "Bits 8:9 - Master 2 Priority"]
66 #[inline(always)]
67 #[must_use]
68 pub fn m2pr(&mut self) -> M2prW<Pras1Spec> {
69 M2prW::new(self, 8)
70 }
71 #[doc = "Bits 12:13 - Master 3 Priority"]
72 #[inline(always)]
73 #[must_use]
74 pub fn m3pr(&mut self) -> M3prW<Pras1Spec> {
75 M3prW::new(self, 12)
76 }
77 #[doc = "Bits 16:17 - Master 4 Priority"]
78 #[inline(always)]
79 #[must_use]
80 pub fn m4pr(&mut self) -> M4prW<Pras1Spec> {
81 M4prW::new(self, 16)
82 }
83}
84#[doc = "Priority Register A for Slave 1\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`pras1::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 [`pras1::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
85pub struct Pras1Spec;
86impl crate::RegisterSpec for Pras1Spec {
87 type Ux = u32;
88}
89#[doc = "`read()` method returns [`pras1::R`](R) reader structure"]
90impl crate::Readable for Pras1Spec {}
91#[doc = "`write(|w| ..)` method takes [`pras1::W`](W) writer structure"]
92impl crate::Writable for Pras1Spec {
93 type Safety = crate::Unsafe;
94 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
95 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
96}
97#[doc = "`reset()` method sets PRAS1 to value 0"]
98impl crate::Resettable for Pras1Spec {
99 const RESET_VALUE: u32 = 0;
100}