atsam3n4a/matrix/
matrix_pras3.rs1#[doc = "Register `MATRIX_PRAS3` reader"]
2pub type R = crate::R<MatrixPras3Spec>;
3#[doc = "Register `MATRIX_PRAS3` writer"]
4pub type W = crate::W<MatrixPras3Spec>;
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>;
21impl R {
22 #[doc = "Bits 0:1 - Master 0 Priority"]
23 #[inline(always)]
24 pub fn m0pr(&self) -> M0prR {
25 M0prR::new((self.bits & 3) as u8)
26 }
27 #[doc = "Bits 4:5 - Master 1 Priority"]
28 #[inline(always)]
29 pub fn m1pr(&self) -> M1prR {
30 M1prR::new(((self.bits >> 4) & 3) as u8)
31 }
32 #[doc = "Bits 8:9 - Master 2 Priority"]
33 #[inline(always)]
34 pub fn m2pr(&self) -> M2prR {
35 M2prR::new(((self.bits >> 8) & 3) as u8)
36 }
37 #[doc = "Bits 12:13 - Master 3 Priority"]
38 #[inline(always)]
39 pub fn m3pr(&self) -> M3prR {
40 M3prR::new(((self.bits >> 12) & 3) as u8)
41 }
42}
43impl W {
44 #[doc = "Bits 0:1 - Master 0 Priority"]
45 #[inline(always)]
46 #[must_use]
47 pub fn m0pr(&mut self) -> M0prW<MatrixPras3Spec> {
48 M0prW::new(self, 0)
49 }
50 #[doc = "Bits 4:5 - Master 1 Priority"]
51 #[inline(always)]
52 #[must_use]
53 pub fn m1pr(&mut self) -> M1prW<MatrixPras3Spec> {
54 M1prW::new(self, 4)
55 }
56 #[doc = "Bits 8:9 - Master 2 Priority"]
57 #[inline(always)]
58 #[must_use]
59 pub fn m2pr(&mut self) -> M2prW<MatrixPras3Spec> {
60 M2prW::new(self, 8)
61 }
62 #[doc = "Bits 12:13 - Master 3 Priority"]
63 #[inline(always)]
64 #[must_use]
65 pub fn m3pr(&mut self) -> M3prW<MatrixPras3Spec> {
66 M3prW::new(self, 12)
67 }
68}
69#[doc = "Priority Register A for Slave 3\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`matrix_pras3::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_pras3::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
70pub struct MatrixPras3Spec;
71impl crate::RegisterSpec for MatrixPras3Spec {
72 type Ux = u32;
73}
74#[doc = "`read()` method returns [`matrix_pras3::R`](R) reader structure"]
75impl crate::Readable for MatrixPras3Spec {}
76#[doc = "`write(|w| ..)` method takes [`matrix_pras3::W`](W) writer structure"]
77impl crate::Writable for MatrixPras3Spec {
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 MATRIX_PRAS3 to value 0"]
83impl crate::Resettable for MatrixPras3Spec {
84 const RESET_VALUE: u32 = 0;
85}