lpc55_pac/flash_cfpa0/
sha256_digest.rs1#[doc = "Register `SHA256_DIGEST[%s]` reader"]
2pub struct R(crate::R<SHA256_DIGEST_SPEC>);
3impl core::ops::Deref for R {
4 type Target = crate::R<SHA256_DIGEST_SPEC>;
5 #[inline(always)]
6 fn deref(&self) -> &Self::Target {
7 &self.0
8 }
9}
10impl From<crate::R<SHA256_DIGEST_SPEC>> for R {
11 #[inline(always)]
12 fn from(reader: crate::R<SHA256_DIGEST_SPEC>) -> Self {
13 R(reader)
14 }
15}
16#[doc = "Register `SHA256_DIGEST[%s]` writer"]
17pub struct W(crate::W<SHA256_DIGEST_SPEC>);
18impl core::ops::Deref for W {
19 type Target = crate::W<SHA256_DIGEST_SPEC>;
20 #[inline(always)]
21 fn deref(&self) -> &Self::Target {
22 &self.0
23 }
24}
25impl core::ops::DerefMut for W {
26 #[inline(always)]
27 fn deref_mut(&mut self) -> &mut Self::Target {
28 &mut self.0
29 }
30}
31impl From<crate::W<SHA256_DIGEST_SPEC>> for W {
32 #[inline(always)]
33 fn from(writer: crate::W<SHA256_DIGEST_SPEC>) -> Self {
34 W(writer)
35 }
36}
37#[doc = "Field `FIELD` reader - ."]
38pub struct FIELD_R(crate::FieldReader<u32, u32>);
39impl FIELD_R {
40 #[inline(always)]
41 pub(crate) fn new(bits: u32) -> Self {
42 FIELD_R(crate::FieldReader::new(bits))
43 }
44}
45impl core::ops::Deref for FIELD_R {
46 type Target = crate::FieldReader<u32, u32>;
47 #[inline(always)]
48 fn deref(&self) -> &Self::Target {
49 &self.0
50 }
51}
52#[doc = "Field `FIELD` writer - ."]
53pub struct FIELD_W<'a> {
54 w: &'a mut W,
55}
56impl<'a> FIELD_W<'a> {
57 #[doc = r"Writes raw bits to the field"]
58 #[inline(always)]
59 pub unsafe fn bits(self, value: u32) -> &'a mut W {
60 self.w.bits = value as u32;
61 self.w
62 }
63}
64impl R {
65 #[doc = "Bits 0:31 - ."]
66 #[inline(always)]
67 pub fn field(&self) -> FIELD_R {
68 FIELD_R::new(self.bits as u32)
69 }
70}
71impl W {
72 #[doc = "Bits 0:31 - ."]
73 #[inline(always)]
74 pub fn field(&mut self) -> FIELD_W {
75 FIELD_W { w: self }
76 }
77 #[doc = "Writes raw bits to the register."]
78 #[inline(always)]
79 pub unsafe fn bits(&mut self, bits: u32) -> &mut Self {
80 self.0.bits(bits);
81 self
82 }
83}
84#[doc = "SHA256_DIGEST0 for DIGEST\\[31:0\\]
85SHA256_DIGEST1 for DIGEST\\[63:32\\]
86SHA256_DIGEST2 for DIGEST\\[95:64\\]
87SHA256_DIGEST3 for DIGEST\\[127:96\\]
88SHA256_DIGEST4 for DIGEST\\[159:128\\]
89SHA256_DIGEST5 for DIGEST\\[191:160\\]
90SHA256_DIGEST6 for DIGEST\\[223:192\\]
91SHA256_DIGEST7 for DIGEST\\[255:224\\]\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 [sha256_digest](index.html) module"]
92pub struct SHA256_DIGEST_SPEC;
93impl crate::RegisterSpec for SHA256_DIGEST_SPEC {
94 type Ux = u32;
95}
96#[doc = "`read()` method returns [sha256_digest::R](R) reader structure"]
97impl crate::Readable for SHA256_DIGEST_SPEC {
98 type Reader = R;
99}
100#[doc = "`write(|w| ..)` method takes [sha256_digest::W](W) writer structure"]
101impl crate::Writable for SHA256_DIGEST_SPEC {
102 type Writer = W;
103}
104#[doc = "`reset()` method sets SHA256_DIGEST[%s]
105to value 0"]
106impl crate::Resettable for SHA256_DIGEST_SPEC {
107 #[inline(always)]
108 fn reset_value() -> Self::Ux {
109 0
110 }
111}