1#![allow(clippy::identity_op)]
21#![allow(clippy::module_inception)]
22#![allow(clippy::derivable_impls)]
23#[allow(unused_imports)]
24use crate::common::sealed;
25#[allow(unused_imports)]
26use crate::common::*;
27#[doc = r"DMAC Module Activation"]
28unsafe impl ::core::marker::Send for super::Dma {}
29unsafe impl ::core::marker::Sync for super::Dma {}
30impl super::Dma {
31 #[allow(unused)]
32 #[inline(always)]
33 pub(crate) const fn _svd2pac_as_ptr(&self) -> *mut u8 {
34 self.ptr
35 }
36 #[doc = "DMA Module Activation Register"]
37 #[inline(always)]
38 pub const fn dmast(&self) -> &'static crate::common::Reg<self::Dmast_SPEC, crate::common::RW> {
39 unsafe {
40 crate::common::Reg::<self::Dmast_SPEC, crate::common::RW>::from_ptr(
41 self._svd2pac_as_ptr().add(0usize),
42 )
43 }
44 }
45
46 #[doc = "DMAC Error Channel Register"]
47 #[inline(always)]
48 pub const fn dmechr(
49 &self,
50 ) -> &'static crate::common::Reg<self::Dmechr_SPEC, crate::common::RW> {
51 unsafe {
52 crate::common::Reg::<self::Dmechr_SPEC, crate::common::RW>::from_ptr(
53 self._svd2pac_as_ptr().add(64usize),
54 )
55 }
56 }
57}
58#[doc(hidden)]
59#[derive(Copy, Clone, Eq, PartialEq)]
60pub struct Dmast_SPEC;
61impl crate::sealed::RegSpec for Dmast_SPEC {
62 type DataType = u8;
63}
64#[doc = "DMA Module Activation Register"]
65pub type Dmast = crate::RegValueT<Dmast_SPEC>;
66
67impl Dmast {
68 #[doc = "DMAC Operation Enable"]
69 #[inline(always)]
70 pub fn dmst(
71 self,
72 ) -> crate::common::RegisterField<0, 0x1, 1, 0, dmast::Dmst, Dmast_SPEC, crate::common::RW>
73 {
74 crate::common::RegisterField::<0,0x1,1,0,dmast::Dmst, Dmast_SPEC,crate::common::RW>::from_register(self,0)
75 }
76}
77impl ::core::default::Default for Dmast {
78 #[inline(always)]
79 fn default() -> Dmast {
80 <crate::RegValueT<Dmast_SPEC> as RegisterValue<_>>::new(0)
81 }
82}
83pub mod dmast {
84
85 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
86 pub struct Dmst_SPEC;
87 pub type Dmst = crate::EnumBitfieldStruct<u8, Dmst_SPEC>;
88 impl Dmst {
89 #[doc = "DMAC activation is disabled."]
90 pub const _0: Self = Self::new(0);
91 #[doc = "DMAC activation is enabled."]
92 pub const _1: Self = Self::new(1);
93 }
94}
95#[doc(hidden)]
96#[derive(Copy, Clone, Eq, PartialEq)]
97pub struct Dmechr_SPEC;
98impl crate::sealed::RegSpec for Dmechr_SPEC {
99 type DataType = u32;
100}
101#[doc = "DMAC Error Channel Register"]
102pub type Dmechr = crate::RegValueT<Dmechr_SPEC>;
103
104impl Dmechr {
105 #[doc = "DMAC Error channel"]
106 #[inline(always)]
107 pub fn dmech(
108 self,
109 ) -> crate::common::RegisterField<0, 0x7, 1, 0, u8, Dmechr_SPEC, crate::common::R> {
110 crate::common::RegisterField::<0,0x7,1,0,u8, Dmechr_SPEC,crate::common::R>::from_register(self,0)
111 }
112 #[doc = "DMAC Error channel Security Attribution Monitor"]
113 #[inline(always)]
114 pub fn dmechsam(
115 self,
116 ) -> crate::common::RegisterField<8, 0x1, 1, 0, dmechr::Dmechsam, Dmechr_SPEC, crate::common::R>
117 {
118 crate::common::RegisterField::<8,0x1,1,0,dmechr::Dmechsam, Dmechr_SPEC,crate::common::R>::from_register(self,0)
119 }
120 #[doc = "DMAC Error Status"]
121 #[inline(always)]
122 pub fn dmesta(
123 self,
124 ) -> crate::common::RegisterField<16, 0x1, 1, 0, dmechr::Dmesta, Dmechr_SPEC, crate::common::RW>
125 {
126 crate::common::RegisterField::<16,0x1,1,0,dmechr::Dmesta, Dmechr_SPEC,crate::common::RW>::from_register(self,0)
127 }
128}
129impl ::core::default::Default for Dmechr {
130 #[inline(always)]
131 fn default() -> Dmechr {
132 <crate::RegValueT<Dmechr_SPEC> as RegisterValue<_>>::new(0)
133 }
134}
135pub mod dmechr {
136
137 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
138 pub struct Dmechsam_SPEC;
139 pub type Dmechsam = crate::EnumBitfieldStruct<u8, Dmechsam_SPEC>;
140 impl Dmechsam {
141 #[doc = "secure channel"]
142 pub const _0: Self = Self::new(0);
143 #[doc = "non-secure channel"]
144 pub const _1: Self = Self::new(1);
145 }
146 #[derive(Clone, Copy, Eq, PartialEq, Ord, PartialOrd)]
147 pub struct Dmesta_SPEC;
148 pub type Dmesta = crate::EnumBitfieldStruct<u8, Dmesta_SPEC>;
149 impl Dmesta {
150 #[doc = "No DMA transfer error occurred"]
151 pub const _0: Self = Self::new(0);
152 #[doc = "DMA transfer error occurred"]
153 pub const _1: Self = Self::new(1);
154 }
155}