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