atsam3n4a/matrix/
matrix_scfg3.rs1#[doc = "Register `MATRIX_SCFG3` reader"]
2pub type R = crate::R<MatrixScfg3Spec>;
3#[doc = "Register `MATRIX_SCFG3` writer"]
4pub type W = crate::W<MatrixScfg3Spec>;
5#[doc = "Field `SLOT_CYCLE` reader - Maximum Number of Allowed Cycles for a Burst"]
6pub type SlotCycleR = crate::FieldReader;
7#[doc = "Field `SLOT_CYCLE` writer - Maximum Number of Allowed Cycles for a Burst"]
8pub type SlotCycleW<'a, REG> = crate::FieldWriter<'a, REG, 8>;
9#[doc = "Field `DEFMSTR_TYPE` reader - Default Master Type"]
10pub type DefmstrTypeR = crate::FieldReader;
11#[doc = "Field `DEFMSTR_TYPE` writer - Default Master Type"]
12pub type DefmstrTypeW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
13#[doc = "Field `FIXED_DEFMSTR` reader - Fixed Default Master"]
14pub type FixedDefmstrR = crate::FieldReader;
15#[doc = "Field `FIXED_DEFMSTR` writer - Fixed Default Master"]
16pub type FixedDefmstrW<'a, REG> = crate::FieldWriter<'a, REG, 3>;
17#[doc = "Field `ARBT` reader - Arbitration Type"]
18pub type ArbtR = crate::FieldReader;
19#[doc = "Field `ARBT` writer - Arbitration Type"]
20pub type ArbtW<'a, REG> = crate::FieldWriter<'a, REG, 2>;
21impl R {
22 #[doc = "Bits 0:7 - Maximum Number of Allowed Cycles for a Burst"]
23 #[inline(always)]
24 pub fn slot_cycle(&self) -> SlotCycleR {
25 SlotCycleR::new((self.bits & 0xff) as u8)
26 }
27 #[doc = "Bits 16:17 - Default Master Type"]
28 #[inline(always)]
29 pub fn defmstr_type(&self) -> DefmstrTypeR {
30 DefmstrTypeR::new(((self.bits >> 16) & 3) as u8)
31 }
32 #[doc = "Bits 18:20 - Fixed Default Master"]
33 #[inline(always)]
34 pub fn fixed_defmstr(&self) -> FixedDefmstrR {
35 FixedDefmstrR::new(((self.bits >> 18) & 7) as u8)
36 }
37 #[doc = "Bits 24:25 - Arbitration Type"]
38 #[inline(always)]
39 pub fn arbt(&self) -> ArbtR {
40 ArbtR::new(((self.bits >> 24) & 3) as u8)
41 }
42}
43impl W {
44 #[doc = "Bits 0:7 - Maximum Number of Allowed Cycles for a Burst"]
45 #[inline(always)]
46 #[must_use]
47 pub fn slot_cycle(&mut self) -> SlotCycleW<MatrixScfg3Spec> {
48 SlotCycleW::new(self, 0)
49 }
50 #[doc = "Bits 16:17 - Default Master Type"]
51 #[inline(always)]
52 #[must_use]
53 pub fn defmstr_type(&mut self) -> DefmstrTypeW<MatrixScfg3Spec> {
54 DefmstrTypeW::new(self, 16)
55 }
56 #[doc = "Bits 18:20 - Fixed Default Master"]
57 #[inline(always)]
58 #[must_use]
59 pub fn fixed_defmstr(&mut self) -> FixedDefmstrW<MatrixScfg3Spec> {
60 FixedDefmstrW::new(self, 18)
61 }
62 #[doc = "Bits 24:25 - Arbitration Type"]
63 #[inline(always)]
64 #[must_use]
65 pub fn arbt(&mut self) -> ArbtW<MatrixScfg3Spec> {
66 ArbtW::new(self, 24)
67 }
68}
69#[doc = "Slave Configuration Register 3\n\nYou can [`read`](crate::generic::Reg::read) this register and get [`matrix_scfg3::R`](R). You can [`write_with_zero`](crate::generic::Reg::write_with_zero) this register using [`matrix_scfg3::W`](W). You can also [`modify`](crate::generic::Reg::modify) this register. See [API](https://docs.rs/svd2rust/#read--modify--write-api)."]
70pub struct MatrixScfg3Spec;
71impl crate::RegisterSpec for MatrixScfg3Spec {
72 type Ux = u32;
73}
74#[doc = "`read()` method returns [`matrix_scfg3::R`](R) reader structure"]
75impl crate::Readable for MatrixScfg3Spec {}
76#[doc = "`write(|w| ..)` method takes [`matrix_scfg3::W`](W) writer structure"]
77impl crate::Writable for MatrixScfg3Spec {
78 type Safety = crate::Unsafe;
79 const ZERO_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
80 const ONE_TO_MODIFY_FIELDS_BITMAP: u32 = 0;
81}