corstone300_pac/scc/
dll.rs1#[doc = "Register `DLL` reader"]
6pub struct R(crate::R<DLL_SPEC>);
7impl core::ops::Deref for R {
8 type Target = crate::R<DLL_SPEC>;
9 #[inline(always)]
10 fn deref(&self) -> &Self::Target {
11 &self.0
12 }
13}
14impl From<crate::R<DLL_SPEC>> for R {
15 #[inline(always)]
16 fn from(reader: crate::R<DLL_SPEC>) -> Self {
17 R(reader)
18 }
19}
20#[doc = "Register `DLL` writer"]
21pub struct W(crate::W<DLL_SPEC>);
22impl core::ops::Deref for W {
23 type Target = crate::W<DLL_SPEC>;
24 #[inline(always)]
25 fn deref(&self) -> &Self::Target {
26 &self.0
27 }
28}
29impl core::ops::DerefMut for W {
30 #[inline(always)]
31 fn deref_mut(&mut self) -> &mut Self::Target {
32 &mut self.0
33 }
34}
35impl From<crate::W<DLL_SPEC>> for W {
36 #[inline(always)]
37 fn from(writer: crate::W<DLL_SPEC>) -> Self {
38 W(writer)
39 }
40}
41#[doc = "Field `LOCKED` reader - Complete Flag"]
42pub type LOCKED_R = crate::BitReader<bool>;
43#[doc = "Field `LOCKED` writer - Complete Flag"]
44pub type LOCKED_W<'a, const O: u8> = crate::BitWriter<'a, u32, DLL_SPEC, bool, O>;
45#[doc = "Field `LOCK_UNLOCK` reader - Complete Flag"]
46pub type LOCK_UNLOCK_R = crate::FieldReader<u8, u8>;
47#[doc = "Field `LOCK_UNLOCK` writer - Complete Flag"]
48pub type LOCK_UNLOCK_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DLL_SPEC, u8, u8, 8, O>;
49#[doc = "Field `LOCKED_MASKED` reader - Error Flag"]
50pub type LOCKED_MASKED_R = crate::FieldReader<u8, u8>;
51#[doc = "Field `LOCKED_MASKED` writer - Error Flag"]
52pub type LOCKED_MASKED_W<'a, const O: u8> = crate::FieldWriter<'a, u32, DLL_SPEC, u8, u8, 8, O>;
53impl R {
54 #[doc = "Bit 0 - Complete Flag"]
55 #[inline(always)]
56 pub fn locked(&self) -> LOCKED_R {
57 LOCKED_R::new((self.bits & 1) != 0)
58 }
59 #[doc = "Bits 16:23 - Complete Flag"]
60 #[inline(always)]
61 pub fn lock_unlock(&self) -> LOCK_UNLOCK_R {
62 LOCK_UNLOCK_R::new(((self.bits >> 16) & 0xff) as u8)
63 }
64 #[doc = "Bits 24:31 - Error Flag"]
65 #[inline(always)]
66 pub fn locked_masked(&self) -> LOCKED_MASKED_R {
67 LOCKED_MASKED_R::new(((self.bits >> 24) & 0xff) as u8)
68 }
69}
70impl W {
71 #[doc = "Bit 0 - Complete Flag"]
72 #[inline(always)]
73 pub fn locked(&mut self) -> LOCKED_W<0> {
74 LOCKED_W::new(self)
75 }
76 #[doc = "Bits 16:23 - Complete Flag"]
77 #[inline(always)]
78 pub fn lock_unlock(&mut self) -> LOCK_UNLOCK_W<16> {
79 LOCK_UNLOCK_W::new(self)
80 }
81 #[doc = "Bits 24:31 - Error Flag"]
82 #[inline(always)]
83 pub fn locked_masked(&mut self) -> LOCKED_MASKED_W<24> {
84 LOCKED_MASKED_W::new(self)
85 }
86 #[doc = "Writes raw bits to the register."]
87 #[inline(always)]
88 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
89 self.0.bits(bits);
90 self
91 }
92}
93#[doc = "DLL Lock Register\n\nThis register you can [`read`](crate::generic::Reg::read), [`write_with_zero`](crate::generic::Reg::write_with_zero), [`reset`](crate::generic::Reg::reset), [`write`](crate::generic::Reg::write), [`modify`](crate::generic::Reg::modify). See [API](https://docs.rs/svd2rust/#read--modify--write-api).\n\nFor information about available fields see [dll](index.html) module"]
94pub struct DLL_SPEC;
95impl crate::RegisterSpec for DLL_SPEC {
96 type Ux = u32;
97}
98#[doc = "`read()` method returns [dll::R](R) reader structure"]
99impl crate::Readable for DLL_SPEC {
100 type Reader = R;
101}
102#[doc = "`write(|w| ..)` method takes [dll::W](W) writer structure"]
103impl crate::Writable for DLL_SPEC {
104 type Writer = W;
105}
106#[doc = "`reset()` method sets DLL to value 0"]
107impl crate::Resettable for DLL_SPEC {
108 #[inline(always)]
109 fn reset_value() -> Self::Ux {
110 0
111 }
112}